The exercise here demonstrates the effect that could be deployed by using light probes.
Light does two things. It originates and it travels. While it travels, it hits many surfaces all the way before completely vanishing with distance. That is how it really works !
When we are recreating a light’s behavior in Unity, we take care of surface collisions by using lightmaps that stores data about light hitting surfaces. On the other hand, light probes store data about light passing through empty spaces in a scene.
Next question? Which problem it solves?
While realtime and mixed mode lights can cast direct light on moving objects, moving objects do not receive bounced light from your static environment unless you use light probes.
The official answer from Unity is as follows.
Light Probes are positions in the scene where the light is measured (probed) during the bake. At runtime, the indirect light that hits dynamic GameObjects is approximated using the values from the nearest Light Probes to that object.
As visible below, there is a capsule object with a default material. The scene has one directional light and the lighting mode is set to realtime GI.
It is currently placed in the empty space. Both the floor and the adjacent wall are made static.
It can be observed that there is no reflection of either of the sides on the dynamic capsule.
This is not eye pleasing :)
Now, let us add a light probe group in the scene and see what difference it can make.
- Go to the lights option and add a light probe group.
- Use the edit button from inspector to adjust the little nodes as per the choice and extend the probe all the way to the edges of the floor.
Generate light and you should see something resembling to the image below.
The mechanism here is of approximation. If you click on the capsule, you would see all probes that are capturing lights in the space they are hanging in and as soon as a dynamic object passes through that area, they provide a reference of available light in that location.
Unity takes that data & computes light that can be shed on a dynamic object.
Below is another example for better visual clarification.
Here, you can see that the dynamic capsule object is walking past a wall lit with a certain color of spot light. Also, there is a point light instead of direction light in this scene.
Ideally, the entire capsule should receive some sort of light to mimic how real light behaves in this world.
After making the floor and the cube as static objects, I deployed a light probe group.
Here is the end result and one can easily spot the mighty difference it brought to the visual impact.
Hope this helps you getting started with light probes :)
Thank you very much