Occlusion Culling Tutorial – Unity3D


Occlusion Culling Tutorial – Unity3D

You can use occlusion culling to hide unnecessary object for camera. You don’t need the object behind the camera. So, hide it!

!!(This property is free only for Unity3D 5.0 or newer versions.)!!

At first, create a terrain and a cube. Edit the static choices as seen on picture below.

Screen Shot 2015-04-09 at 00.47.49

After that, duplicate the cube and create a world with cubes like this.

Screen Shot 2015-04-09 at 00.41.54
Place the camera anywhere in this world for testing and add a mouse look control script to camera. Open Occlusion Culling window(Window>Occlusion Culling). Click Bake section and click Bake button. The world will be scanned automatically. You can see data size of scanned objects at below.

Screen Shot 2015-04-09 at 00.48.02

 

Click Visualization and press play.

Screen Shot 2015-04-09 at 00.46.51 Screen Shot 2015-04-09 at 00.47.00

 

As you see, your camera angle sees 6 cubes in scene window and camera preview shows these 6 cubes. Other cubes are not deleted, they are hidden and you can see them when you change camera direction.

 

 

©Coffee Break Codes – Occlusion Culling Tutorial – Unity3D

Leave a comment

Your email address will not be published. Required fields are marked *