The Power of Light Probes in Unity
How to have baked lighting bounce onto dynamic game objects!
Have you wondered why your player, or dynamic game object, does not receive the lighting from a baked light source? Here’s why!
I have a capsule that is dynamic and does not receive any direct baked lighting. The image below shows the moving capsule that should receive the red-baked light source on the right. Let's fix it!
What are Light Probe Groups?
Light probe groups are a mesh of light sources that emit light unto dynamic objects. They are invisible in game-view but work behind the scenes to ensure that any dynamic objects receive proper lighting. They must be scattered around the scene for best results.
You’ll have a better idea within the next several steps.
Let's begin setting up our light probe group! Go to GameObject > Lights > Light Probe Group.
A group of spheres will be created and it should look like the image below. These spheres will interact with dynamic game objects and light them up when necessary.
We want to make sure that the bottom spheres are about knee-high from the scene. I like to center my light probe groups to the middle of the scene. It makes selecting and duplicating the spheres around easy.
Once you have it placed in your scene, we need to start scattering them around. To make it even easier, we’ll scatter them from the top view.
With our light probes selected, we need to click the edit button.
Let’s start selecting a couple of spheres, then hit CTRL-D to duplicate, then move them into a position.
The idea is to fill the whole scene for maximum coverage like the image below. Edit: My player is the only dynamic game object in the scene so it does not make sense for me to have layers of light probes above the player. Something to think about!
You will start seeing automatic results if you have “Auto Generate” ticked for generating the lighting in the Lighting Panel: Window > Rendering > Lighting.
Or just click on “Generate Light” to start generating the lightmap data to its current changes.
As you can see in the image below, my dynamic capsule receives lighting from baked light sources!
The image above shows how the light probe group is working behind the scenes!