The Magic trick that is Occlusion Culling!

addam davis
3 min readJun 9, 2022

--

Objective: Optimize our scenes with Occlusion Culling!

If you look through the game view, there is a lot of elements outside of this view that we simply, don’t care about. In the scene view you can see everything is rendered.

We want to make it so when we are playing our game, we only render the things taht are important and not the things that are not important. This process is called Occlusion Culling.

To open Occlusion Culling navigate to the Window tab > Rendering > Occlusion Culling.

Occlusion Culling only works on elements that are either static, or the tag have been switched for dynamic elements to be viewed as static. We are going to set this so that these objects which are not going to move will now have the tag of static.

Select Floors, Walls, Columns, Ceilings, Terminals. Then, select the drop down next to static and select everything. Select ‘Yes, Change Children’

With everything still selected, press the drop down again and unselect ‘Contribute GI’. We do this because we want theses to have all the effects of a static object minus generating global illumination.

Now, everything in the game view is rendered, however, everything in the scene view is not. If you rotate around the main camera the things that are meant to appear suddenly appear.

This is beneficial for speed purposes of your game because now you’re only rendering half the room and nothing outside the scene which reduces the amount of things that the game has to draw.

Sometimes your game will consider things dynamic when they shouldn’t be. This is because the smallest Occluder setting. If you are getting things taht are big not being included it is because this smallest hole is too high, simply lower it down.

--

--