- Home /
What is my camera rendering?
Hello community of awesomeness; I have another question.
I would like to know if my camera renders objects behind me and in general objects that are not in my field of view. I did my own experiment by placing a number of objects around and and changing the field of view on the camera. The FPS remained unchanged, at around 67, despite me having changed the field of view. That would lead me to believe that it is rendering things that I am not seeing. Am I right?
My second question is then, can I change this so that it only renders objects in my field of view and could you point me to some documentation?
Many thanks!
Answer by robertbu · Mar 22, 2013 at 04:14 PM
Objects are rendered if any part of the object can be seen by any camera (probably any part of the bounding volume of the object). So no, an object behind the camera is not rendered. You can check the Renderer.isVisable flag to see if any camera can see a specific object. Note if you have one object in your field of view that is completely hidden by another object in your field of view, it is still rendered unless you have Pro and use Occlusion Culling. That's what @devlab_lt is referring to in his answer.
I should add that an object is rendered if it's seen by any camera. $$anonymous$$eep in $$anonymous$$d that in the editor the sceneView has it's own camera and it does count as well.
Answer by devlab_lt · Mar 22, 2013 at 10:33 AM
Yes, all objects are rendered, even if you are not looking into them.
Unity Pro has feature called Occlusion Culling, which hides objects you don't see and greatly improves game performance. More about it you can read here
Objects are only rendered if they intersect the view frustrum. Occlusion culling just saves render time on objects that are obstructed by other objects.
uhm thanks I thought everything is rendered
even behind camera now I see my implementation to disable and enable rendering is pointless :P