Light Probes in Unity
When, why and how to use light probes
We got a security desk asset and it has no light sources. The monitors are glowing using emission.
The flying cube is using emission only (set to high value) and not an actual light source. The sphere will be our dynamic object. This could later be a walking guard for example.
What we want is when a dynamic object comes close to one of our emission light sources that the light is projected onto our dynamic object. See how emission lighting affects our sphere when it’s moved.
To do this we use light groups. This only works after the lights are baked by unity. When we move our cube you see the light stays. After that unity starts baking real time and the light is baked at the new position.
Light Probe group
The reason the sphere is lighted properly is because of the light probes. Below is an example of a light probe group for this specific area.
These probes are a coordination of lights that use baked/static lighting information to relay that onto dynamic objects.
This is much more performance friendly than multiple dynamic lights
and matters especially on mobile applications.
Create a Light Probe Group
In the Hierarchy panel > R-Click > Create > Light > Light Probe Group
Anywhere where we want static light data be shared we place these yellow balls around. We can select the balls duplicate them and place many light probes. Notice how the location of the probes affects how the sphere is lighted.
There’s a lot of optimization possible by placing only necessary light probes.
Bonus info: Light Settings — Progressive VS Enlighten
Window > Lighting > Settings
Progressive means it bakes realtime and you can see changes immediately
(prioritize view means it bakes the part you are looking at first). This is seen when we moved our cube and the light followed after.
Enlighten means you need to bake first before seeing the changes.
You can see the progress in the bottom right