-
Concept: BRDF (Bidirectional Reflectance Distribution Function)
-
Definition
f_r(ω_i, ω_o) — ratio of reflected radiance to incident irradiance
- Units:
1/sr (per steradian)
- Describes how a surface scatters light
ω_i — incoming light direction (toward surface)
ω_o — outgoing view direction (away from surface)
- Both directions are defined in the upper hemisphere (above the surface)
-
Physical Constraints
- Non-negativity:
f_r(ω_i, ω_o) ≥ 0
- Reciprocity (Helmholtz):
f_r(ω_i, ω_o) = f_r(ω_o, ω_i)
- Light path can be reversed — important for bidirectional algorithms
- Energy conservation:
∫_Ω f_r(ω_i, ω_o) cos(θ_i) dω_i ≤ 1 for all ω_o
= 1 for perfectly reflective surface
< 1 for absorbing surface
- Violation → surface creates energy → physically impossible
-
Lambertian BRDF (Diffuse)
f_r = albedo / π
- Constant — scatters equally in all directions
- The
1/π factor ensures energy conservation
- Proof:
∫_Ω (albedo/π) * cos(θ) dω = (albedo/π) * π = albedo ≤ 1
- Rendering equation contribution:
L_o = albedo * (1/π) * ∫ L_i * cos(θ) dω
- With cosine-weighted sampling: simplifies to
L_o ≈ albedo * L_i
- No real surface is perfectly Lambertian — but it’s a good approximation for matte surfaces
-
GGX Microfacet BRDF (Specular)
- See PathTracer Learning - Concept - Microfacet Theory for full derivation
f_r = D(h) * G(ω_i, ω_o) * F(ω_o, h) / (4 * NdotL * NdotV)
- Components
D(h) — Normal Distribution Function: density of microfacets with normal h
G(ω_i, ω_o) — Geometric term: shadowing and masking by microfacets
F(ω_o, h) — Fresnel: reflectance as function of angle
- GGX NDF
D(h) = α² / (π * (NdotH² * (α² - 1) + 1)²)
α = roughness² (perceptual roughness remapping)
α = 0 → perfect mirror, α = 1 → fully rough
- Smith G term
G(ω_i, ω_o) = G1(ω_i) * G1(ω_o) (separable approximation)
G1(ω) = NdotV / (NdotV * (1 - k) + k) where k = α/2 (direct lighting)
- Schlick Fresnel
-
Disney Principled BRDF
- Brent Burley (Disney) 2012 — artist-friendly parameterization
- Parameters:
baseColor, metallic, roughness, specular, specularTint, anisotropic, sheen, sheenTint, clearcoat, clearcoatGloss, subsurface, transmission
- Widely used in production (Unreal, Unity, Godot PBR)
- Combines diffuse + specular + clearcoat + sheen layers
- Diffuse term: modified Lambertian with retro-reflection at grazing angles
f_diffuse = (baseColor/π) * (1 + (F_D90 - 1)(1-NdotL)^5) * (1 + (F_D90 - 1)(1-NdotV)^5)
F_D90 = 0.5 + 2 * roughness * VdotH²
-
BSDF (Bidirectional Scattering Distribution Function)
- Generalization of BRDF that includes transmission
f_s(ω_i, ω_o) — handles both reflection and refraction
- BRDF: reflection only (ω_i and ω_o on same side)
- BTDF: transmission only (ω_i and ω_o on opposite sides)
- BSDF = BRDF + BTDF
- Used for glass, water, translucent materials
-
BRDF Sampling
- To importance sample a BRDF, need to sample
ω_i proportional to f_r * cos(θ_i)
- Lambertian: cosine-weighted hemisphere sampling
θ = arccos(sqrt(1 - ξ₁)), φ = 2π * ξ₂
- PDF:
p(ω) = cos(θ) / π
- GGX: sample half-vector from NDF, reflect view direction
θ_h = arctan(α * √(ξ / (1 - ξ))), φ_h = 2π * ξ_2
h = spherical_to_cartesian(θ_h, φ_h) in tangent space
ω_i = reflect(-ω_o, h)
- PDF:
p(ω_i) = D(h) * NdotH / (4 * VdotH)
- VNDF sampling (Heitz 2018) — better for GGX at grazing angles
- Sample visible NDF: proportional to
D(h) * G1(ω_o) * dot(ω_o, h)
- Fewer wasted samples for rough surfaces at grazing angles
-
Layered BRDFs
- Real materials often have multiple layers
- Clearcoat: thin specular layer over diffuse/specular base
f_total = f_clearcoat + (1 - F_clearcoat) * f_base
- Sheen: retroreflective layer for fabric/velvet
- Subsurface: light enters and exits at different points (BSSRDF)