I’m creating a big environment (outdoor) and divided it in sectors.
In the past I used an engine with scenegraph support, and it was very good for this matter, since I created a node for every sector. The engine used the scenegraph to automatically calculate the sub-tree space volume (space occupied by the node and subnodes): if the main volume does not enter in the camera (frustum camera), then the engine eliminates the entire sub-tree from rendering process.
Does Unity use the same (or similar) concept using GameObjects? Is a gameObject node managed as a scenegraph?
Thank you. I don’t think I can use Umbra since I create objects at runtime.
Do you know if Unity can use Hardware occlusion, in order to avoid drawing objects completely hidden by other objects?
As far as I know, occlusion culling can’t be created at runtime…it takes quite a bit of time to compute. The only hardware I know of offhand that discards occluded pixels is something like the PowerVR chips in devices like the iPhone; I don’t think desktop GPUs do this.
there are a few ones that do early out z testing.
But Desktop GPUs wouldn’t need it, they have the Occlusion Query, but Unity at the time, as far as I’m aware, does not use it.
I’m working on a space game and have a particle system and solid geometry sphere as the sun. If the camera clips inside the sun it can see a lot more of the particle system and the increased filtrate of all the particle alpha blending suddenly drags the framerate to a crawl.
I made some tests, but there is something “obscure” in polygon occlusion:
create many objects in order to decrease the frame rate when you see them (see with the camera): well, if you put another polygon between camera and the polygons (objects), frame rate is low the same. It means there is system built-in in order to avoid to draw objects hidden. I knew this techique was called “hardware occlusion” and was performed in the video card (check every single pixel is an expensive operation).
I need another information: I noticed that there is no way to create a scenegraph like system.
I divided my game in “area”: each area contains several objects. After I created them I need to show/hide based on the player position. I tried several techniques. But the problem seems that, with MANY objects inside the game (even if not visible - renderer=false) Unity performance decrease so much. More objects I add (even if not visible) performance go down. So now I create and destroy the objects. This is a problem for me, since I cannot make it in paraller (multithread) so, in order to avoid some game “freeze” I need to work on a few objects per frame drawn.
Using a scenegraph I could really eliminate not useful objects from the rendering queue and, I think, the performance could be better.
Can you suggest me to create MANY objects but showing only the ones near to the player?