Game Development Reference
In-Depth Information
We can modify the microfacet distribution function to account for aniso-
tropic surface roughness by changing Equation (7.71) to
(
)
2
(
)
2
(
)
2
1

TP
1
TP
NH
1
(
)
D
VL
,
=
exp
+
, (7.72)
m
(
)
4
2
2
(
)
2
4
mm
NH
m
m
NH

xy
x
y
where m is a two-dimensional roughness vector, T is the tangent to the surface
aligned to the direction in which the roughness is m , and P is the normalized
projection of the halfway vector H onto the tangent plane:
(
)
HNHN
−⋅
P
=
HNHN .
(7.73)
(
)
−⋅
Figure 7.22 shows a disk rendered with both isotropic and anisotropic surface
roughness values. Some surfaces exhibit roughness at multiple scales. This can
be accounted for by calculating a weighted average of microfacet distribution
functions
n
m
(
)
D
VL
,
=
wD
(
VL ,
,
)
(7.74)
i
i
i
=
1
where multiple roughness values m are used and the weights w sum to unity.
Figure 7.23 shows two objects rendered with different values of m and another
object rendered using a weighted sum of those same values.
Figure 7.22. A disk rendered using the anisotropic distribution function given by Equa-
tion (7.72). For each image
. From left to right the values of m are 0.1 (iso-
tropic), 0.12, 0.15, and 0.2. The tangent vectors are aligned to concentric rings around the
center of the disk—they are perpendicular to the radial direction at every point on the
surface.
=
0.1
m
y