Summary - Precomputed Realtime GI
Checked with version: 5.5
Like so many aspects of game development, optimizing Scene lighting is about finding the right balance between desired visual result and performance cost. In many cases, it is worth sacrificing a small amount of lighting fidelity in exchange for reduced precompute times and improved run time performance.
Our tutorial Scene with a nighttime lighting treatment applied. Following our initial precompute, no further precomputation was required while generating an alternative lighting solution. This would be impossible with ‘traditional’ baked lightmapping techniques.
In this tutorial we have:
Explored how to evaluate our Scenes to make appropriate decisions about lightmap resolutions for Precomputed Realtime GI.
Learned that one of the most costly elements in lighting precomputes is the number of Charts in our Scene, and examined a number of techniques that can reduce Chart counts.
Set up efficient Light Probes volumes for use by small props and debris-type objects.
Looked at how adjusting the parameters of Unity’s Precomputed Realtime GI unwrapping algorithm can help it make better decisions about stitching lighting UVs, therefore reducing the Chart count.
Explained what Clusters are, how they are used to calculate global illumination in Unity and how they can affect lighting performance.
Experimented with using Lightmap Parameters to fine tune resolution and lighting fidelity for objects within the Scene, reducing the precompute costs of objects that are less visually important.
Employing all of these techniques together should enable you to create production-quality lighting results in your Scenes with minimal precompute times. Combining this with the ability to quickly iterate on lighting with realtime updates to GI, plus the ability to change bounced lighting at run time, it quickly becomes apparent how Unity’s Precomputed Realtime GI can be an attractive option for many realtime applications.
For further reading, please see the ARM Guide for Unity Developers here.