Using Light probes in Unity 3D
In this tutorial, we will see what are light probes and how to use them in unity 3D applications. Light probes are very useful to provide real time like lighting effects to the moving objects in a baked light environment.
Light Probes
Light probes captures the light information that is passing through the empty space of the scene. It stores the baked light information.
Light probes apply these stored light information to the moving objects and provides the high quality lighting to the moving/ non-static objects in the scene.
Light probes in Unity 3D – Step by step guide
Download the below example unity package here – Light Probes Demo Unity Package
Step 1: Prepare scene
We will use the below scene for the implementing light probes. Mark all the environment game objects static. This includes walls, floors and directional light.
Step 2: Add a cube game object. This will be a non-static/ moving game object.
Step 3: Make directional light mode to Mixed.
Step 4: Light settings
Open light settings window (Window -> Rendering -> Light Settings ). Disable real time lighting and set lighting mode to subtractive.
Step 5: Add light probes
Add light probe group in the scene (Create -> Light -> Light Probe Group)
Step 7: Edit Light Probe
Click on the edit light probes button in the inspector. As shown below it will allow you to add, delete, duplicate the probes.
After then you can edit the light probes in the scene. Below is the example of selecting multiple light probes and arranging their position.
- While arranging light probes, make sure that the position of light probes are above the ground otherwise it will not be able to store light information that is bounced from the ground.
- Add light probes where ground color is changing or where shadow is present. Basically, add light probes at positions where light information is changing.
We can also click on a light probe sphere to select and change its position.
Step 8: Bake the light from light settings window. Ignore this step if auto light generation is switched on.
Disable compress light maps option in the light settings, if errors throws at the time of baking and bake again.
Step 9: Test the light probes effect by changing cube position. It will take light information from near by light probes. You can see these near by probes in the editor scene.
Hope you get an idea about using light probes in unity 3D. Post your comments for queries and feedback. Thanks for reading.
Latest posts by Gyanendu Shekhar (see all)
- Using Transparent Material in Unity 3D - February 8, 2021
- Getting started with UI Toolkit : Unity 3D Tutorial - December 30, 2020
- Using Events in Unity 3D - May 2, 2020
Hi Gyanendu. Such a nice explaination over light probes. But i need something where i can set the Meshrenderers of one heirarchy to look for light probes in same position as the objects of second heirarachy to avoid lighting difference when duplicating the object. Could you guide me on this a bit?. Thanks.