Why Occlusion Culling Improves Performance

Renato Figueiredo
2 min readFeb 27, 2024

Objective: Learn why setting up Occlusion Culling improve performance.

When we set up Occlusion Culling for our static objects, why does it improve performance ?

First we’ll see just how quick we can setup our objects, then we’ll see why its better for performance.

How to setup your static objects to everything except Contribute GI.

After doing this, we can simply go to our Occlusion window, and bake the changes. Then we can see with our camera, how this works in Realtime.

We can see in Realtime the things that are meant to appear are rendered.

As we can see above, now when we rotate our camera, only the things that are meant to be seen are rendered, which greatly improves the performance of our game, as we render way less things than usual.

The reason why we disabled only Contribute Global Illumination (GI) is that it helps with a couple of things for our performance, such as:
Reduced Lightmap Complexity
Global Illumination involves pre calculating how light interacts with surfaces in the scene and storing this information in lightmaps. When objects are marked as static but set to not contribute to GI, Unity doesn’t need to calculate or store lighting information for these objects in lightmaps.
Faster Baking Times: By excluding certain static objects from contributing to GI, Unity’s light baking process becomes faster as it doesn’t need to calculate indirect lighting for those objects. This can significantly reduce the time it takes to bake lighting for the scene.
Lower CPU and GPU Overhead: With the reduction of calculations related to indirect lighting, more resources from both CPU and GPU can be allocated to other tasks, such as the rendering of dynamic objects, processing physics simulations, or running scripts.
Simplified Light Probe Generation: Light probes are used to approximate indirect lighting on dynamic objects in the scene. By excluding certain static objects from contributing to GI, Unity doesn’t need to generate as many light probes, leading to faster generation times and reduced memory usage.
Optimized Scene Culling: Unity’s occlusion culling system can benefit from having fewer static objects that contribute to GI. Since these objects don’t affect the indirect lighting in the scene, Unity can more efficiently display only objects that are visible to the camera and optimze their rendering.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response