Game Development Reference
In-Depth Information
Figure 7.20. Surface roughness is characterized by how much the slopes of the micro-
facets vary.
microfacets . Each microfacet is treated as a perfect reflector that obeys the reflec-
tive laws of electromagnetic theory. The roughness of a surface is characterized
by the slopes of the microfacets. As shown in Figure 7.20, a rough surface is
composed of microfacets having greatly varying slopes, whereas the microfacets
for a relatively smooth surface have only small slopes.
Cook and Torrance use the following formula for the specular component
of the BRDF given in Equation (7.53).
(
)
(
)
VL
,
G
VL
,
D
(
)
(
)
VL
,
=
VL
,
(7.54)
s
(
)(
)
π
NV NL
is the Fresnel factor, which describes the amount and color of light reflected as
a function of the angle of incidence; D is the microfacet distribution function,
which returns the fraction of microfacets oriented in a given direction; and G is
the geometrical attenuation factor, which accounts for self-shadowing of the mi-
crofacets. Since the microfacets are perfect reflectors, only those microfacets
whose normal vectors point in the direction of the halfway vector H contribute to
the specular reflection.
The π appearing in the denominator of Equation (7.54) is a normalization
factor that accounts for the fact that the incident flux density Φ I at a surface for a
constant emitted radiance C is given by
ππ
2
(
)

Φ
=
C
NL
=
cos
φ φdφdθ C
sin
=
.
(7.55)
I
E
E
00
7.9.3 The Fresnel Factor
The interaction of an electromagnetic wave and a surface results in a reflected
wave and a transmitted wave. The energy contained in the reflected wave is equal
to the energy contained in the incident wave minus the energy contained in the