Starting the precompute process

Checked with version: 5.5

-

Difficulty: Intermediate

To generate a lighting solution using Precomputed Realtime GI, we must initiate the precompute process. For this to begin, we must have at least one object marked as Lightmap Static in our Scene.

Organizing and grouping GameObjects within the Hierarchy view makes it quick and easy to select GameObjects for inclusion in the lighting precompute. There are numerous strategies for organizing the hierarchy of GameObjects. Discussing these different strategies in detail is outside the scope of this tutorial. However, what is important is to understand that having some scheme for organizing GameObjects will greatly improve productivity when making repeated selections in the Scene.

In our example Scene, we have organised our GameObjects into classifications underneath a parent object called Environment. This group contains all the visible, static MeshRenderers which make up the environment of our Scene. Underneath this we have sub-groups of objects which have similar characteristics in terms of size or topology.

Grouping of objects within the Scene hierarchy can help when making repeated selection of objects.

It is most efficient to begin by applying lighting settings in broad strokes and then progressively refine the details as we move forwards.

Select the Environment GameObject.

In the Inspector window, check the box marked Static

When asked if you wish to enable the Static flags of the child objects as well, select Yes, change children. Doing this ensures the GameObject and its children will receive the Lightmap Static flag. They will then be included in the lighting precompute.

Now that our Scene has some Static GameObjects, we can begin the precompute process.

Open the Lighting window (Window > Lighting) and then select the Scene tab.

Ensure that the Auto checkbox is checked. The Auto checkbox can be found next to the Build button, which will be greyed out if the Auto checkbox is checked.

The precompute process will now begin. The progress of the precompute process is shown in the bottom right of the Unity Editor and is represented by a blue progress bar. The current task (written as x/xx) and the number of jobs remaining in that task are displayed within the progress bar.

If the Auto checkbox is not enabled, the process can be manually initiated by clicking the Build button. When working through this tutorial, it is recommended that Auto mode is left on.

Progress bar showing the current task, remaining tasks and remaining jobs of the precompute.