Rendering Equation

Recall the radiometric quantities outlined in Radiometric Quantities, and their spectral counterparts outlined in Corresponding Spectral Quantities. Using these quantities we can define an equation which relates in the incoming and outgoing radiance from a point. This is known as the Rendering Equation. Using the spectral form of our radiometric quantities (as to capture wavelength dependent behaviors) it would be written as follows:

(3)\[L_o(\vec{x},\omega_o,\lambda) = L_e(\vec{x},\omega_o,\lambda) + \int_{\Omega} f_r(\vec{x},\omega_i,\omega_o,\lambda)L_i(\vec{x},\omega_o,\lambda)(\omega_i\cdot \hat{n}) \ d\omega_i\]

where:

  • \(\vec{x}\) is the point at which we’re evaluating

  • \(\omega_o\) is the direction of the outgoing light

  • \(\omega_i\) is the direction towards the incoming light (negative the direction the light is traveling)

  • \(\lambda\) is a specific wavelength

  • \(L_e(\vec{x},\omega_o,\lambda)\) is the emitted spectral radiance from point \(\vec{x}\) in direction \(\omega_o\)

  • \(L_o(\vec{x},\omega_o,\lambda)\) is the total output spectral radiance from point \(\vec{x}\) in direction \(\omega_o\)

  • \(L_i(\vec{x},\omega_i,\lambda)\) is the incoming spectral radiance at point \(\vec{x}\) from direction \(\omega_i\)

  • \(f_r(\vec{x},\omega_i,\omega_o,\lambda)\) is the Bidirectional Reflectance Distribution Function (BRDF) relating how the light from \(\omega_i\) is reflected to \(\omega_o\) for a given wavelength (\(\lambda\))

  • \(\hat{n}\) is the surface normal vector at point \(\vec{x}\)

  • \(\Omega\) is the unit hemisphere at point \(\vec{x}\) such that \(\Omega = \{\omega_i \ | \ \omega_i\cdot\hat{n} > 0 \}\)

While Vira does aim to support fully spectrally based path tracing, most use-cases will use Trichomatic (e.g. ColorRGB), in which case simplified versions of the BRDF can be used, and the dependence on wavelength disappears. Note, in Eq (3) we are also ignoring time dependence.

Further, the radiance emitted from a surface (\(L_e(\vec{x},\omega_o,\lambda)\)) is trivial to account for but is only applicable to objects which are actively emitting light. For many of Vira’s use-cases, this will not be applicable, as it implies the object being rendered is glowing, while this could be achieved by specifying an emission texture, we can ignore it for now.

Note

There are some limitations to how the rendering equation is presented here. Most relevant to Vira is that, as written, Eq. (3) cannot account for polarization, transmission, or doppler effects. This can be over-comer in the future, namely by replacing the BRDF with a Polarimetric Bidirectional Scattering Distribution Function (BSDF), which accounts for both reflectance and transmittance of a material (transmittance would require integrating over a second hemisphere, pointed into the material). Similarly, by using a microfacet based models, it can be possible to model polarization effects. This is not yet implemented in Vira, and so these limitations are something to be aware of.

In all but the most contrived examples, this integral cannot be evaluated exactly, and so we must employ the monte carlo methods presented in Monte Carlo Estimation.