The Amazing Power of Light Probes in Unity: A Beginners Guide

Dennisse Pagán Dávila
7 min readSep 22, 2022

--

The lighting in a game is often one of the most overlooked aspects of the development process. For a lot of developers, this comes down to a lack of knowledge with regard to lighting and how it affects the player’s experience. Lighting can make or break your game, so it’s important to know how you can utilize lighting to improve your game. One tool that we think you should look into is light probes. How will they help your development? Let’s explore!

Objective: Learn what light probs are, how to use them, and some tips, tricks, and best practices behind them.

Your time is valuable, use this table of contents to get to where you need to be :)

· What are Light Probes?
· Benefits of using light probes
· How to use light probes
For Indoor Areas
For Outdoor Areas
· Tips and Tricks
· Conclusion

What are Light Probes?

Light probes are a recording of the lighting in a particular area, used to recreate that lighting in another part of a scene. The way light probes work is by recording the real-time lighting conditions in the world around the player’s position. The probe basically records the intensity of all the light sources in the world around you and stores this information. This stored information can then be applied to another object in your scene to simulate that light. The lighting conditions are recorded based on the position of the sun, surrounding buildings, and any other light sources that might be present in the world. You actively tell the Unity Editor what objects in your scene to use to interpolate a light source, but we’ll take a look at that later. Light probes are extremely useful for games that take place in indoor settings, as they can provide consistent lighting almost everywhere. Light probes are a more accurate and efficient way to simulate lighting.

Benefits of using light probes

  • Consistent Lighting — As I mentioned, one of the main benefits of using light probes is that they allow you to create consistent lighting. This is an important factor to consider, as it can affect how players perceive your game.
  • Enhanced Environment — Another benefit of using light probes is that they allow you to create an environment that looks realistic. This can lead to a more immersive experience for the player, which is always a positive thing!
  • Save Time and Money — Another important benefit of using light probes is that they can help save you time and money.

You see, it can be incredibly expensive to recreate a realistic environment, with consistent lighting. This is why many developers choose to use light probes. It allows them to accurately simulate realistic lighting without having to go through the expensive process of manually creating accurate lighting and overloading the scene with a bunch of lights.

How to use light probes

Let’s take a step-by-step look at how you can apply light probes to your scene!

  1. Let’s start by going to Light → and selecting Ligh Probe Group.

Note: For best practice, you should create an Empty game object and then add the Light Probe to it. I explain this further in tips and tricks but forgot to include it in this example gif.

This is what your Light Probe group should look like. Kind of a strange cube with spheres at every end.

2. Using this option right below you can use the yellow spheres of your light probe to manipulate its size and shape. For now, we will leave the group in its default shape and size.

3. Usually, the workflow that goes along with light probes is to select the spheres and duplicate them to add more groups within the scene. This duplication remains as a part of your group rather than forming a new one.

For Indoor Areas

If you are using light probes in an indoor area, the usual strategy is to use a grid placement for them. That is to say that you will duplicate all four(4) corners of one of the sides and move them across repeating the process until the group looks like a grid that evenly covers the area.

  1. First, you would start by duplicating them until one of the corners of the room is covered.

2. Then you Select All and Duplicate Selected. Repeat to cover the rest of your indoor area by evenly spacing them to have a grid. If you have a high ceiling, you may need to duplicate upward as well.

3. Select which object in your scene will aid the lighting. This is necessary to interpolate the light between the empty spaces of the objects you select as an aid. Since Light Probes use Baked information, to do this, you need to make your selected object static. For example, if you want the light to be interpolated between the walls, floors, and ceilings, you simply select these object groups and then click on Static in the Inspector.

Once all these steps are in place, you should see how your indoor area becomes brighter.

Before:

Note: For both instances, I removed some of the emissive objects I had on my scene to make it as dim as possible for the examaple.

After:

For Outdoor Areas

You can be more selective with your light probe placement when in outdoor areas, but you must always be cautious to implement proper interpolation. To explain this, we will look at an example from the Official Unity Manual.

Take a look at this image. The interpolation of light should be happening from light post to light post. It might not be apparent at first, but since there are only two light probes(one at each light post) with nothing to connect them in between, instead of having a more natural light fallout, we have a bleeding effect or a gradient toward the middle.

If an object passes by between these probes, it will appear to be lit up even in the dark areas. That is because there is no probe in the middle to gather information from the dark spaces in between.

If we add another Light Probe in-between, the light is interpolated more evenly and accounts for dark areas.

Our passing-by object is properly shadowed now.

Tips and Tricks

  • Keep in mind that using light probes can lead to some inconsistencies. After all, the probes are recording real-world lighting. This can mean that the shadows will not be perfect, and the light intensity could vary.
  • You can tweak the light probes to make them more suitable for your game. You can adjust the radius of the probe, as well as make changes to the color. This will allow you to make the lighting more consistent, even if it is based on real-world data.
  • Remember to use the color of the probes to your advantage. If you have a yellow-tinted probe, for example, you can use that to create a warm environment.
  • Remember that light probes do not change the color of objects. Instead, they apply light on top of the color of objects. This means that an object that is blue, for example, would remain blue, but it would be lit like it’s in a yellow room.
  • Be mindful of how you space your light probes. They are essentially interpolating the light between your scene’s empty space, for proper interpolation, we need proper placement of quantity and positioning.
  • It is considered best practice to place your light probe inside an empty game object to prevent it from getting removed from your scene or project.

As I’ve hopefully shown throughout this article, light probes are an incredibly useful tool. They allow you to accurately simulate real-world lighting conditions so that you can create a more immersive experience. Light probes are an essential tool for all kinds of developers, so make sure you’re taking advantage of them!

Thank you for your time! If you found this content valuable, give me a follow! :) I write documentation on Unity Development as I learn on the go! I hope to help you on your learning journey!

--

--

Dennisse Pagán Dávila

Software Engineer that specialize in Game Development. Currently looking for new opportunities. Portfolio: dennissepagan.com