BRDF: Bidirectional Reflectance Distribution Function Explained
What is BRDF
BRDF (Bidirectional Reflectance Distribution Function) is a four-dimensional function that describes how light reflects off a surface. It defines the ratio of reflected radiance to incident irradiance for given incoming and outgoing directions. BRDF is the theoretical foundation of PBR, used to compute material lighting response.
Mathematical Definition of BRDF
The BRDF is defined as:
`f_r(ω_i, ω_o) = dL_o(ω_o) / dE_i(ω_i)`
where ω_i is the incoming light direction, ω_o is the reflected light direction, L_o is the reflected radiance, and E_i is the incident irradiance. A BRDF must satisfy two physical constraints:
- **Reciprocity**: Swapping incoming and outgoing directions leaves the BRDF value unchanged.
- **Energy conservation**: The integral over all outgoing directions does not exceed the incoming energy.
Common BRDF Models
Lambertian Diffuse
The simplest diffuse model, assuming a perfectly rough surface with uniform reflection. The BRDF is a constant `ρ/π`, where ρ is the albedo. It is commonly used for the diffuse term.
Phong and Blinn-Phong
Classic empirical models: Phong uses the dot product of the reflection vector and view direction for specular highlights; Blinn-Phong optimizes with the half-vector. They do not strictly conserve energy but are computationally efficient.
Cook-Torrance Model
Widely used microfacet model in modern PBR. It splits BRDF into diffuse and specular terms, with the specular term based on microfacet theory:
`f_spec = (D * G * F) / (4 * (N·L) * (N·V))`
- **D (Normal Distribution Function)**: Describes the distribution of microfacet normals; commonly GGX/Trowbridge-Reitz.
- **G (Geometric Attenuation Function)**: Describes microfacet self-shadowing; commonly Smith model.
- **F (Fresnel Term)**: Describes reflectivity variation with angle; commonly Schlick approximation.
Other Models
- **Oren-Nayar**: Accounts for rough surface diffuse, more accurate than Lambertian.
- **Disney Principled BRDF**: Artist-friendly parameterized model, adopted by many engines.
Application in Real-Time Rendering
In real-time rendering, shaders typically use a simplified Cook-Torrance model. For example, Unity's Standard Shader and Unreal's Lit Shader are based on the GGX microfacet model and Schlick Fresnel approximation. BRDF is also used in precomputed environment lighting (e.g., prefiltered IBL).
FAQ
What is the relationship between BRDF and PBR?
PBR (Physically Based Rendering) requires physically correct BRDF models like Cook-Torrance to ensure energy conservation and realism.
Why are there multiple BRDF models?
Different models trade off performance, realism, and complexity. Simple models suit mobile, complex models suit high-end rendering.
What is a microfacet model?
A microfacet model assumes the surface comprises tiny facets, with roughness described by statistical distribution; it is the basis of Cook-Torrance.
Does BRDF satisfy reciprocity?
A physically correct BRDF must satisfy reciprocity, meaning swapping incoming and outgoing directions yields the same result.
How to choose a BRDF model?
For PBR rendering, the GGX microfacet model is recommended for its good balance between realism and performance.
FAQ
What is the relationship between BRDF and PBR?
PBR requires physically correct BRDF models like Cook-Torrance to ensure energy conservation and realism.
Why are there multiple BRDF models?
Different models trade off performance, realism, and complexity. Simple models suit mobile, complex models suit high-end rendering.
What is a microfacet model?
A microfacet model assumes the surface comprises tiny facets, with roughness described by statistical distribution; it is the basis of Cook-Torrance.
Does BRDF satisfy reciprocity?
A physically correct BRDF must satisfy reciprocity, meaning swapping incoming and outgoing directions yields the same result.
How to choose a BRDF model?
For PBR rendering, the GGX microfacet model is recommended for its good balance between realism and performance.