As you begin to utilize lighting in your games and create more complex scenes with intricate lighting setups, you’ll search for greater and greater ways to optimize and more importantly polish your setups. To save on performance it is often critical to bake lighting, this essentially creates a light map of static objects in your scene rendering the light once (as opposed to all the time) and baking into the object. However when it comes to non-static or dynamic objects that poses a problem, they can’t be light baked because they constantly move. This is where light probes really shine.
Probes at their core they provide info about light passing through the empty space in your scene to provide more natural and performant lighting for your dynamic objects, the more complex lighting, the more probes you generally need. These are represented as web of spheres used as a data point to sample light in that area. It is recommended that when using probes to spread them out as they can make object appear brighter if clustered to closely in a single area to the sampled light and it appears unnatural as the blending between points is too small to notice. So how do you use them in your scenes?
Create a simple scene with two point lights, a plane, and sphere. Set your point lights to mixed mode so that we get some nice baked/real-time lighting action. Offset them a little bit above the sphere and plane like so.
Next drop in a few light probes by right clicking the hierarchy and selecting Light > Light Probe Group duplicate a few cluster them tightly around one of the point lights.
Now go to the lighting tab in the inspector click New Lighting Settings (you can learn about all these settings here) and hit Generate Lighting at the bottom.
Now move the sphere in the scene, you should see a subtle but important difference in the lighting. For starters it will be much much brighter in the cluster of light probes as they are sourcing that light data and spreading it out in a tight spot.
Here’s the same area without light probes
Pretty drastic difference. Now let’s see when we spread the light probes far and wide like so.
Lot more subtle distribution of light. If you don’t notice any changes make sure you’re baking light after adjust the light probes or setting it to auto-generate. Hopefully this was a short but informative article of light probes, this but scratches the surface of their capabilities but even with this very very basic implementation you can see a real improvement in a scene’s lighting. Until next time, happy coding.