Volumetric Light Propagation in Game Engines

Simulating realistic light transport through volumetric media such as smoke, fog, and clouds requires balancing physical accuracy with the strict performance budgets of real-time rendering. Modern game engines achieve this balance by combining analytical light-scattering models, ray-marching algorithms, temporal caching, and hardware-accelerated ray tracing. This article covers the core techniques used to compute absorption, single scattering, multiple scattering approximations, and shadowing in participating media.

Ray Marching and Phase Functions

The standard approach for evaluating light along a view ray through volumetric media is ray marching. As a ray traverses a density volume, the renderer evaluates two fundamental components at discrete steps:

  • Extinction (Absorption and Out-Scattering): Calculated using the Beer-Lambert law, which determines how much light is lost as it travels through a given density over a specific distance.
  • In-Scattering: Light directed toward the camera after striking particles in the medium. Engines calculate the angle between the incoming light and the view direction using a phase function, most commonly the Henyey-Greenstein or Cornette-Shanks models. Modern implementations often use dual-lobe phase functions to simultaneously capture both the strong forward scattering (silver lining around edges) and the subtle backward scattering characteristic of water droplets in clouds.

Approximating Multiple Scattering

In dense media like storm clouds or thick explosions, light bounces multiple times before exiting or being absorbed. True multiple scattering is computationally prohibitive for real-time applications, so engines use empirical approximations:

  • Octave-Based Approximations: The renderer performs multiple evaluations of the phase function and attenuation with decreasing density and wider scattering angles across several "octaves." This simulates the progressive blurring and softening of light inside the cloud.
  • Energy-Conserving Multi-Scattering Models: These analytical models scale down absorption while broadening the phase function, mimicking the diffusion of light deeper into the volume without requiring secondary ray paths.

Volumetric Shadowing and Frustum Grids (Froxels)

To cast realistic shadows into and out of volumes, engines decouple volumetric data from screen space using optimized spatial structures:

  • Froxel Grids: Camera-frustum-aligned 3D voxel grids store participating media properties, direct lighting, and accumulated extinction. Scattering and extinction are computed per froxel cell and integrated slice-by-slice from the near to the far plane, allowing the results to be sampled efficiently in screen space.
  • Transmittance and Deep Shadow Maps: Standard shadow maps only record the nearest depth, which fails for semi-transparent media. Deep shadow maps or volumetric shadow maps store an array of depth-transmittance pairs or utilize Fourier-based approximations to determine light attenuation across varying depths inside smoke.

Temporal Accumulation and Denoising

Because computing ray steps at full resolution is too expensive, modern pipelines evaluate volumetric lighting at half or quarter resolution with low sample counts (e.g., 4 to 16 samples per pixel). Developers rely on:

  • Temporal Anti-Aliasing (TAA) and Reprojection: Jittering ray sample positions per frame (interleaved sampling or blue noise) and accumulating the results over time using motion vectors.
  • Bilateral Spatial Filtering: Edge-aware blurring filters that smooth out sampling noise without leaking light across depth discontinuities or geometry boundaries.

Real-Time Path Tracing and Hardware Acceleration

With the advent of dedicated ray-tracing hardware, engines increasingly use path-traced volumetric techniques. Hardware-accelerated bounding volume hierarchy (BVH) traversal enables real-time volumetric path tracing using methods like delta tracking (Woodcock tracking) for unbiased free-path sampling. Coupled with spatio-temporal reservoir sampling (ReSTIR) algorithms, path-traced volumes can accurately resolve multi-bounce indirect lighting from dynamic scene lights, fire, and muzzle flashes within complex smoke and dust simulations.