Better Integration

As noted in DICE presentation on volumetric rendering, it’s necessary to integrate the transmittance over the froxel depth.

In their presentation of volumetric rendering in Frostbite, DICE addresses sampling of transmittance. A single sample of the scattering, S = L_{scat}(x_t, w_o), is enough but the transmittance, Tr(x,  xs) requires integration over the froxel depth D:

    \[\int_{0}^{D}e^{-\sigma_tx}S dx = S \int_{0}^{D} e^{-\sigma_tx} =  \]

    \[S\left [ -\frac{e^{-\sigma_tx}}{\sigma_t} \right ]_0^D = S\left ( \left [ -\frac{e^{-\sigma_tD}}{\sigma_t} \right ] - \left [ -\frac{e^{-\sigma_t0}}{\sigma_t} \right ] \right ) =\]

    \[S\left ( -\frac{e^{-\sigma_tD}}{\sigma_t} + \frac{1}{\sigma_t} \right ) = \frac{S - Se^{-\sigma_tD}}{\sigma_t} \]


With a naive single sample of the transmittance, extinction in the participating was either too weak or to much, depending on the scattering:

simple_transmittance_second  simple_transmittance_first

Using the improved integration, integrating with respect to the froxel depth or \deltax, the energy conservation is more accurate: