- Home /
Procedural Skyboxes Based on Scene Data
I am attempting to create a skybox based on objects in the scene. I can't be limited by the camera far clipping distance because the objects in the scene are way beyond the farthest possible render distance (in other words, stars). I'm not really experienced in creating textures. So how would I achieve something like this? Or is it even possible?
Answer by smallbit · Mar 05, 2015 at 03:56 AM
You can use two cameras, first camera will be for skybox , you can have sphere or whatever there, set its layer to let say skybox, than in the camera in culling mask set it to show only skybox. second camera will show anything else, in culling mask select everything except your skybox layer. Than adjust depth so camera two renders on top (higher depth value). This should give you required effect.
And regarding your skybox procedural generation you did not provide enough information to answer.
But this would still be limited by the far clipping distance of the cameras. The maximum render distance I could achieve with a camera was 1 X 10^35. But this has the potential to create loads of lag. The other reason to use a skybox is because at a certain point the object in question becomes so small on screen that it isn't visible. By creating a skybox you could see these objects.
Wait are you saying create a sphere object, and put the texture on that object? Then use the cameras to put the sphere texture in the background and everything else in the foreground?
Your answer
Follow this Question
Related Questions
Normal Texture to Skybox 0 Answers
Render Extremely Far off Objects 1 Answer
Extremely Fast Travel 1 Answer
Instantiate rigidbody, transform or gameobject? 1 Answer
I want to move a cube with rotation but I find this problem 1 Answer