In this lesson, you will learn how to use Light Probe Proxy Volumes (LPPV) to ensure large dynamic objects receive smooth, volumetric lighting transitions as they move across different lighting zones.
The Problem: Lighting Large Objects
Normally, a dynamic object—like a large dragon or a colossal moving statue—samples its lighting from a single point: its center (the Renderer.lightProbeProxyVolume default behavior). If that object is massive, the center might be in a bright sunlit area while its tail or wing is tucked into a dark alleyway. Using a single point for the entire object causes it to look like it is popping or "flatly" lit, as the light doesn't account for the volume the object occupies.
The Solution: Proxy Volumes
A Light Probe Proxy Volume acts as a grid of virtual light probes within a defined box volume. Instead of the object sampling lighting from one point, the LPPV fills the object's space with a low-resolution grid of lighting data.
When you attach a LightProbeProxyVolume component to a large GameObject, Unity creates a grid of samples based on the volume's Resolution settings. You can adjust these settings to balance performance and visual accuracy:
// Example of accessing the LPPV component via script
var lppv = GetComponent<LightProbeProxyVolume>();
lppv.resolutionMode = LightProbeProxyVolume.ResolutionMode.Custom;
lppv.boxSize = new Vector3(10, 10, 10); // Defining the volumetric influence
Implementation Tips
- Bounds Definition: Use the
Box Sizeto match the object's spatial bounds. If the box is too small, the object will revert to single-point lighting at its edges. - Resolution Tuning: Use a lower resolution for background objects to save memory, and higher density for hero assets that pass through high-contrast lighting zones (e.g., walking from a shadow into a bright room).
- Shader Support: Ensure your object’s material uses a shader that supports "Light Probe Proxy Volume" (standard shaders usually handle this automatically).
By defining this internal grid, the shader interpolates the lighting across the surface of your large asset, preventing jarring transitions and making your massive dynamic objects feel grounded in the world’s baked lighting.
Key Takeaway: Light Probe Proxy Volumes replace single-point lighting with a volumetric grid, allowing large dynamic objects to realistically sample varying light environments across their entire surface.