Occlusion Culling: Limited range?

Hi guys,

I’m starting to learn occlusion culling, and I put together a small test scene with a camera and 2 cubes as shown in the image below. The yellow cube is larger than the blue, and all 3 objects are centered on the x-axis.

Yellow cube:
(X,Y,Z) = (0, 0, 0)
All rotation angles = 0
Scale = (1, 1, 1)

Blue cube:
(X,Y,Z) = (1,0, 0)
All rotation angles = 0
Scale = (0.2, 0.2, 0.2)

Camera:
(X,Y,Z) = (-3, 0, 0)
Rotations (X,Y,Z) = (0, 90, 0)

The 2 blocks are meant to be static in gameplay, and so I marked them both as static Everything. As you can see in the camera preview, the blue cube is fully occluded from the camera by the yellow cube.

To test that culling would work, I

  1. Enabled occlusion culling on the camera.
  2. Opened the Occlusion Culling Window and set the baking params to smallest occluder size = 0.99 (smaller than the yellow cube), smallest hole = 0.25, and backface threshold = 100.
  3. Clicked Bake
  4. Opened the visualization tab

What am I expecting / hoping for?
That Unity would cull the blue cube, since it is well occluded by the yellow.

What is actually happening?
Culling doesn’t happen. Here is the scene viewer with the rectangles that show up after baking (I don’t really understand what they mean. An explanation would be appreciated)

If I move the camera closer to the yellow cube, the blue cube starts to get culled when the camera is at around X = -0.794).

My questions are:

  1. Can Unity, in principle, cull the blue cube for any camera position and rotation in the scene space, provided the blue cube is fully occluded from the camera?
  2. Are the occlusion window parameters, static settings of game objects, and enabling OC on the camera the only parameters I need to achieve this, or are there other parameters at play?
  3. Why is the blue cube being culled too late in the example scene above?

Thanks in advance for your support!

It’s nice to see that you still haven’t received an answer from the Unity developers. The funny thing is that Umbra is still buggy to this day and it really looks like no one at Unity really knows what to do with its code. And the company that developed Umbra has been merged into Amazon…

1 Like

Indeed, my whole game has gone from 3D to 2D and through countless iterations, and even won an award, and a I still haven’t received an answer! What I learned over the past 3 years is you work 40% on innovating in your game, and 60% addressing platform limitations, misclarities, and compliance integrations. We’re still far from a happy world when it comes to developer experience.

Ill be honest here, i did my own OC tests, and i never use it, hell my terrain streaming system does far better. Alot of us devs dont use OC in Unity, we use other methods.