Why Occlusion Culling Improves Performance

Objective: Turn on Occlusion Culling in our project to improve performance

Occlusion culling is a process that prevents Unity from performing rendering calculations for GameObjects that are entirely hidden from view by other GameObjects.

When objects are out of the Camera's view Unity does not waste the resources needed to render those GameObjects.

Occlusion culling only works on GameObjects that are static or dynamic with the tag switched on to be viewed as static.

To set the tags, I will select the Objects in the Hierarchy then select the drop-down on the Static tag and choose “Occluder Static” and “Occludee Static”

Set Static Tag

Once the Tags are set, we will need to Bake the Occlusion data. This is done in the Occlusion tab under the Bake option. For this project, I will just use the default settings.

Baking Occlusion

To Visualize the Occlusion Culling, we need to select Visualize in the Occlusion tab. Now when the Camera is moved, only the Objects in the Camera's view are rendered.

Happy Coding!!!

--

--

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