Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Occlusion Culling issue: objects behind occluder are visible

Discussion in 'General Discussion' started by hardartcore, Sep 25, 2020.

  1. hardartcore

    hardartcore

    Joined:
    Jan 27, 2017
    Posts:
    43
    Hi,

    I've have an issue with the occlusion culling in Unity inside my level.
    When the first time level is loaded most of the objects which are not visible are actually rendered.
    Here is an example of my scene.



    After rotating the camera it starts to hide some of the objects but still not all of them.




    All the walls are set as: Occluder Static / Occludee Static and I was hoping this will not draw the objects behind the walls since they are not visible at all inside the GameView.

    Any suggestions how to fix this issue?
     
  2. MDADigital

    MDADigital

    Joined:
    Apr 18, 2020
    Posts:
    2,198
    Umbra is complete utter S***, but have you baked it? Otherwise it's just view frustum culling
     
  3. hardartcore

    hardartcore

    Joined:
    Jan 27, 2017
    Posts:
    43
    Yes, it's baked (it shows the latest baked size on bottom right corner of the screen) version and I am using the latest Unity version. Not sure if I switch to LTS version will have any difference.
     
  4. Aviryx

    Aviryx

    Joined:
    May 30, 2020
    Posts:
    97
    You don't mention anything about your bake settings smallest occluder size. Maybe that could be the issue? (For example if it's set to 5 then any objects that are 4 meters or smaller will not occlude other objects)

    123.png

    The reason I say this is because it appears absolutely no culling has been done (not even volume calculations) as you should see something like this in the scene view.

    556.png
     
  5. hardartcore

    hardartcore

    Joined:
    Jan 27, 2017
    Posts:
    43
    Actually I was experimenting a lot with those values to check the result which will best suit me. I think the screenshots attached are taken with those values:
    Smallest occluder: 2
    Smalest hole: 2
    Backface threshold: 100

    Tried lowering the smallest hole to 0.1 or make it to 5, tried changing the smallest occluder, but with no luck.