Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. Dismiss Notice

Help Wanted Dynamic Occlusion Flickering in Unity 2020.3.1f1 LTS

Discussion in 'General Graphics' started by ForemanDesigns, Mar 27, 2021.

  1. ForemanDesigns

    ForemanDesigns

    Joined:
    Feb 4, 2018
    Posts:
    14
    Hello!

    When I upgraded my project from Unity 2019.4.16f1 to 2020.3.1f1 LTS, dynamic occlusion no longer functions properly. I am using URP and it is a VR project. When I look in certain directions, some meshes flicker or disappear. If I turn off dynamic occlusion on an individual mesh, then that mesh no longer flickers so I know the issue is related to dynamic occlusion. I don't consider turning off dynamic occlusion to be a "fix" - I need it for performance reasons.

    Video:


    This issue did not occur in Unity 2019, and began as a direct result of upgrading the project to 2020.3.1f1 LTS. Re-baking occlusion in the scene does not help at all.

    Does anyone know how to fix this issue? Any help is greatly appreciated!
     
  2. ForemanDesigns

    ForemanDesigns

    Joined:
    Feb 4, 2018
    Posts:
    14
    I was able to track down and fix the issue. It turns out newer versions of unity don't like it when you have the camera far clip plane set too high. It seriously screws up Unity's dynamic occlusion raycasting when the camera is facing certain angles.

    Here's before i fixed it. The camera's far clip plane is set to 100,000 units:
    OcclusionCullingFarClipPlane100000m.png

    And here it is with the far clip plane set to a lower value of 10,000 units:
    OcclusionCullingFarClipPlane10000m.png

    I had it set very far because I had some distant geometry in one of my scenes. I didn't think it mattered how far I set it, but in newer versions of Unity, apparently it does.
     
unityunity