Visibility and hidden geometry
Unity Occlusion Culling: Setup, Debugging and Performance Checks
Set up baked occlusion culling, inspect what the camera can see, and test whether hiding blocked objects improves your actual workload.
Screenshots: Unity 6000.0.62f1 · URP 17.0.4 · macOS Metal. A small demonstration scene illustrates the controls and rendering mechanisms. Editor timings are not device benchmarks. Click any screenshot to enlarge it.
Choose a scene where blocked visibility matters
Frustum culling removes objects outside the camera's view volume. Unity occlusion culling can additionally remove objects hidden behind other geometry inside that volume. Rooms, corridors and substantial walls often provide useful opportunities. An open vista with little blocked content may save much less rendering work.
Unity's built-in baked workflow uses static scene geometry to build visibility data. Runtime visibility tests and that data have CPU and memory costs, so the useful question is whether the avoided rendering work pays for them. Review the occlusion culling overview, then start with one representative scene and camera route.
This tutorial's scene places static targets behind a large opaque wall. It demonstrates configuration and a completed bake. It is deliberately small and does not establish the benefit for a production level.
Step 1: identify occluders and occludees
Open Window > Rendering > Occlusion Culling and select the Object tab. Select an immovable opaque wall or another suitable blocker. Enable Occluder Static for geometry that should contribute to the bake. Enable Occludee Static for suitable static renderers that can be hidden.
The flags express different roles: blocking visibility and being hidden. A static wall can do both. Avoid selecting every object and marking every static option merely because the scene is slow. Transparent surfaces, small props and objects that move are poor blanket occluder candidates.
Doors deserve special attention. Baking a movable door as an immovable blocker can make the visibility data inconsistent with an open doorway. Test the space with the door's runtime states in mind and keep the baked blockers faithful to the permanent structure.
For an occluder with LODs, review the shape across its levels. Unity uses the highest-detail representation for its static occluder bake; large silhouette changes can make visibility expectations inconsistent. Unity's setup guide describes eligible geometry and flags.
Step 2: check the actual camera and dynamic renderers
Select the camera used by the player. In its Inspector, enable Occlusion Culling; in this URP version it appears in the camera's Rendering section. Check each camera that matters. A correctly configured main camera does not prove that a second camera or a different rendering pass excludes the same work.
Moving objects can be runtime occludees. Inspect their Renderer's Dynamic Occlusion option when they should disappear behind baked static blockers. They do not become baked occluders just because they are large or opaque. Unity explains this distinction in culling moving GameObjects.
Keep effects such as through-wall outlines in mind. A renderer deliberately visible through walls may require different behavior from ordinary geometry. Resolve that as an effect-specific decision instead of applying one setting indiscriminately.
Step 3: bake visibility data with scene-scale parameters
Switch to the Bake tab. Start with the defaults, then click Bake for the prepared scene. Inspect completion and data availability before assuming the camera has usable occlusion data. A flag change by itself does not update a previous bake.
Use the parameters to express the geometry the bake must preserve. Smallest Occluder concerns potential blockers, while Smallest Hole concerns openings that should remain visible through. Smaller values can increase precision, bake work and data size. Backface Threshold influences which regions are treated as reachable. Do not lower it blindly to make a bake smaller.
Check the scale of walls, openings and playable space before tuning. Preserve windows and passages the player can use. For a particular traversable region, investigate an Occlusion Area rather than assuming that all camera positions have equal importance. The Occlusion Culling window reference describes these controls.
Rebake after relevant static geometry, flags or scene-layout changes. For additive loading, plan the scene combination and its visibility data explicitly; a successful single-scene bake is not a guarantee for every loaded combination.
Step 4: inspect visibility along the camera route
Keep Scene View and the Occlusion Culling window visible. Select the gameplay camera and open Visualization. Move the camera through representative positions and inspect what remains visible. The Scene View visualization is based on the selected camera, which may differ from the Scene View's own viewpoint.
Check corners, windows, narrow gaps, large bounds, interior-to-exterior transitions and camera positions near walls. Look for both kinds of failure: objects that remain visible unnecessarily and objects that disappear when the player should see them.
After changing the layout, compare the visualization against a fresh bake. Do not explain stale-data behavior by adjusting unrelated material or camera settings. If visibility is incorrect, validate flags and geometry first, then adjust one bake parameter at a time.
Step 5: compare the saved work against the added cost
Record the same target-device route with a baseline and a controlled occlusion comparison. Keep resolution, Quality Level, scene state and camera motion identical. Inspect CPU/GPU timing where available, submitted work and memory. Disable diagnostic visualization and Frame Debugger during the timing runs.
Inspect actual frame events when you need to confirm why a renderer is still contributing. Shadow maps and other cameras can have different visibility needs. Removing an object from one camera's color view does not prove that all of its rendering work disappeared.
Use a route with genuine opportunities for blocking and another with an open view. A feature can help one location while adding cost elsewhere. Keep occlusion when the measured trade-off and visual correctness fit the intended levels, rather than adopting it as a blanket optimization.
Common occlusion culling problems
| Symptom | Check first | Next step |
|---|---|---|
| No hidden geometry is culled | Bake availability, camera setting and static flags. | Inspect one clear wall-and-target case in Visualization. |
| A moving object remains visible | Renderer Dynamic Occlusion and whether the blocker is baked. | Verify that specific renderer and static wall. |
| Objects disappear through a window | Opening scale, bake settings and stale data. | Preserve the opening and rebake before testing again. |
| An open door hides the next room | Whether the moving door was baked as static. | Correct the blocker setup and validate runtime states. |
| Work falls but frame time rises | CPU visibility cost, data and the original bottleneck. | Compare representative routes and keep the better total trade-off. |
For visible distant objects, continue with LOD optimization. For submission problems that remain after visibility checks, use draw calls and batching.
Frequently asked questions
What is the difference between frustum and occlusion culling?
Frustum culling excludes objects outside a camera's view volume. Occlusion culling can also exclude objects inside that volume when other geometry blocks them from the camera.
Can moving objects use Unity occlusion culling?
Moving objects can be runtime occludees when their Renderer's Dynamic Occlusion is enabled. Unity's baked occlusion system does not use moving objects as baked occluders.
Why does Unity occlusion culling not work?
Check that data was baked for the loaded scene setup, suitable walls have Occluder Static enabled, the camera uses Occlusion Culling, and the selected renderer is eligible to be culled. Then inspect the camera in the Visualization tab.
Is occlusion culling useful in an open world?
It depends on how much work substantial occluders hide along real camera routes. A mostly unobstructed vista may save little while still adding visibility-test and data costs. Measure representative locations rather than enabling it by scene size alone.
Should every object be marked Occluder Static?
No. Choose suitable opaque, immovable geometry that blocks visibility. Small props, transparent surfaces and movable doors are poor blanket candidates. Static flags describe promises about the content, not general optimization switches.
Sources and version notes
Official Unity 6.0 documentation, checked October 4, 2026. Match the documentation version to your project.
Continue the investigation · A 7 Wolves tool
Investigate the geometry around a difficult camera view
GPUSight's maps and grouped workload help locate geometry and coverage contributors. Its investigation signals complement Unity's baked occlusion visualization; they do not prove that Unity has culled an object or measure its individual GPU time.