Volumetric Rendering

Light Scattering Theory

Properties of Volumes

There are four types of events that can affect the amount of radiance propagating along a ray through a medium.

$$\int _{S^{2}}f_{p}(x, \omega, \omega')d\theta = 1$$

An important property of phase functions — similar to BSDFs — is reciprocity. We need to be able to interchange the directions without changing the value of the phase function. Isotropic volumes have an equal probability of scattering incoming light in any direction, and have an associated phase function:

$$f_{p}(x, \theta ) = \frac {1}{4\pi }$$

Anisotropic volumes can exhibit complicated phase functions. As an alternative, in production volume rendering, the most widely used phase function is the Henyey-Greenstein phase function:

$$f_{p}(x, \theta) = \frac {1}{4\pi }\frac {1-g^{2}}{(1+g^{2}-2gcos\theta )^{\frac {3}{2}}}$$

where $-1<g<1$. The single parameter $g$ can be understood as the average cosine of the scattering directions, and controls the asymmetry of the phase function. It can model backwards scattering($g<0$), isotropic scattering($g=0$), and forward scattering($g>0$).

Extinction defines the loss of radiance due to both absorption and scattering, and we can model that loss with a single coefficient $\sigma _{t} = \sigma _{a}+\sigma {s}$. The single scattering albedo $\alpha = \frac {\sigma _{s}}{\sigma _{t}}$ is defined in addition to the extinction to unambiguously define volume properties. $\alpha $ has a similar meaning to the surface albedo: both are a measure of overall reflectivity that determines the amount of scattered radiance. An $\alpha = 0$ means that all radiance is absorbed and an $\alpha = 1$ means that no absorption occurs and we have lossless scattering.

Radiative Transfer Equation

The distribution of radiance in volumes is defined by the radiative transfer equation, which defined by Chandrasekhar. It describes the equilibrium radiance field $L(x, \omega )$ parametrized by position $x$ and the direction $\omega $.

$$(\sigma \cdot \triangledown )L(x, \omega ) = -\sigma _{a}(x)L(x, \omega )$$
$$(\omega \cdot \triangledown )L(x, \omega ) = -\sigma _{s}(x)L(x, \omega )$$
$$(\omega \cdot \triangledown )L(x, \omega) = \sigma _{a}(x)L_{e}(x, \omega)$$
$$(\omega \cdot \triangledown ) = \sigma _{s}(x)\int _{S^{2}}f_{p}(x, \omega , \omega')L(x, \omega')d\omega'$$

where $S^{2}$ denotes the spherical domain around the position $x$. The $\sigma _{s}$ in front of the integral models the scattering of the incoming radiance from all of the directions similar to the $\sigma _{s}$ in the out-scattering equation.

scattering
$$(\omega \cdot \triangledown )L(x, \omega)=-\sigma _{t}(x)L(x, \omega) + \sigma _{a}L_{e}(x, \omega ) + \sigma _{s}(x)L_{s}(x, \omega )$$

where for simplification.

The Real-time Volumetric Cloudscapes of Horizon

Andrew Schneider and Nathan Vos introduce a voxel clouds system in the game Horizon Zero Dawn at SIGGRAPH 2015, as part of the Adavances in Real-time rendering Course.

Modeling

The modeling approach uses ray marching to produce clouds. Rays march from the camera and sample noises and a set of gradients to define the cloud shapes. Layering Perlin noises of different frequencies in the sample procedure would make a very procedural looking clouds. So they introduce Worley noice as an offset to dilate Perlin noise. This would keep connectedness of Perlin noise but add some billowy shapes to it, which is referred as ‘Perlin-Worley’ noise.

perlin_worley

Two 3d textures and one 2d texture are used in the system. The first 3D texture with 128^2 resolution define the base shape for the clouds. And its first channel is the Perlin-Worley noise. The other three are Worley noise at increasing frequencies. The second 3D texture has three channels with 32^3 resolution, and uses Worley noise at increasing frequencies. This texture is used to add detail to the base cloud shape defined by the first 3D noise. The 2D texture has three channels with 128^2 resolution, and uses curl noise, which is non-divergent and is used to fake fluid motion, distort cloud shapes and add a sense of turbulence. Three height gradients are preset for the major low altitude cloud types: stratus, cumulus and cumulonimbus, which are used to change the noise signal over altitude. And a value between 0 and 1 is also defined to tell how much cloud coverage at the sample position. The whole modeling approach follow the standard ray-march/sampler framework:

base_shape
add_frequency
$$L_{e} = e^{-d\cdot r}\cdot f_{hg}\cdot f_{powder}$$

where $d$ denotes the cloud depth, and $r$ means the absorption increasing for rain clouds.

lighting
curve

Reference

  1. Julian F., Magnus W., Christopher K., Ralf H., Production Volume Rendering.
  2. Andrew S., Nathan V., The Real-time Volumetric Cloudscapes of Horizon.