Mustard's Home

Change of Variable for the Surface Delta Distribution

These notes walk through how the distribution of microsurface normals can be expressed by applying a change of variables to the Dirac delta function. The goal is to make the connection between geometric area on a surface and the statistical density of normals explicit.

Definitions

We begin with the core definitions that set up the derivation:

  1. Omega is the spherical domain that spans 4 pi steradians.
  2. Script M denotes the microsurface under consideration.
  3. p_m is a point on that microsurface.
  4. omega_m(p_m) is the surface normal at p_m. Think of omega_m as a mapping from position to unit direction.
  5. G represents the actual geometry with area 1 m^2, meaning the integral of dp_g over G equals one.

The distribution of normals is defined by

D(ω)=Mδ(ωωm(pm))dpmD(\omega) = \int_{\mathcal{M}} \delta(\omega - \omega_m(p_m))\, dp_m

Delta Distribution Property

A key identity for the Dirac delta under change of variables is

δ(f(x))dx=δ(f(x))dxdf(x)df(x)=f(x)=0dxdf(x)\begin{aligned} \int \delta(f(x))\,dx &= \int \delta(f(x))\left\lvert\frac{dx}{df(x)}\right\rvert\,|df(x)| \\ &= \sum_{f(x)=0} \left\lvert\frac{dx}{df(x)}\right\rvert \end{aligned}

Applying this identity to the definition of D(omega) yields a summation over all points whose normal matches the chosen direction:

D(ω)=Mδ(ωωm(pm))dpm=ω=ωm(pm)dpmdωm(pm)\begin{aligned} D(\omega) &= \int_{\mathcal{M}} \delta(\omega - \omega_m(p_m))\,dp_m \\ &= \sum_{\omega = \omega_m(p_m)} \left\lvert\frac{dp_m}{d\omega_m(p_m)}\right\rvert \end{aligned}

Linking Geometry and Normal Density

Integrating D(omega) over a subset Omega prime of the sphere accumulates the area of all microsurface points whose normals fall inside that region:

ΩD(ω)dω=Ωω=ωm(pm)dpmdωm(pm)dω=limΔω0ωΩω=ωm(pm)dpmdωm(pm)Δω=limΔω0ωΩAreaω=Area({pmM:ωm(pm)Ω})=Mdpm\begin{aligned} \int_{\Omega'} D(\omega)\,d\omega &= \int_{\Omega'} \sum_{\omega = \omega_m(p_m)} \left\lvert\frac{dp_m}{d\omega_m(p_m)}\right\rvert\,d\omega \\ &= \lim_{\Delta \omega \to 0} \sum_{\omega \in \Omega'} \sum_{\omega = \omega_m(p_m)} \left\lvert\frac{dp_m}{d\omega_m(p_m)}\right\rvert\, \Delta \omega \\ &= \lim_{\Delta \omega \to 0} \sum_{\omega \in \Omega'} \text{Area}_{\omega} \\ &= \text{Area}\big(\{p_m \in \mathcal{M} : \omega_m(p_m) \in \Omega'\}\big) \\ &= \int_{\mathcal{M}'} dp_m \end{aligned}

Each term in that limit is the infinitesimal area associated with a particular normal direction. Summing them recovers the portion of the microsurface whose normals lie in Omega prime:

Takeaways

  1. The normal distribution D(omega) can be computed from any finite microsurface realization by finding the points with a given normal, then evaluating the Jacobian in the summation.
  2. This formulation bridges the spatial layout of a microsurface with the statistical description of its normals.
  3. Averaging D(omega) across many realizations (written as angled brackets around D) gives the normal distribution used by familiar models such as Beckmann or GGX, aside from the cosine-weighted normalization.

Together, these steps show that integrating a delta-distribution of normals is equivalent to measuring actual surface area. That insight underpins how microfacet distributions link physical geometry to shading models.