TA Toolbox Home / TA Glossary

Occlusion Culling: Principles, Implementation, and Performance Optimization

2026-08-24

What is Occlusion Culling

Occlusion culling is a rendering optimization technique that determines whether an object is completely blocked by other opaque objects before rendering. If invisible, the object is skipped, reducing draw calls and GPU load. Unlike frustum culling, which only removes objects outside the view, occlusion culling handles objects hidden by others.

Principles of Occlusion Culling

Occlusion culling often relies on depth buffers or spatial data structures. Common methods include:

  • **Hardware Occlusion Queries**: Use GPU queries (e.g., D3D's ID3D11Query) to test whether an object's bounding box passes the depth test; if not, it is occluded.
  • **Software Rasterization**: CPU rasterizes occluders into a low-resolution depth buffer, then tests object bounding boxes.
  • **Hierarchical Z-Buffer**: Maintain a pyramid depth buffer for fast bounding box visibility tests.
  • **Portal Culling**: Suitable for indoor scenes, propagating visibility through doorways.

Game engines often use conservative bounding boxes (e.g., AABB) to reduce computation.

Application in Engines

  • **Unity**: Uses Umbra middleware for occlusion culling. Requires baking occlusion data in Window > Rendering > Occlusion Culling (setting occlusion areas, static objects, etc.). Runs automatically at runtime.
  • **Unreal Engine**: Enables occlusion culling by default, combining hardware queries and software rasterization. Can be controlled via `r.EnableOcclusionCulling`.

Considerations for Occlusion Culling

  • **Dynamic Objects**: Occlusion culling has limited effect on dynamic objects; it is typically efficient only for static objects.
  • **Baking**: Unity's occlusion culling requires baking the scene; modifications require re-baking.
  • **Granularity**: Usually works on objects or components; too large or too small affects effectiveness.
  • **Mobile**: GPU queries may be expensive; simplified methods like precomputed PVS (Potentially Visible Sets) can be used.

Comparison with Other Culling Techniques

  • **Frustum Culling**: Culls objects outside the view; the most basic culling.
  • **Backface Culling**: Culls triangles facing away from the camera, done automatically by hardware.
  • **Occlusion Culling**: Culls objects hidden behind others, further reducing rendering load.

In practice, all three culling techniques are often combined.

Frequently Asked Questions

What is the difference between occlusion culling and frustum culling?

Frustum culling removes objects outside the view; occlusion culling removes objects hidden by other objects.

How to use occlusion culling in Unity?

Mark objects as Occluder Static or Occludee Static, then bake in the Occlusion Culling window.

Does occlusion culling help mobile performance?

Yes, but mobile may use simplified methods like precomputed visibility (PVS).

Can dynamic objects be occlusion culled?

Yes, but typically using hardware queries, which may be costly. Some engines use conservative culling for dynamic objects.

Can occlusion culling cause false culling?

If the algorithm is too aggressive, it may incorrectly cull visible objects. Therefore conservative tests, like using bounding boxes instead of precise meshes, are common.

FAQ

What is the difference between occlusion culling and frustum culling?

Frustum culling removes objects outside the view; occlusion culling removes objects hidden by other objects.

How to use occlusion culling in Unity?

Mark objects as Occluder Static or Occludee Static, then bake in the Occlusion Culling window.

Does occlusion culling help mobile performance?

Yes, but mobile may use simplified methods like precomputed visibility (PVS).

Can dynamic objects be occlusion culled?

Yes, but typically using hardware queries, which may be costly. Some engines use conservative culling for dynamic objects.

Can occlusion culling cause false culling?

If the algorithm is too aggressive, it may incorrectly cull visible objects. Therefore conservative tests, like using bounding boxes instead of precise meshes, are common.