Cell size in Occlusion Culling

I am trying to reduce the cell size in occlusion culling, but I don’t seem to know how to do it. I first ran it with a View Cell Size of 1; this created fairly large cells (maybe 5x5x10m); I’ve now rerun it with View Cell Size of .01, but there doesn’t seem to be much difference in the cell size. Specifically, I need to reduce the height of a cell, since currently the cells are 10m tall so they extend well underground and so “see” under buildings that are actually totally occluding more distant buildings. So a lot more buildings are getting rendered than need be. See the attached screenshots. First, am I understanding what “View Cells” are–is that what determines the player’s camera view? And how do I reduce the height of that cell that determines what is getting rendered?

thanks
Dave


you need to place view areas, they will allow you to specify the cell sizes in local area (you then just have to do so everywhere)

What you see there aren’t the view cell sizes but actually the oct tree upon which the occlusion bases, it gives you an idea of what area is active and what not.
The cell size you specify / the camera ranges impact how small the blocks there can become basically and how large they need to be at least.

Ah…it’s slowly dawning on me now. So I need to create multiple view areas (Component: Rendering: Occlusion Culling, right?) and place them wherever the PC/Camera might go. Is there an optimal size for them? Is it okay of those areas overlap some?

And the VIew Cell Size–is that in meter units or percentage of the View Area, or what?

thanks much!
Dave

Those area must actually overlap, if they don’t you will lose occlusion culling as your camera must never leave those areas if you decide to go with them.

So i can put occlusion inside occlusion?

Okay, I tried this–created a smallish OC area (Component: Rendering: Occlusion Culling, right? A July forum thread refers to Component/Miscellaneous/PVSVolume, but I don’t see that on that pulldown menu–did it change since then?). But I am having the same problem–the view cell area is quite tall, extending far below the buildings that should be occluding the camera view. See attached–the white box is the view cell area, the green box is the OC area I created. The reddish building on the left should be occluded, even with that tall view cell (since I had put in the white plane to occlude the view underground). What am I doing wrong?

thanks
Dave

Hi Gecko,

Please keep this tread updated as I’m having the exact same issue and ended up just having to give up. Now I’m just hoping that 3.1 will fix it.

http://forum.unity3d.com/threads/63902-Occlusion-Culling-Problems-adjusting-the-areas

Will do. I can’t believe it’s a bug, I figure I’m just doing something wrong, but the documentation on OC is pretty brief so I have no idea what to do differently.

I have the same issue, and this is terrible. I thought that it is only me so stupid and i can not upgrade my project from Unity iPhone 1.7 . The size of cell now does not depend from size of viewArea. I think now it is relative and depends from many factors, such like whole size of scene and other stuff. And this is crazy. How return absolute size of cell like in Unity iPhone 1.7?

Any ideas? It is really important

Does anyone solve this issue in your projects? gecko? PolishRenegade?

There is no such thing
That approach is totally bruteforce and useless for anything but small indoor because the distribution and object density is far from equaly distributed as such an oct tree based representation will store the data worlds more efficient

Dreamora tell me please how using new OC rich such OC like in Unity iPhone 1.7. And yes, i am making indoor fps. And this is very critical for me. Here is little demo, where i am showing the issue with OC. Level called ‘Levels → JumpCamp_part3’. I have baked OC using maximum possible accurate values of cellSize and TargetResolution.

http://www10.zippyshare.com/v/3813567/file.html

I’ve been playing around with it more and now I’m more confused than ever. I tried making a very small OC area (Can anyone confirm that I’m doing this correctly–Component: Rendering: Occlusion Culling, right?), just 1m cube, and baked that. But when I test it, the OC is occurring whether the camera is in that 1m cube or not. See first screenshot attached–the green cube is the OC area (created in Component/Rendering: OC, and selected in the OC popup window, Object: Quick Select), and my PC/camera is outside of it, but models are being occluded. So what’s the point/function of the green cube?

And the original problem remains: the white cube that appears around the camera is quite a bit larger/taller than I want it to be, and it extends below the terrain so the water texture below the terrain, and buildings visible from underneath the nearest buildings, are not occluded. Does anyone out there know how to control the size of the white cubes that determine the occluded view?

More weirdness, in the other two screenshots, the building mesh behind the camera is hidden when the camera is pointing 180 degrees away, but they are activated when the camera rotates just a few degrees–it’s still about 160 degrees facing away from that building mesh, but for some reason is activated, I have no idea why.



Went to Unite2010 in Montréal and talked to a Unity Programmer there about it.

There seem to be issues with the OC in general and they are really trying to debug it however they need more information on it. Your best bet would be to send them your project and open a bug-case. They will be more than happy to help you out, believe me.

Unfortunately I still haven’t solved my problem, and I’m guessing the party the night before and my weird English skills didn’t help with my case but I now know the community should reach more to them.

@PolishRenegade–very glad you talked to some UT folks about this. I’m zipping up my project to submit with a bug report. I really thought I was doing something wrong, but sure can’t figure out what that might be, so maybe it really is a bug!

Hey Gecko,

Could you keep us in the loop if there are any new developments about it?

Thanks

the trouble you have there sound pretty fishy gecko. why would the stuff show up at all, frustum culling should kill it completely independent of any OC actually