CG Rendering Styles (Part 1)——Deconstructing PBR
1. BSDF (Bidirectional Scattering Distribution Function)
The BSDF describes how light is transferred from an incident direction to an outgoing direction at a surface.
In simpler terms, it explains:
“When light hits a material, how does the surface respond to it?”
This is the foundation of almost every modern shading model in computer graphics.
A surface usually contains several lighting components:
- Diffuse Reflection
- Specular Reflection
- Ambient Lighting
- Emissive Lighting
Different rendering styles and material models are essentially different ways of describing these lighting behaviors.
2. The Foundation of Microfacet Theory: Diffuse Model
2.1 Lambertian Reflectance
- Core Concept:Lambertian is an ideal diffuse reflection model. It assumes that incoming light is scattered evenly in all directions after hitting the surface.
This means the surface looks equally bright from every viewing angle.
Unlike specular reflection, diffuse lighting does not depend on the camera direction. It only depends on:
- the surface normal
- the light direction
This makes Lambertian one of the simplest and most important lighting models in real-time rendering.
- Maths:The Lambertian model follows Lambert’s cosine law:
Where:
- N = surface normal direction
- L = light direction
- N · L = cosine of the angle between them
The dot product measures how directly the surface faces the light source.
As the angle increases, the received light energy decreases gradually.
- Rule Breakdown: N dot L
Here is a schematic diagram of Lambert’s cosine law shows that as the angle between the light direction L and the surface normal N increases, the amount of received light decreases.
This is why surfaces appear darker when they face away from the light source.
2.2 Implementation: Diffuse Lighting
3. Empirical Specular Models
Diffuse lighting alone cannot describe shiny materials such as metal, plastic, or polished surfaces.
To simulate highlights, computer graphics introduced empirical specular models.
These models are not physically accurate, but they are computationally cheap and visually convincing, which made them extremely popular in early real-time rendering.
3.1 Phong Model
- Core Concept:The Phong model calculates specular highlights based on the angle between:
- the view direction
- and the reflected light direction
When the camera direction aligns closely with the reflection direction, a bright highlight appears on the surface.
3.2 Blinn-Phong Model
The Blinn-Phong model improves the original Phong model by introducing the Half Vector.
Instead of comparing the reflection direction with the view direction, it compares:
- the surface normal
- and the half vector between the light and view directions
This reduces computational cost and produces more stable highlights in real-time rendering.
- Half Vector:
- L = light direction
- V = view direction
- Rule Breakdown: N dot H
As the surface normal aligns more closely with the half vector, the specular highlight becomes stronger.
This approximation avoids the expensive reflection calculation required in the original Phong model.
- Implementation: Specular lighting and Ambient Color:
Although Lambertian, Phong, and Blinn-Phong were widely used in traditional rendering pipelines, they are still empirical approximations rather than physically accurate light transport models.
Modern PBR workflows later evolved from these ideas by introducing:
- energy conservation
- Fresnel reflection
- microfacet theory
- physically-based BRDFs
which eventually led to models such as Cook-Torrance and GGX.