One of the features I had never seen before Unity was a feature called Light Probes. These are represented by spheres in your scene, which sample the nearby light and project it onto dynamic objects as they move between them. So what are these things and why do we need them?

With Light Probes we can turn this…
…into this (note the green bounced light on the sphere)

This is kind of a subtle effect perhaps, but that’s what you get when working with lighting.

First off, you won’t see this by default if you just start dragging primitives around in the Unity editor. By default you’ll be using fully dynamic lighting which does all this magic in real time. That isn’t very performant though, so if you’re going to make a visually complex game, you’ll probably want to change our light mode.

For this we want ‘Mixed’ on all our lights

Realtime lighting is what it sounds like, Baked lighting is fully pre-baked with no changes, and mixed gives us the effects of Realtime lighting only on our dynamic objects. Once we select Mixed then, we also have to go around to all the objects in our scene and mark them as Static if they’re not going to move.

Once all this is set up, light probes come in. Basically they need to go anywhere you want to sample the light, so that it can be applied to nearby dynamic objects based on their proximity. To place them just create a light probe cluster in your scene and go to Edit in the Inspector. From there you can drag the spheres around and duplicate them, creating a mesh of connections as large as you need.

The more probes the more accurate your lighting transition will be, but try not to use more than you need.

Once you have your light probes in place, and once you’ve baked your lighting, you will be able to see which light probes your dynamic objects are sampling from as you drag them around your scene.

This visualizer helps to show how your dynamic lighting is working. Each light probe sphere shows the lighting sample it is passing on to your dynamic object, and the distance between the probes is the weight of the interpolation between each of them

And that is really all there is to it. Nice real time lighting effects for dynamic objects, without the performance cost of rendering the lighting for the entire scene in real time. You can of course also mix baked and realtime lights into your scene along with mixed lighting for your main light source. It’s all up to you on what your game needs and how concerned you are with performance.

Game developer with over 12 years of experience, mainly focused on MMOs.