Search Unity

Bug Occlusion culling does not work unless camera is at a perfect right angle to occluder surface

Discussion in 'General Graphics' started by ebaender, Aug 30, 2022.

  1. ebaender

    ebaender

    Joined:
    Oct 29, 2020
    Posts:
    97


    As you can see the camera is in the other room separated by a solid wall with no holes, but the visibility lines go straight through it if you don't look at it at a perfect right angle, which leads to a ton of expensive dynamic objects being rendered that are nowhere close to being visible.

    I already tried adjusting the the occlusion baking parameters, tried baking with a custom occlusion area and without it, tried different meshes and a closed occlusion portal as a proxy for the wall to see if the mesh is the problem, but none of that makes any difference.

    This can't be a hard limit of the occlusion system, right? I read the manual pages about occlusion, it didn't say anything about the camera having to face every occluding surface at a perfect right angle, that would make it near useless.
     
  2. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,074
    Dynamic objects are problematic, I would not trust unity's occlusion culling with dynamic objects.
     
    ebaender likes this.
  3. ebaender

    ebaender

    Joined:
    Oct 29, 2020
    Posts:
    97
    In what am I supposed to trust then, Unreal?

    I don't know what else to do other than writing some makeshift occlusion system that disables the renderer component based on the player entering and exiting trigger colliders which I then have to place and configure everywhere, and that sounds like a ton of brain-numbing work that should not have to be done in the first place. That's what the engine is for.

    It's not even just dynamic objects, unless I set the minimum occluder size to something stupid like .1 even though the occluder mesh with the wall is 10x5x4 almost every static objects in that room doesn't get culled either because the camera is still looking straight through the wall as far as the occlusion system is concerned.
     
  4. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,074
    If you create a cube with default material and with the size of this lit objects, and put it on those shelves is it still going to be not occluded ?