Using Occlusion Culling To Improve Performance

In Unity

As we create larger spaces in our projects, we inevitably end up with more objects to be rendered. Occlusion Culling, allows us to prevent the rendering of Game Objects that aren’t in the camera shot, or occluded by other objects.

This is done, by generating data from the Scene within the Editor, to then use on the camera at runtime. To do this, we need to open our Occlusion Culling window, found within Window > Rendering, which then allows us to access three different tabs.

Occlusion Culling Window

The first tab, allows us to discern what data we want to bake, whether it be everything, certain meshes, or defined areas.

Next, we can change parameters if need be, this tends to be needed when we have smaller objects or windows/holes through to other areas.

Lastly, is the visualization tab. This allows us to select our camera to see what data is being rendered within our scene, which can be great to confirm it’s working, and also to work out any flaws that may need readjusted.



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