- Home /
Let camera render the scene just one time
Hi,
If i remember correctly, camera render the scene every frame. I am wondering if it is possible that let camera only render the scene one time and just show that image because i am a completely static object in the scene.
Answer by FlaSh-G · Jun 20, 2013 at 05:52 PM
If anything moves in front of that object (or, if it's transparent or translucent, behind it) or the camera moves just one bit, this won't work. Also, you won't get a real performance boost by trying to render static objects less often. So why trying? If you have a good reason to do this, you could take a RenderTexture and let the camera render to it, then set it as the texture of a plane's material.
" If you have a good reason to do this, you could take a RenderTexture and let the camera render to it, then set it as the texture of a plane's material." this sounds like a good idea and this is actually what i want to do since the objects(3d model) is really big and it is static and it is causing CPU to run really slowly. Do you $$anonymous$$d telling me a bit specifically on that method? Thanks
There's some code for this here. Use it with Renderer.material.mainTexture, for example. Though I'd strongly recommend that you create that image once via Unity Editor and add the texture to the game's assets ins$$anonymous$$d of making the players computer do that job...
Yeah, I tried that code, but there is something wrong with RenderTexture.get_width(). I am wondering how I can create image via unity editor. Can you be a little specific? Thanks.
Just do whatever you feel like, as long as it produces an image asset. For example, i have simply used the OS' printscreen function and cut out the wanted image within photoshop, then saved it to the assets.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
White line along the edge 2 Answers
make android camera video as the background of the unity scene? 0 Answers
Camera Animation 1 Answer
Smooth Follow Camera Rotate on Z-Axis? 2 Answers