My journey becoming a Unity game developer: Environment & Lighting-Light Probes

Rhett Haynes
3 min readSep 7, 2021

--

Objective: Using Light Probes to give higher-quality lighting to moving and static objects.

An object moving through light probes dynamically.

The primary use of light probes is to provide high quality lighting on moving objects in the scene. Also, light probes is used to provide the lighting information for static scenery when that scenery is using Unity’s Level Of Detail system.

Light Probe Group added to scene.

To add the Light Probe Group to our scene, go to Hierarchy->Light->Light Probe Group using the “+” sign or right-click inside the Hierarchy.

Let’s add the Light Probe Group around the security gurard’s desk. You will start out with a few light probes to work with. If we need to expand the amount of probes to work with, click on the Edit Light Probes, then select each probe you will need to duplicate and click on the Duplicate Selected button. Keep doing this until you have the right amount of probes to cover the area you need light data calculated for the desired results.

Light Probes manipulated to surround the security guard’s desk.
Selecting Mixed under Light inside of Directional Light.

In Directional Light under Light, select Mixed for Mode. Mixed will allow us to bake static objects to get shadows set in place, and real-time results for objects that are moving through the light probes receiving dynamic results.

We’re going to select the security guard’s desk and the surrounding area objects like the railing, floor, and steps to make them Static objects. This will allow these objects to be baked with Mixed Mode, and we will see shadows from these objects according to the position of the lighting. When objects move past these objects, we should see shadow effects come across the objects consistently because the Static objects are baked in.

Selecting the guard’s desk, floor, and steps to make them Static objects.

Now let’s move the Sphere next to the Security guard’s desk around. As we move around the desk, notice the shadows that comes across the sphere in certain locations near the desk. The shadow become bigger on the sphere when its lower to the desk, but there are no shadows as the sphere moves above the desk. The Light Probes are showing the lighting conditions from each of the tiny spheres.

An object moving through the Light Probes as its baking in real-time.

Here’s another sphere moving through the Light Probes, but this sphere will actually have the Light Probes follow it around making showing the results of new calculations applied.

Sphere moving around with Light Probes following.

If you’re having weird or inconsistent results with the lighting in your Scene, you should turn Auto Generate OFF and manually use Generate Lighting button instead.

Light Probes can make a Scene look more beautiful than using regular lights. Check out a whole scene using one Light Probe Group which will be the only light source used in this scene. This scene has thousands of light probes sharing lighting data so when objects pass through the probes they will be illuminated through emissions using that baked data.

Light Probes used to light up the entire scene.

Light Probe Groups is more efficient than regular lights which can be very expensive to use, especially when making mobile games.

--

--

Rhett Haynes
Rhett Haynes

Written by Rhett Haynes

Learning to become a Unity game developer.

No responses yet