Occlusion culling and Near Clipping Plane conflict

Fenda

New member
When baking occlusion culling, the Near Clipping Plane value needs to be set higher than 0.01 (around 0.2/0.3 seems to works best) or you will get clipping issues when near to walls (i.e. occluders).

Looking at this gate, everything is OK:

gateOK.png

Moving head towards the wall, everything is not OK:

gateNOTOK.png

If you view in scene view you'll also see the camera is clearly located still inside the room.

So this is what happens when upping Near Clipping Plane to 0.3:

nearclip.png

The occlusion issue is fixed but, understandably, if the wall is too close to the camera then you will now see through it.

Setting the capsule colider on Nolan to some ridiculous value does solve both the issues, but then the character can never get anywhere near the walls. I tried playing around with the "Look Offset" and "Look Down Offset" values on the Camera Controller but they seem to make a difference to the issue.
 

Justin

Administrator
Staff member
Are you running the latest version of the controller? If so, did you change any of the occlusion settings? I just went to that location and things seemed to function properly.

If you increase the Smallest Occluder it should fix that situation.
 

Fenda

New member
@Justin We're on 2.1.4 and locked down our vendor packages against any more updates as we're somewhat nearing release.

Have the occlusion settings been changed since 2.1.4? I see:
  • Smallest occluder: 5
  • Smallest hole: 0.25
  • Backface threshold: 100
I used the demo scene above as an example where this happening but its also happening in our own scene with different prefabs. The smallest occluder is 2 in our scene, because the size of our walls are 2x2 metres and so we want them to occlude things behind them correctly.
 

Justin

Administrator
Staff member
In prior versions the demo scene didn't have any occlusion baked in but we added it in 2.1.6. Sarah went through and marked different objects occluder/occludee static and we haven't noticed any scene objects popping in/out where they shouldn't be.
 
Top