- Home /
Is it better to use 1 big occlusion area, or several smaller ones
For a racetrack level, would it be better to use multiple areas that closely match the track, or is it better to just use one big area that covers all.
From my tests it appears to be better to use 1 big area, but I'm confused as to why it behaves this way, I mean I can expectmultiple small ones to be more expensive, but not that it would actually cause the culling to be worse (which seems to be the case).
I posted this (and other questions) in the forums, but got no response: http://forum.unity3d.com/threads/127503-Some-questions-on-Occlusion-Culling-in-Unity
Answer by rutter · Mar 16, 2012 at 03:25 AM
As I understand it, larger occlusion areas require more time to bake, and may add some (probably light) memory overhead at runtime. Cameras will only benefit from occlusion culling while they're in one of those areas, though. It seems like a pretty straightforward trade-off: you can save baking time by using smaller areas, but doing so takes more time to configure and is slightly more prone to errors.
I would guess that it's far more important to consider the size of cells within your occlusion areas. Larger cells have less CPU overhead, but smaller values produce more accurate culling. Unity recommends that you try to find a good balance between cell size and the size of objects in your scene -- in particular, that ideally you should try not to have too many objects which are larger than your cells.
More than anything, though: play with the settings, and see how it works for your game.
the problem is that I have set the cell size to the smallest value possible, namely 1, and the memory limit to it's maximum. But when I bake the OC, the resulting cells are a lot bigger then 1 unit. So I had hoped using multiple small areas would result in smaller cells, seeing as the entire combined occlusion area voulume is a lot smaller then, but this doen't seem to be the case, the cells are even bigger than before. Also, In some more open places, the cells are even bigger, sometimes so big pretty much nothing is culled. Anyway, baking time is not in issue, as it strangly takes almost no time to bake (about 1-2 hours for a big level). This all doesn't make much sense to me.
Answer by Nabeel Saleem · Dec 01, 2013 at 07:42 PM
I think multiple occlusion area is good, In bootcamp example i saw multiple areas ,