- Home /
Occlusion Culling - Dynamic Objects Issue
Hi all,
I'm running into an issue with the Occlusion Culling system for weeks now and with only limited documentation and a few other forum posts I can't figure out what is going wrong exactly. I'm by far not an expert on these things but I do know how the system works. We're working on an iPhone game with fairly complex 3D scenes. We've got a scene which resembles a house interior with several rooms which should be ideal for Occlusion culling.
In Unity iPhone 1.7 I used to place occlusion boxes around every room and target areas around all moving objects, rendered the scene and everything worked fine. Now in Unity 3 I'm doing the exact same but some rooms keep blinking away.
Now, I've tried everything from putting one massive box around the entire area to altering the cell size and target resolution etc.
What I think is going wrong is that the HUD (which are actual objects) and the 3rd person character cause the problems because they are moving through the area and are being culling because they are 'dynamic objects' moving through target areas. The reason we've put culling areas (with target areas enabled) around every room is because there are moving objects that do need to be culled in every room.
I would just like to exclude the main character and the HUD elements from the Occlusion culling system altogether. Is this possible with layers or a script or something similar or am I doing something completely wrong? In Unity 1.7 I tend to put target areas around each moving object but since these are now combined into one occlusion box I don't know if that's the right solution.
Though I've tried to do the same as with Unity iPhone 1.7 placing target areas around individual moving objects and the problem remains. I haven't got a clue what is going wrong.
For the information:
We're working with the pro versions of both Unity 3 and Unity 3 iPhone on Mac Os X 10.6.4.
If anyone else is experiencing these problems or know a possible solution I would love to hear it.
Thanks!
I have the same issue. That's why i can't use new Unity 3.0
Answer by Dreamora · Dec 27, 2010 at 05:42 AM
Target Areas and View Areas are still there, but now as checkboxes on the area you place through the occlusion editor window.
And no the OC does not respect any kind of layers, but and thats a big but: from what I recall its bound to the camera you mark as "Main Camera" (it at least used to be, not retested in 3.1 yet), so a camera that is meant to not occlude could just be marked as not the main cam and render.
But yes that won't solve the blinking which is a rather annoying bug and has lead to little anger explosions every now and then cause its totally undefineable whats causing it. What I'm rather confident is that translucent objects are definitely fucking it up if you happen to mark them static.
Also don't do "I can look in from the backside" tricks to look into a room from the top if the room had a roof, thats by experience also making it worse
Thanks for the explanation Dreamora,
We've managed to fix it last week. It indeed had to do with some backface culled and translucent objects. When scenes get complex you start to think the problem can be in anything :) I'll mark your answer as the solution as that will be the problem in most of these cases I think.
Cheers
Answer by Acreates · Mar 12, 2017 at 06:07 PM
I found this bug as well caused by OC. When I cleared OC, the shadows appeared correctly. I noticed the trees were always ok, probably because they use a different system.