Search Unity

Occlusion Culling - Dynamic OFF Why?

Discussion in 'General Graphics' started by drndfx, Dec 6, 2020.

  1. drndfx

    drndfx

    Joined:
    Jul 3, 2013
    Posts:
    89
    Hello,

    I have an object with LOD setting on the scene. I made sure "Static" and "Dynamic Culling" is checked OFF.
    But when I bake the Occlusion Culling, the object is being affected and disappears.

    I know Unity's "Frustum Culling" is called by default but I turned OFF the Dynamic Culling manually.
    What else could it be?

    Please see the attached image.
     

    Attached Files:

  2. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,277
    You turned off Dynamic OCCLUSION Culling, not frustum culling. I don't know if it's possible to disable frustum culling, what is the purpose in doing that?
     
  3. drndfx

    drndfx

    Joined:
    Jul 3, 2013
    Posts:
    89
    How's an object being occluded when
    "Static" is unchecked?
     
    Last edited: Dec 19, 2020
  4. drndfx

    drndfx

    Joined:
    Jul 3, 2013
    Posts:
    89
    I wanted one object to not be affected by Occlusion Culling. How do I do it?
     
  5. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,277
    what you're seeing in that image is not occlusion culling. I know it's confusing, but when you look at that camera mode it shows both occlusion and frustum culling. Frustum culling culls by not rendering meshes outside the view frustum, this is builtin and automatic. I don't think there's a way to avoid it actually. And I'm not sure why you'd not want frustum culling.
     
  6. drndfx

    drndfx

    Joined:
    Jul 3, 2013
    Posts:
    89
    Thank you.

    The thing that bothers me most is that (see the attached screenshot).
    - Only the bigger cube is set as static.
    - When I move the camera all three cubes disappear on scene view and only when I have the Occlusion tab open and have something baked.
    - On normal scene view when I move the camera all three cubes are visible all the time without Occlusion tab open.
    How can I trust Unity is really doing occlusion culling?
    The camera dropdown next to the Gizmos on the Scene tab has Occlusion Culling checkmark turned off. Even if I turn it on it doesn't make a difference.
    Is this some kind of bug?
     

    Attached Files:

  7. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
  8. drndfx

    drndfx

    Joined:
    Jul 3, 2013
    Posts:
    89
    Thank you for the Frame Debugger suggestion. I'll look into it.