Adaptive Probe Volumes
Your first document
Adaptive Probe Volumes
What about lighting of dynamic objects that cannot rely on baked lightmaps because they can move in very dark or bright parts of the scene. These objects need to be lit by a different type of lighting provided by lightprobes.
Unity's legacy stystem is called the Light Probe Group. It relies on a network of probes to capture lighting. This network is usually set up by hand, and the artists will need to place every probe manually, which is very time consuming. Usually, the probe needs to be placed around areas of highlighting contrast to capture as much lighting variations as possible. Not only do lightmap UVs need to be authored, probes need to be placed for dynamic objects to be lit correctly, and we will need to deal with large textures that is heavy on our application's runtime memory. This solution is usually efficient on mobile, as the lighting calculations are extremely cheap. However, it is not great visually for high-end scenarios.
Unity's new, Adaptive Probe Volumes (APV) system gives us a new way to apply global illumination in our worlds. It is a new and more robust light baking architecture to authoring light-probe lit environments, a group of lightprobes that Unity places automatically based on the geometry density in our Scene, to build bake indirect lighting.
Because it is adaptive, APV generates more densely placed probes in areas with more geometry and fewer probes in areas with less placed objects, like the background of a Scene. This system also allows for objects to receive many lighting variations on its surface and receives correct per pixel lighting, something the legacy system cannot provide.
-
Step 1: Light Probe Group Unity's legacy Light Probe Groups are a collection of points that store information about light hitting surfaces in a scene. They can be used to add high-quality light to moving objects, including indirect bounced light. In your
Hierarchy
>Lighting
>Light Probe Group
, check out theInspector
window. You will see yellow probes scattered around the Scene. These probes were all manually placed by someone who worked on a project!! -
Step 2: Enable APV By default, the project is using the Light Probe Group system. We need to switch our system over to Adaptive Probe Volumes.
First:
- From the main menu, select
Edit
>Project Settings
>Quality
>HDRP
. - Expand
Lighting
>Light Probe Lighting
. - Set
Light Probe System
toProbe Volumes
.
Then:
- Select the
Graphics
>Pipeline Specific Settings
>HDRP
tab. - Go to Frame Settings.
- Expand
Camera
>Lighting
and enableProbe Volumes
.
Finally, to make sure our reflection probes also capture lighting data from APV, we should also do the following:
- Expand
Realtime Reflection
>Lighting
and enableProbe Volumes
. - Expand
Baked
orCustom Reflection
>Lighting
and enableProbe Volumes
.
Feel free to reference the documentation: Use Adaptive Probe Volumes (HDRP)
- From the main menu, select
-
Step 3: Add an APV to the Scene
To automatically generate probes, you can create an Adaptive Probe Volume. While you’re working, you can see live updates, allowing you to preview probe placement without baking. These updates are based on bricks and the subdivision levels you previously defined, which then adjusts according to the proximity of nearby geometry.
- From the main menu, select
GameObject
>Light
>Probe Volume (Experimental)
>Probe Volume
.
- Select the
Probe Volume
GameObject and under theLighting
tab, uncheck Realtime Lighting since using Enlighten at the same time is not compatible.
- In the Inspector for the Adaptive Probe Volume, set Mode to
Global
to make this Adaptive Probe Volume cover your entire Scene.
- From the main menu, select
-
Step 4: Light and Mesh Renderer Settings
- To include a Light in an Adaptive Probe Volume’s baked lighting data, open the Inspector for the Light then set the Light Mode to
Mixed
orBaked
.
-
To include a GameObject in an Adaptive Probe Volume’s baked lighting data, open the Inspector for the GameObject and enable
Contribute Global Illumination
. -
To make a GameObject receive baked lighting, open the Inspector for the GameObject and set
Receive Global Illumination
toLight Probes
.
- To include a Light in an Adaptive Probe Volume’s baked lighting data, open the Inspector for the Light then set the Light Mode to
-
Step 5: Bake your Lighting
-
From the main menu, select
Window
>Rendering
>Lighting
. If you do not see this panel, instead ofLighting
, visitLight Explorer
>Light Probes
. -
Select the
Adaptive Probe Volumes
panel orLight Probes
tab.
-
-
Step 6: Baking Sets with APV Open up the **Probe Volume Settings (Experimental) panel under
Window
>Rendering
.Then, create
New Baking Set
and add your scene. -
Step 7: Generate Lighting Generate Lighting precomputes all lighting data, including light probes, which you can visualize in your scene. As previewed using bricks, you can see the various subdivision levels that have been applied when placing probes.
- Select
Generate Lighting
.
- Select
-
Step 8: Probe Placement with APV
APV is a volume-based system that automates the placement of probes rather than placing them by hand. To control globally how probes are placed in the world, you can use the Probe Volume Settings tools.
The general settings tab for APV lets you control parameters like Min and Max Probe Spacing to control the distances between probes. By default, dense areas will use the highest resolution, while areas with less geometry will use lower density levels. This automatic and adaptive behavior ensures efficient resource allocation, focusing on areas where they are most needed.
-
Step 9: Light Leaking However, a problem with automated probes placement is that sometimes probes can sometimes end up inside objects and create invalid lighting data. This can produce light leaking, especially when dealing with high-contrast lighting. However, the Unity APV system can automatically mark probes within objecas as invalid, such as the ones between floors and walls.
The APV system also has a virtual offset that will slightly move the probes in case they are inside the geometry or too close to their surface. Within debug view, we can see how much the probes have been nudged before the irradiance was captured.