i
i
i
i
i
i
i
i
7.6. BRDF Models 251
Figure 7.34. Photographs of surfaces lit and viewed at glancing angles. These surfaces
clearly exhibit narrow highlights, which the highlights generated by half-vector-based
BRDFs closely resemble. (Photographs courtesy of Elan Ruskin.)
the shape of the highlight may differ significantly. For highly curved sur-
faces, there is little difference. For such surfaces, curvature, not BRDF,
primarily determines highlight shape. However, on flat surfaces, the shape
of the highlight differs greatly between half-vector- and reflection-vector-
based BRDFs. Half-vector-based BRDFs have highlights that become in-
creasingly elongated at glancing angles, and reflection-vector-based BRDFs
have circular highlights regardless of viewing angle [1124]. Ngan [926, 927]
presents an interesting analysis of the reason behind this difference.
The differing behaviors of reflection-vector- and half-vector-based
BRDFs can be seen in the rendered images of Figure 7.33. Which of these
behaviors is closer to reality? The answer to that question can be seen
in Figure 7.34, which shows three photographs of rough, flat surfaces un-
der similar viewing and lighting conditions to the top row of Figure 7.33.
The highlight shapes in the photographs clearly resemble the results of the
half-vector-based BRDF, and not the reflection-vector-based BRDF. This
is not surprising, since the former is based on physical principles, while
the latter is not. Aside from the anecdotal evidence of these photographs,
quantitative experimental analysis has also found that half-vector-based
BRDFs match real-world materials more closely than reflection-vector-
based BRDFs [926, 927].
7.6 BRDF Models
In most applications BRDFs are represented analytically, as mathematical
equations. Many such models have appeared in the computer graphics
i
i
i
i
i
i
i
i
252 7. Advanced Shading
literature, and several good surveys are available [44, 926, 1129, 1170, 1345,
1346]. BRDF models fall into two broad groups: those based on physical
theory [41, 97, 192, 193, 515, 640, 973, 1027, 1213] and those that are
designed to empirically fit a class of surface types [42, 43, 1014, 1326].
Since the empirical BRDF models tend to be simpler, they are more
commonly used in real-time rendering. The first such model used in ren-
dering was the Lambertian or constant BRDF. Phong introduced the first
specular model to computer graphics in 1975 [1014]. This model is still in
common use; however, it has several drawbacks that merit discussion. The
form in which the Phong lighting model has historically been used (shown
with a single light source for simplicity) is
L
o
(v)=
cos θ
i
c
diff
+ cos
m
α
r
c
spec
B
L
, where θ
i
> 0,
0, where θ
i
0.
(7.44)
The use of B
L
rather than E
L
is due to the fact that this form of the
shading equation does not use physical illumination quantities, but rather
uses ad hoc “brightness” values assigned to light sources. Recall from
Section 7.5.4 that effectively B
L
= E
L
. Using this and Equation 7.21,
we can transform Equation 7.44 into a BRDF:
f(l, v)=
c
diff
π
+
c
spec
cos
m
α
r
π cos θ
i
, where θ
i
> 0,
0, where θ
i
0.
(7.45)
Comparing this to Equation 7.36 on page 240 shows that c
diff
is equal
to the directional-hemispherical reflectance of the diffuse term. This is
fortunate—reflectance values make very good BRDF parameters. As a
reflectance value, c
diff
is restricted to values between 0 and 1, so it can be
selected with color-picker interfaces, stored using standard texture formats,
etc. The fact that c
diff
has a clear physical interpretation can also be used
to help select appropriate values for it.
It would be useful to ensure that c
spec
is a reflectance value, as well.
To do this, we need to look at the directional-hemispherical reflectance
R
spec
of the specular term. However, it turns out that for Equation 7.45,
R
spec
is unbounded, increasing to infinity as θ
i
goes to 90
[769]. This
is unfortunate—it means that the BRDF is much too bright at glancing
angles. The cause of the problem is the division by
cos θ
i
.Removingthis
division also allows us to remove the conditional term, resulting in a simpler
BRDF:
f(l, v)=
c
diff
π
+
c
spec
cos
m
α
r
π
. (7.46)
This version of the Phong BRDF is more physically plausible in several
ways—its reflectance does not go to infinity, it is reciprocal, and it lacks
i
i
i
i
i
i
i
i
7.6. BRDF Models 253
Figure 7.35. The cutoff in Equation 7.45 when θ
i
=90
can cause artifacts, as seen by
the unnatural line towards the bottom right of the figure.
the abrupt cutoff when θ
i
=90
. An example of an artifact caused by this
cutoff can be seen in Figure 7.35.
The directional-hemispherical reflectance of the specular term in Equa-
tion 7.46 can now be calculated. It turns out that when θ
i
=0,it
reaches a maximum value of 2c
spec
/(m + 2). If we divide the specular
term by 2/(m + 2), then c
spec
will be equal to the maximum directional-
hemispherical reflectance [586]:
f(l, v)=
c
diff
π
+
m +2
2π
c
spec
cos
m
α
r
. (7.47)
This process of multiplying a BRDF term by a value to ensure that pa-
rameters such as c
spec
are equivalent to reflectance values is called BDRF
normalization. The value by which the term is divided is called a normal-
ization factor, and the resulting BRDF is referred to as a normalized BRDF.
Normalized BRDFs have many advantages over non-normalized ones. We
have already discussed the benefits of color parameters being closely related
to reflectance values. In this case c
spec
is equal to the maximum value of the
directional-hemispherical reflectance of the specular term, which in turn is
closely related to the Fresnel reflectance at normal incidence R
F
(0
). Since
Equation 7.47 does not account for the Fresnel effect, using c
spec
= R
F
(0
)
will probably be too dark. Using a value for c
spec
that is partway between
white and R
F
(0
) may work better. If energy conservation is desired (it
can sometimes be a useful guideline to help ensure realism), this can be
guaranteed by ensuring that c
diff
+ c
spec
1.
Another important effect of normalization is that now the m parame-
ter is independent of reflectance and only controls surface roughness. In
i
i
i
i
i
i
i
i
254 7. Advanced Shading
exponent:
1
2 4 8 32 256
0
0
-π/4 π/4
π/2
-π/2
1
0.2
0.4
0.6
0.8
Figure 7.36. Graph of unnormalized cosine power term versus angle for various ex-
ponents. Increasing the exponent pulls the curve in, making for a tighter highlight.
However, the height of the curve remains unchanged. This causes the total specularly
reflected energy to decrease.
the non-normalized version of the BRDF, changing m changed both the
amount and distribution of outgoing light. To understand why, see Fig-
ure 7.36. With higher exponents, the width of the curve (and thus the size
of the rendered highlight) decreases; however the peak of the curve (the
brightness at the highlight center) remains the same. The overall energy in
the highlight decreases, since it is related to the integral under this curve.
This behavior was necessary when graphics hardware could not handle val-
ues outside the 0 to 1 range, but, it is avoidable today and is undesirable.
With non-normalized BRDFs, adjusting the surface roughness changes the
reflectance as a side effect. This is bad because the reflectance defines
the perceived specular color. This color defines the “look” of gold, copper,
glass, etc. independent of surface roughness. For example, with a normal-
ized BRDF an artist can set the overall specular color of a gold statue to
the appropriate value (see Table 7.4) and then paint a roughness map with
detail to show where the statue is smooth and where it is rough. The rough
and smooth areas will both look like gold. If a non-normalized BRDF is
used, then to get the correct gold appearance, the artist would need to
use a second texture controlling the specular color and painstakingly paint
values into it that would compensate for the roughness values. Worse still,
depending on the surface roughness, these values could be very small or
very large, making it difficult or impossible to store them in a texture.
Compare this graph to Figure 7.37, which shows normalized curves.
When the exponent increases (corresponding to a smoother surface), the
size of the highlight decreases, but its brightness increases, keeping the
total reflectance constant. Recall that although reflectance values such as
i
i
i
i
i
i
i
i
7.6. BRDF Models 255
0
2
1
3
4
5
40
39
41
exponent:
1
2 4 8 32 256
0
-π/4 π/4
π/2
-π/2
Figure 7.37. Graph of normalized cosine power term versus angle for various exponents.
Increasing the exponent not only makes the curve narrower, but also higher. This
increase in height compensates for the decrease in width, keeping the total reflected
energy constant.
R are limited to the 0 to 1 range, BRDF values can (and often do) exceed
1, especially in the case of smooth surfaces.
Figure 7.38 shows a series of spheres rendered with both the original
and normalized Phong BRDFs. The intent is to model spheres that are
the same except for their smoothness, so the specular and diffuse colors are
held constant and m is varied. The images rendered with the normalized
Phong BRDF show the highlight becoming brighter as it narrows, which is
both physically correct and visually convincing. The images rendered with
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset