30. Mathematics of Lighting and Shading part 4
Dated: 02-07-2025
Light Attenuation
Here \(f_\text{atten}\) is the attenuation
factor, which is amount of intensity
light
loses as the distance \(d\) between the photon and its source increases.
The lighting equation
with attenuation
looks like
Schlick's Simplification for the Specular Exponential Term
In this simplification, the \((S)^{m_s}\) factor in Phong
or Blinn Phong
1 is replaced by
Oren - Nayar
Diffuse
2 Reflection
Full Moon
The full moon does not show Lambertian diffuse shading
. In fact, due to the rough surface, it also backscatter some light
.
Oren
and Nayar [OREN 1992]
came up with a generalized version of a Lambertian diffuse shading model
that tries to account for the roughness of the surface
.
The terms
- \(\frac \rho \pi\) is a surface
reflectivity
property, which can be replaced with oursurface diffuse color
. - \(E_0\) is a
light
input energy term, which can be replaced with ourlight diffuse color
2
More terms
- \(\rho\) is the
surface roughness parameter
. It's thestandard deviation
in radians of the angle of distribution of themicrofacets
in thesurface roughness model
. The larger the value, the rougher thesurface
. - \(\theta_r\) is the
angle
between thevertex normal
3 and the view direction. - \(\phi_r - \phi_i\) is the circular angle (about the
vertex normal
3) between thelight vector
4 and the viewvector
.4 - \(\alpha\) is \(\max(\theta_i, \theta_r)\)
- \(\beta\) is \(\min(\theta_i, \theta_r)\)
Additional notes
If the roughness
value is \(0\), the model is same as Lambertian diffuse model
. Oren
and Nayar
also note that we can replace the value \(0.33\) in coefficient \(A\) with \(0.57\) to better account for surface inter-reflection
.