My journey becoming a Unity game developer: Make a game look beautiful-URP & Occlusion Culling
Objective: Use Occlusion Culling on the Control Room to improve runtime performance for the CPU or GPU. This ideal for smaller rooms with hallways or corridors that the player will be entering into or exiting from.
Unity describes Occlusion Culling is a process which prevents Unity from performing rendering calculations for game objects that are completely hidden from view by other game objects. This process can improve the runtime performance of our project by preventing wasted rendering operations for both the CPU and GPU on objects that aren’t in the camera’s view. https://docs.unity3d.com/Manual/OcclusionCulling.html
To open the Occlusion Culling tab, select Windows->Rendering->Occlusion Culling. There are 3 tabs that Occlusion Culling uses which are Object, Bake, and Visualization. Object tab allows us to click the All, Renderers, and Occlusion Areas buttons to filter the contents of the Hierarchy window. The Bake tab allows us to fine-tune the parameters of the Occlusion Culling bake process. Visualization allows us to see updates in the Scene view to show the effects of Occlusion Culling from the perspective of the selected Camera. https://docs.unity3d.com/Manual/occlusion-culling-window.html
To have Occlusion Culling work on the Main Camera, select the camera and turn on Occlusion Culling under Rendering.
Next, we need to select all objects that will be immovable in the scene, which in this case will be the Floors, Walls, Columns, Ceilings, Doorway, and Terminal game objects. In the Inspector, select the Static drop-down list and select Occluder Static and Occludee Static. Plus, select their children for these objects to be declared static in the camera’s view.
In the Occlusion tab, open the Bake tab, select the Main Camera which the occlusion will be used on, and click the Bake button.
In Scene view, move the Main Camera around to see the Occlusion Culling effects in action.
Another way to setup Occlusion Culling on the static game objects is to have all of the static objects selected, go to the Static drop-down list, and select the Everything setting. Then, turn off the Contribute GI setting as this will keep Unity from including the target Mesh Renderer in Global Illumination
calculations. Move the Main Camera in the Scene, and see the Occlusion Culling effects.