- Home /
Can't get occlusion culling to work
I'm quite new to occlusion culling, so I have no idea how to set it up. I looked through the docs on it, and I'm trying to use the feature on moving objects. I can't mark anything as static, because there are TONS of doors in my level that need to be able to rotate, and it would take me days to go through and make everything BUT the doors static. My problem is that after I set up the occlusion area, nothing happens. Nothing gets culled at all. I tried baking, but it gives me an error saying I need to mark objects as static, which I can't do in this case. I tried selecting "Visualize" in the drop-down menu in the little occlusion culling box in the scene view, but that button is grayed out, and I can't select it. Also, the few videos I've found demonstrating this feature use an older version of it, and some of the buttons don't even exist anymore. Everywhere I look on the internet, I can hardly find ANYTHING on occlusion culling. This is getting to be very frustrating... Can someone please just help me figure out how to add occlusion culling to moving objects? That's all I've wanted this whole time, but Unity seems to like making everything as difficult as possible.
Answer by Brice31 · Dec 10, 2012 at 04:03 PM
The Occlusion Culling system is not working for me. I set up occlusions areas, occluders and occludees as said in Unity's doc. After baking, I don't see any occlusion culling in Visualization mode, only frustum culling. Does anyone has the same thing ?
Answer by Dreamora · Sep 16, 2012 at 12:39 PM
Occlusion culling is Unity pro / iOS Pro / Android Pro only
Occlusion culling requires you to calculate them and it requires the object that act as occluders to be marked as static occluders. After you setup the scenes,open the occlusion culling editor and bake it
Thats basically it
as you use doors you might want to use the oc storage and calc mode that offers portals so you can place portals where you have doors which you open/close through code
Anything related to occlusion culling is in the documentation. More isn't required as there is not more to really know about it. Its static occlusion culling thats offline calculated in the editor and thats not streamable (means its only available in the scene loaded through LoadLevel / LoadLevelAsync, you can't load it additively nor will it update as you modify static objects etc)
Answer by DesiQ · Sep 16, 2012 at 01:12 PM
May I suggest a possible alternative to precomputed OC? It's a technique I made that uses raycasts to adjust the far plane of the view frustum so that I could use frustum culling as improvised occlusion culling.
I don't know how useful it will end up being to you, but if you're having a lot of trouble with Unity's built-in OC, then this might be worth a shot.
Answer by Griffo · Sep 16, 2012 at 01:36 PM
Go to Occlusion, Occlusion area and create new, now resize the area to cove what you want to cull and bake, as an Occlusion area will cull moving objects.