Asset guides
HDRP

APV Dynamic Diffuse GI

On this page

APV Dynamic Diffuse GI updates bounced light as your HDRP scene changes. Unity's Adaptive Probe Volumes (APV) place the probes when you bake. At runtime, the package traces rays from those probes and lights opaque surfaces with the result.

Requirements#

Unity HDRP
6.0 17.0
6.3 17.3
6.6 17.6

Use Windows x64 with Direct3D 12 and a GPU and driver that support DXR. Keep the Unity Terrain module enabled. Use an HDRP Game or Scene View camera with XR off.

If Unity uses another graphics API, open Edit > Project Settings > Player > Other Settings > Rendering. Turn off Auto Graphics API for Windows. Move Direct3D12 to the top of Graphics APIs for Windows and restart Unity.

Install the asset#

Import APV Dynamic Diffuse GI from My Assets in Unity's Package Manager. The asset appears under Assets/Truss/APVDDGI. Use the HDRP version for your Unity release. HDRP installs Render Pipelines Core and its configuration package. Keep the Terrain module enabled if Unity offers a dependency list during import.

Try the demo#

Open Samples/CompatibilityRoom/Compatibility Room.unity inside the asset folder after setting up HDRP. Press Play. The room includes a baked probe layout and a DDGI volume. Dim the Panel material's emission to watch its bounced light fade on the floor and wall.

Add the volume#

  1. Open the HDRP Asset for your active quality level. Enable Ray Tracing and Custom Pass. Set Light Probe System to Adaptive Probe Volumes.
  2. Set the camera's Lit Shader Mode to Deferred in its Frame Settings. Enable Opaque Objects and Custom Pass. Turn off MSAA.
  3. Add an Adaptive Probe Volume that covers the area you want to light. Enable Contribute Global Illumination on the static meshes that define the space, such as its walls and floor.
  4. Save the scene. Open Window > Rendering > Lighting > Adaptive Probe Volumes. Add the scene to a Baking Set and choose Bake Probe Volumes in the bake dropdown. If you use Lighting Scenarios and change the probe bounds or spacing, set Probe Positions to Recalculate before you bake.
  5. Choose Tools > APV DDGI > Set Up Volume. The command adds or selects the DDGI component in the active scene and creates its Diffuse Override profile if needed. It links Placement from the scene's APV bake when one is available.
  6. Check that the camera's Volume Layer Mask includes the Diffuse Override object's layer. Save the scene to keep the placement reference in a build.
  7. Press Play. Set Debug View to Coverage to see where the probes provide light. Switch to Diffuse to see the package's contribution, then choose Off to return to the full render.

The setup command creates a disabled global Volume under the DDGI object. Its profile sets Indirect Lighting Controller > Indirect Diffuse Lighting Multiplier to 0 and Global Illumination > Enable to Off. DDGI applies the profile when it starts the probe field. Run the command again to select the same component and reuse its profile.

If you add the volume before baking, the first bake supplies Placement. If the field stays empty, click Use Scene's APV Bake. To use a different bake, select its Baking Set in the Project window and choose Assets > Export DDGI Placement. Assign the exported asset to Placement. If you rebake the source set, the asset refreshes the linked placement.

For the graphics API settings, see Unity's HDRP ray tracing setup.

Tune the lighting#

Start with Default. Use Balanced to reduce ray work. If you see light leaking around thin walls, try Cinematic. It takes more samples and traces extra visibility rays from surfaces toward the probes.

Quality Preset Rays Per Probe Probes Per Update Surface visibility
Default 64 4,096 Probe distance history
Balanced 48 3,072 Probe distance history
Cinematic 128 8,192 Traced receiver segments with probe distance history for nearby pixels
  • Adaptive Probe Updates reuse measurements for settled probes and prioritize fresh measurements when lighting or geometry changes.
  • Raise Probes Per Update to refresh more probes per frame. Raise Rays Per Probe if a small, bright emitter looks noisy. Both controls can increase GPU time.
  • Single Bounce skips feedback between probes and surfaces. Lights, Lit emission and the environment still contribute indirect light. With Single Bounce off, use Feedback to control the strength of later bounces.
  • Trace Distance limits how far a ray travels. A ray that reaches the limit samples the selected environment. For a sealed interior, use Environment > Disabled if distant rays admit sky light.
  • Update Camera is optional. Leave it empty to let an eligible Game camera advance the probe field. Scene View can advance the field while you edit.

Sky and volumetric fog#

Set Environment to Volume Lighting Sky to use the update camera's HDRP lighting sky. Select HDRI Sky or Physically Based Sky in the Visual Environment override. Add the matching sky override to the Volume Profile. Use Sky Fallback blends into diffuse light from the selected environment at the edge of the field.

To light volumetric fog with the probes, enable volumetric fog in HDRP and set Fog > Global Light Probe Dimmer above 0. Set it to 1 for the full contribution. The package installs a DDGI version of HDRP's Volumetric Lighting compute resource. If another custom shader already occupies that slot, assign TrussDdgiVolumetricLighting in HDRP Global Settings to connect DDGI to fog.

Diagnose the result#

What you see What to check
Placement is empty Save the scene, bake its APV Baking Set, then click Use Scene's APV Bake.
Coverage is missing from part of the room Extend the Adaptive Probe Volume or reduce its probe spacing. Bake again.
The scene shows no DDGI Check the component status, the camera's Deferred and Custom Pass settings, and the Diffuse Override layer and priority.
Light leaks through a thin wall Inspect Visibility. Try Trace Receiver Segments or tighten the probe spacing near the wall.
A moving object leaves old lighting Enable ray tracing on its Renderer and use Dynamic Transform for rigid movement. Allow several probe updates for the lighting to settle.

Irradiance shows probe light before the surface color modulates it. Visibility shows how much of the nearby probe contribution passes the visibility test. Use Reset Probe History to rebuild the field when you compare settings.

The package uses one active probe field per loaded world. Its surface pass covers opaque Deferred HDRP materials. The ray scene supports HDRP Lit base color, metallic response, alpha clipping and emission. For terrain, enable Heightmap Ray Tracing on the Terrain. HDRP handles the scene's direct lighting and specular reflections.