- Home /
In Unity4 is it possible to apply the occlusion culling for procedural objects?
Hi,
we are creating a visualization system with millions of procedural cubes, and would like to know if in Unity4 we are able to use the occlusion system at run time using scripts.
Is it possible or it will be possible?
thank you
rp
Answer by Bunny83 · Dec 18, 2012 at 06:24 PM
No, the occlusion data has to be generated in the editor and it takes quite a while to bake it. Just read the manual on OcclusionCulling.
Also millions of objects would consume a lot memory just to keep them in memory. A gameobject has quite a bit overhead. Usually that's not a problem, but if you go for 1000+ or 10000+ objects it's going to add up quite fast. Each Gameobject has at least a transform and probably a renderer, material, ... If you just add up that you will have at least something like 500 byte per object. A million would be, well 500MB.
It would be interesting what's the goal of this. Maybe there are better solutions like "chunking".
Ok, thank you for the answer.
Yes, the goal is to develop a visualization system of geological data represented by cubes, a "block$$anonymous$$odel".
Right now, I'm able to display 1$$anonymous$$ of cubes at the same time using $$anonymous$$eshTopology. But I would like to represent larger models using this limit using some kind of occlusion, but it looks that the occlusion culling of Unity can't be used in this case.
The "chunking" would be a solution, but we are looking other solutions like the occlusion culling..
rp
Well, you could of course try to setup some kind of octrees and implement your own occlusion detection. However how efficient a certain technology would be depends on the overall scene setup. occlusion culling only works when whole areas are completely occluded by other objects.
This is great if the viewer for example is a player that can only walk on the ground in a big city. If the viewer can fly way above the city it's quite pointless to use occlusion culling for the buildings since most the time almost all are visible at the same time.
Your answer
Follow this Question
Related Questions
How to achieve this type of Occlusion? 3 Answers
occlusion culling conflict with shader,Occlusion culling conflict with shader 0 Answers
Custom Occlusion Culling at runtime? 1 Answer
Unity Occlusion unable to recognize Occludee and Occluder? 1 Answer
Occlusion Culling not working, only frustum culling 3 Answers