Why Occlusion Culling Improves Performance

Are you looking to have your scene optimized? Occlusion Culling will help with rendering what’s important!

What is Occlusion Culling?

It’s a process that prevents game objects that are not in view, not rendered. In Unity’s terms:

Occlusion culling is a process which prevents Unity from performing rendering calculations for GameObjects that are completely hidden from view (occluded) by other GameObjects.

Now that we have an idea of what it does, let's implement it!

We first need to decide which game objects will be occluded. They have to be static, or if the tags have been switched for “dynamic elements” to be viewed as static.

In my case, I have separated all of my game objects to either be static or dynamic in an empty game object called “ — -STATIC — -.”

With the static game object selected, at the very top right, next to Static status, there is a dropdown you can click. Click on it and select everything. We want Unity to calculate what we want to occlude.

Click yes to the pop-up prompt. We want the children to be everything as well.

Click on the drop-down again, and select “Contribute GI” to be unchecked. Say yes to the pop-up prompt. We want to make sure that the Global Illumination is not occluded so Unity won’t have to recalculate the data.

Open the Occlusion Culling window: Window > Rendering > Occlusion Culling.

We want to bake the Occlusion Culling data from our scene. All of the static game objects will be processed within cells and have their data taken into account for when they can be visible or not.

When I switch between the “Visualization” and “Bake” tabs, you can see that it is working! Game objects that are in front of the camera will only render. You can now see how powerful this is and how it can speed/optimize your game!

Read the documentation over at Unity for more information on Occlusion Culling!





Hello everyone, My name is Gabriel Perez, I am a Unity Developer and a creator who is always learning and experimenting.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Locators Used In Selenium For Object Identification

CI/CD pipeline with GitHub Actions

Computer Science Weekly Blogs

Presenting iDeal.NET

Progress under pressure

7 Popular Cross-Platform App Development Tools That Will Rule in 2020

How to manage Auto Scaling Group and Load Balancer with Terraform?

Scalable Hospitality Platform Reference Architecture with WSO2

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Gabriel Perez

Gabriel Perez

Hello everyone, My name is Gabriel Perez, I am a Unity Developer and a creator who is always learning and experimenting.

More from Medium

What is Cinemachine and Timeline?

Light layers in Unity HDRP

Script Communication in Unity using GetComponent

How to switch between Cinemachine cameras in Unity