Page updated: April 14, 2020
Author: Curtis Mobley
View PDF

The BRDF as a PDF

Equation (4) of the BRDF page,

Lr(𝜃r,ϕr) = 2πiLi(𝜃i,ϕi)BRDF(𝜃i,ϕi,𝜃r,ϕr)cos𝜃idΩi, (1)

shows how the BRDF is used in the radiative transfer equation (e.g., in HydroLight), which is always working with radiances. In Monte Carlo simulations, you are tracking many individual photon packets as they interact with the medium and its boundary surfaces. In this case, the BRDF must be used as a probability distribution function (PDF) to determine the direction and weight of the reflected photon packet whenever a photon packet hits the bottom. This is a tricky business, and the step-by-step process is as follows.

Given: A photon packet with weight wi is incident onto the surface in direction (𝜃i,ϕi). The BRDF of the surface is known.

Needed: The weight wr and direction (𝜃r,ϕr) of the reflected photon packet.

Since the input direction (𝜃i,ϕi) is known, BRDF(𝜃i,ϕi,𝜃r,ϕr) can be viewed as an (unnormalized) bivariate PDF for the reflected angles 𝜃r and ϕr. Note that, in general, these angles are correlated. Proceed as follows:

Compute the directional-hemispherical reflectance for the given (𝜃i,ϕi):

ρdh(𝜃 i,ϕi) = 2πiBRDF(𝜃i,ϕi,𝜃r,ϕr)cos𝜃rdΩr = 02π0π2BRDF(𝜃 i,ϕi,𝜃r,ϕr)cos𝜃r sin𝜃rd𝜃rdϕr. (2)
The reflected packet weight is then wr = ρdh(𝜃i,ϕi)wi.
Compute the cumulative distribution function (CDF) for ϕr by
CDFϕ(ϕr) = 1 ρdh(𝜃i,ϕi)0ϕr 0π2BRDF(𝜃 i,ϕi,𝜃,ϕ)cos𝜃sin𝜃d𝜃dϕ. (3)

Note that the directional-hemispherical reflectance is being used to convert the BRDF into a normalized bivariate PDF for 𝜃r and ϕr. We are then ”integrating out” the 𝜃r dependence to leave a PDF for ϕr, which is then being used to construct the CDF for ϕr.

Draw a random number from a uniform [0,1] distribution. Solve the equation
= CDFϕ(ϕr) (4)

for ϕr. This is the randomly determined azimuthal angle of the reflected photon packet.

Compute the CDF for angle 𝜃r from
CDF𝜃(𝜃r) = 0𝜃rBRDF(𝜃i,ϕi,𝜃,ϕr)cos𝜃sin𝜃d𝜃 0π2BRDF(𝜃i,ϕi,𝜃,ϕr)cos𝜃sin𝜃d𝜃. (5)

Note that the angle ϕr determined in step 4 is used in the BRDF in Eq. (4) when evaluating the 𝜃 integrals. This is how the correlation between 𝜃r and ϕr is accounted for in the determination of the reflection angles.

Draw a new random number from a uniform [0,1] distribution and solve the equation
= CDF𝜃(𝜃r) (6)

for 𝜃r. This is the randomly determined polar angle of the reflected photon packet. You can now send the new photon packet on its way.

For all but the simplest BRDFs, Eqs. (1) to (5) all must be evaluated numerically for each photon packet, which can be an enormous computer cost when millions of photon packets are being traced.

A Simple Example

The Minnaert BRDF is

BRDFMinn(𝜃i,ϕi,𝜃r,ϕr) = ρ π cos𝜃i cos𝜃r k. (7)

[Comment: This BRDF was invented to explain the curious fact that the full moon appears almost uniformly bright from the center to the edge of the lunar disk. If the lunar dust were a Lambertian reflector, the full moon would appear bright at the center and darker at the edge. However, the Minnaert BRDF agrees with observation over only a limited range of angles.]

Note that for k = 0 this reduces to the Lambertian BRDF. Equations (1) to (5) can be evaluated analytically for the Minnaert BRDF. Equation (1) evaluates to

ρdh = 2ρ k + 2cosk𝜃 i,

which reduces to ρdh = ρ for a Lambertian surface. Equation (2) gives just

CDFϕ(ϕr) = ϕr 2π.

Inserting this into Eq. (3) and solving for ϕr gives

ϕr = 2π.

Thus the azimuthal angle is uniformly distributed over 2π radians. The CDF for 𝜃r as given by (4) is

CDF𝜃(𝜃r) = 1 cosk+2𝜃 r.

Equation (5) then gives

𝜃r = cos1 k + 2,

after noting that 1 has the same uniform distribution as . For a Lambertian surface, the randomly generated 𝜃r angles are distributed as cos1(), which certainly is not intuitive. However, this distribution is precisely what is necessary to make the number of reflected photons per unit solid angle proportional to cos𝜃r, as required for a Lambertian surface.

Comments for The BRDF as a PDF:

Loading Conversation