Contents

Lecture 1: Light

Properties of Light Relevant to Rendering

  • Light travels in straight lines.
    • This is not always true in reality, even for rendering. E.g., we can model objects with a gradient in the index of refraction which creates curved paths. And in broader physics, the more correct statement would be to say light follows geodesics through potentially curved space time. But, in practice, this is a simplifying assumption that is the basis of most of rendering.
  • The irradiance of a surface (the amount of radiant flux hitting the surface per unit area) is…
    • linear with light intensity.
    • not linear with the size of the light.
    • proportional to $1 / r^2$ where $r$ is the distance from the surface to the light.
      • i.e., the inverse square law
      • This does not apply to infinite area lights, e.g., directional lights, environment lights (skybox), etc.
    • proportional to $\cos(\theta)$, i.e., the dot product of the surface normal and the normalized vector from the surface to the light.
      • At shallower angles, the light is more spread out, causing the illuminated surface to appear dimmer.
  • Light’s intensity does not attenuate (at least without a participating medium that absorbs/scatters).
    • If you look at a light through a pinhole right up close to the light, it will appear just as bright through that pinhole as it would if you looked through it farther away. Likewise, the intensity is also unaffected by the angle at which you look at the light.

More Complex Light Phenomena

The following properties of light are usually not included in most renderers.

  • Flourescent materials which reflect light at a different wavelength than incident illumination.
    • This would require your path tracer to integrate over more than just the standard RGB wavelengths!
  • Polarized light
    • Some more advanced renderers can account for multiple wavelengths and polarized light, e.g., Mitsuba.
  • Light interference.
    • Path tracing uses ray optics, aka geometric optics, which cannot model interference.

Modeling Incident Illumination

Consider the following equation that models the light arriving at a point on a surface $L_i (\mathrm{x})$: \begin{align} L_i (\mathrm{x}) = \int_{\Omega} L_e(\mathrm{x}, \vec{\omega}) \cos(\theta_{\mathrm{x}}) \mathrm{d}\omega \end{align}

  • $\int_{\Omega}$ represents the integral is over the hemisphere with respect to the surface normal $\vec{N}$.
  • $L_e (\mathrm{x}, \vec{\omega})$ is the light arriving at $\mathrm{x}$ from (normalized) direction $\vec{\omega}$.
  • $\theta_{\mathrm{x}}$ is the angle of incident light at position $\mathrm{x}$, i.e., $\cos(\theta_{\mathrm{x}}) = \vec{\omega} \cdot \vec{N}$
  • $\mathrm{d}\omega$ represents an infinitesimal solid angle – basically saying “over all directions”

The solid angle represents the area of the projection of a surface onto the unit sphere. For a small surface patch $\mathrm{dA}$, the corresponding solid angle is: \begin{align} \mathrm{d}\omega = \frac{\mathrm{dA} \cdot \cos(\theta)}{r^2} \end{align} where $\cos(\theta)$ in this case is the dot product between the normalized vector from the point on the emitting surface to the recieving point and the normal vector of the emitting surface.

/posts/blog/tu-wien-rendering-course-notes-lecture-1/images/irradiance_from_quad.png
The differential solid angle corresponding to the differential area on a surface are related by equation 2. This is figure 4.9 from PBR.

Therefore, the light arriving at a point $\mathrm{x}$ (i.e., the point $\mathrm{p}$ in the diagram above) from a light source $l$ with surface $S_l$ is: \begin{align} L_i^{[l]}(\mathrm{x}) = \int_{S_l} L_e^{[l]}(\mathrm{y}) \cos(\theta_{\mathrm{x}}) \frac{\cos(\theta_{\mathrm{y}})}{r^2} \mathrm{dA_y} \end{align}

where

  • $L_i^{[l]}(\mathrm{x})$ is the is the light arriving at point $\mathrm{x}$ from light $l$.
  • $\int_{S_l}$ represents the integral is taken over the surface of the light – not over the hemisphere!
  • $L_e^{[l]}(\mathrm{y})$ represents the light intensity at point $\mathrm{y}$ from the surface.
  • $\cos(\theta_{\mathrm{x}})$ is the dot product between the normalized vector from $\mathrm{x}$ to $\mathrm{y}$ and the surface normal of the point being illuminated $\vec{N_x}$.
  • $\cos(\theta_{\mathrm{y}})$ is the dot product between the normalized vector from $\mathrm{y}$ to $\mathrm{x}$ and the surface normal of the light source $\vec{N_y}$.
  • $r^2$ is the squared distance between $\mathrm{x}$ and $\mathrm{y}$.
  • $\mathrm{dA_y}$ represents the integral is being taken over small surface pathces of the light.

For more info, check out chapter 4 of PBR 4th edition, in particular, chapter 4.2.

Radiometric Quantities

  • Radiant energy $Q_e$ $[\mathrm{J}]$ (Joules)
  • Radiant flux / power $\Phi_e$ $[\mathrm{W} = \mathrm{J}/\mathrm{s}]$ (Watts, Joules per second)
  • Radiant intensity $I_e(\omega)$ $[\mathrm{W} / \mathrm{sr}]$ (Watts per steradian)
  • Irradiance $E_e(\mathrm{x})$ $[\mathrm{W} / \mathrm{m}^2]$ (Incident flux per unit area)
  • Radiant Exitance $M_e(\mathrm{x})$ $[\mathrm{W} / \mathrm{m}^2]$ (Emitted flux per unit area)
  • Radiosity $J_e(\mathrm{x})$ $[\mathrm{W} / \mathrm{m}^2]$ (Emitted and reflected flux per unit area)
  • Radiance $L_e(\mathrm{x}, \omega)$ $[\mathrm{W} / (\mathrm{m}^2 \ \mathrm{sr})]$ (Flux per unit area per solid angle)
  • Radiance per wavelength $L_{e, \lambda}(\mathrm{x}, \omega)$ $[\mathrm{W} / (\mathrm{m}^2 \ \mathrm{sr} \ \mathrm{nm})]$

Every radiometric quantity has a corresponding photometric quantity, which represents the percieved brightness instead of the physical brightness. For example, Luminance is the photometric quantity equivalent to Radiance. Often in rendering, we may need to account for the conversion between radiometric and photometric units. Gamma correction is one such case as our perception of brightness is not linear with intensity.

Cameras measure radiance – i.e., the amount of light hitting the surface area of each pixel over the solid angle ‘seen’ by the pixel. $$ L_e = \frac{\mathrm{d} \Phi}{\mathrm{dA}^\perp \mathrm{d}\omega} $$

Note, here the $\mathrm{dA}^\perp$ uses $\perp$ to account for the $\cos(\theta)$ component – i.e., the amount of the surface area that is perpendicular to the light.

Bidirectional Reflectance Distribution Function (BRDF)

The BRDF represents how much light is reflected from a given direction to another given direction at a given position, and at which wavelengths.

The white furnace test for energy conservation says that a non-emissive material cannot create light, it can only absorb or reflect light. Therefore, if the incoming light at the surface of the material is $L_i = 1$, the integral of the BRDF over the surface must be $L_e \leq 1$.

Consider the BRDF for a perfectly diffuse surface. To pass the white furnace test, we set $L_e = 1$ in equation 1 and compute the integral over the hemisphere using the Jacobian for spherical coordinates on the unit hemisphere $(\sin(\theta) \mathrm{d}\theta \mathrm{d}\phi)$: $$ \int_\Omega \cos(\theta) \mathrm{d}\omega = \int_0^{2\pi} \int_0^{\pi/2} \cos(\theta) \sin(\theta) \mathrm{d}\theta \mathrm{d}\phi = \pi $$

Therefore, the BRDF for a perfectly white diffuse material is $1 / \pi$ for all directions.