- Home /
How to make an object to be part of the skybox
Hi, I'm new to the forum but working with Unity since 3.0. It's been a while since the last time I used it. There are lot of new things, classes, etc.. Anyway, I'm looking for a way to make a gameobject far enougth from camera (for example a planet I'm leaving) to be destroyed and added to the background. So the camera will render only objects near to itself. The main problems are: - make a partial render of the object as it looks like to the camera (maybe using layers and multiple cameras) - change the skybox's textures in runtime (maybe found a solution http://answers.unity3d.com/questions/617690/changing-skyboxs-texture-via-code.html)
My idea is to use a special layer (f.e. "hidden") for those objects that need to be destroyed, so changing their layertype to "hidden" in realtime and get the render image from a camera that can see only "hidden" objects and has a black background. Then, using a Render Texture maybe, get the rendered object and add to the skybox. Obviously the camera need to be oriented toward the object when renders it and the script that creates the realtime skybox has to store all the separated textures and thier rotation in the space.
BUT! ...maybe all of this is a bit heavy for the cpu/gpu/anyone inside my pc so I ask you if is there a more simple way to do it
PS: sorry for english
Lorenzo
Your answer
Follow this Question
Related Questions
Health Bar to Render On Top 2 Answers
Rendering Real Time Shadows to a Certain Distance 1 Answer
How is a Skybox Made From an Image? 4 Answers
Why do I see this fog in the mittle of my view on my skybox cubemap? 1 Answer
Two Skyboxes 1 Answer