i
i
i
i
i
i
i
i
7.6. BRDF Models 261
(it uses a constant specular color instead). Both omissions are motivated by
simplicity and by the fact that these effects tend to work at cross-purposes
(shadowing and masking decrease reflectance at glancing angles, and the
Fresnel effect increases it). In practice, lack of the Fresnel term causes
the Ward BRDF to diverge in appearance from real materials [926]. In
addition, the 1/(
cos θ
i
cos θ
o
) visibility term causes the reflectance to go to
infinity at grazing angles, making the surface too bright [925]. For these
reasons, we do not recommend adopting the Ward BRDF’s visibility term,
or its lack of a Fresnel term (although as mentioned above, its NDF is
worth considering).
Seeking to find a realistic balance between the “too-dark” effects of
no visibility term (Phong and Blinn-Phong BRDFs) and the “too-bright”
effects of the 1/(
cos θ
i
cos θ
o
) visibility term (Ward BRDF), Neumann et
al. [925] proposed a new visibility term: 1/ max(
cos θ
i
, cos θ
o
). The specu-
lar term of the Ashikhmin-Shirley BRDF [42, 43] used a similar visibility
term: 1/(cos α
h
max(cos θ
i
, cos θ
o
)). Ashikhmin and Premoˇze [46] propose
dropping the cos α
h
factor, and replacing the Neumann visibility term with
a more continuous alternative: 1/(
cos θ
i
+ cos θ
o
cos θ
i
cos θ
o
).
The visibility terms found in empirical BRDFs are designed primarily to
ensure reasonable behavior at glancing angles. Those included in physically
based microfacet BRDF models have explicit geometry factors designed to
model shadowing and masking, divided by cosine terms to model foreshort-
ening. The most well-known geometry factor was derived by Torrance and
Sparrow [1270], and later introduced to computer graphics (re-derived in a
greatly simplified form) by Blinn [97]:
G
TS
(l, v)=min
1,
2
cos θ
h
cos θ
o
cos α
h
,
2
cos θ
h
cos θ
i
cos α
h
. (7.54)
This same geometry factor was later used by Cook and Torrance in their
BRDF model [192, 193]. Kelemen and Szirmay-Kalos derived an approxi-
mation to this geometry factor that is numerically more stable and signif-
icantly cheaper to evaluate [640]. Instead of approximating the geometry
factor by itself, they found a simple approximation to the entire microfacet
visibility term:
G
TS
(l, v)
cos θ
i
cos θ
o
2
1+l · v
=
4
h
· h
=
1
cos
2
α
h
, (7.55)
where h
is the non-normalized half vector, or l+v. It is interesting to note
that when the rightmost form is used, the complete microfacet BRDF can
be factored into two functions, each of which depends on just one variable:
p(θ
h
)/4k
p
and R
F
(α
h
)/(cos
2
α
h
).
In reality, shadowing and masking depend heavily on the surface rough-
ness. This has not been accounted for in any of the geometry factors pre-
i
i
i
i
i
i
i
i
262 7. Advanced Shading
sented so far. Two roughness-dependent geometry factors from other fields
have been used in computer graphics. A geometry factor introduced by
Sancer [1102] was used by Stam in his diffraction BRDF [1213], and one
introduced by Smith [1193] was used in the HTSG BRDF model [515].
Both of these factors are quite complex and expensive to compute, but
a reasonably cheap approximation to the Smith shadowing function was
introduced by Schlick [1128]:
G
Smith
(l, v)
cos θ
i
cos θ
i
(1 k)+k

cos θ
o
cos θ
o
(1 k)+k
, (7.56)
where k =
2m
2
.Herem is not the cosine power, but rather the root
mean square (RMS) slope of a Beckmann NDF—published equivalences
between the NDFs [769] can be used to calculate it from the cosine power
if needed.
The 2000 paper by Ashikhmin et al. [41] give a method for deriving a
geometry factor that matches an arbitrary NDF. Since it is based on inte-
grals that are unlikely to have a closed form in most cases, implementations
of this geometry factor will likely be based on lookup tables.
Ashikhmin [44] analyzes the relative importance of the Fresnel, NDF,
and visibility terms of various microfacet BRDFs. He finds that the NDF
term is by far the most important for determining appearance, followed by
the presence or absence of a Fresnel term. The visibility factor is the least
important of the three.
A physical phenomenon not modeled by the modified Phong BRDF in
Equation 7.49 is the retroreflection seen in certain rough surfaces (as ex-
plained in Figure 7.28 on page 245). Blinn described a BRDF intended
to model such surfaces [100]. Oren and Nayar [973] proposed a different
BRDF targeted at the same problem. The Oren-Nayar BRDF is particu-
larly interesting since it applies microfacet theory to Lambertian facets. A
simplified version of this BRDF is given as
f(l, v)=
c
diff
π
A + B
cos(φ) sin(min(θ
i
o
)) tan(max(θ
i
o
))
, (7.57)
where φ is the relative azimuth angle between the projections of the in-
coming light direction l and the view direction v (see Figure 7.15). A and
B are defined thus:
A =1 0.5
σ
2
σ
2
+0.33
,
B =0.45
σ
2
σ
2
+0.09
.
(7.58)
The intermediate values A and B are computed from σ, the roughness.
The roughness σ is defined as the standard deviation of the angle between
i
i
i
i
i
i
i
i
7.6. BRDF Models 263
Figure 7.40. Simplified Oren-Nayar, with roughness values (going from left to right)
of 0 (Lambertian), 0.3(17
), 0.6(34
), and 1.0(57
). (Images courtesy of Michal
Valient [1285, 1286].)
the microfacet surface normals and the macroscopic surface normal. It is
measured in radians. According to Oren and Nayar, a σ value of 0.52 (30
)
corresponds to a “very rough surface.” They show graphs and renderings
for σ values up to 0.7(40
). See Figure 7.40. A visualization of the various
terms is shown in Figure 7.41. When the roughness is zero, the equation
devolves to c
diff
, the Lambertian BRDF, Equation 7.36. Oren and Nayar
note that the 0.33 in the term for A can be replaced by 0.57 to better
approximate surface interreflection.
Valient [1285, 1286] presents techniques to rapidly evaluate this equa-
tion on the GPU. For a constant roughness, A and B can be precomputed.
To compute
cos(φ), the light and view vectors are projected to the surface’s
tangent plane:
v
proj
= v n(n ·v),
l
proj
= l n(n ·l).
(7.59)
sin tan
ABcos(φ)f
f finalR
diff
n l
Figure 7.41. Visualization of simplified Oren-Nayar shading. The sin ×tan and f
(BRDF) values extend beyond 1 and are visualized using a false-color ramp (black is 0,
red is 1, yellow is 2 and white is 3). (Images courtesy of Michal Valient [1285, 1286].)
i
i
i
i
i
i
i
i
264 7. Advanced Shading
The resulting vectors are normalized, and the dot product of these vectors
is then clamped to be non-negative, so computing the
cos term. Valient
converts the sin × tan term to a two-dimensional texture lookup, where
the texture coordinates are n · l and n · v. Hoxley [314] gives a texture
lookup version and a computed version.
In conclusion, although a large variety of analytic BRDF models exist
in the literature, for most applications, a simple yet reasonably expressive
model such as the one in Equation 7.49 will suffice. In cases where a
different BRDF is desired, pieces of models presented here can be added in
a “mix-and-match” fashion to produce a new analytic BRDF. The Phong
NDF can be extended to a sum of lobes, or an anisotropic NDF can be
used [42, 43, 1326]. Alternatively, the Kajiya-Kay modification [620] can
be applied to convert an isotropic BRDF into an anisotropic one. The
realism of the BRDF can be improved by incorporating visibility terms
that change the behavior at glancing angles. The visibility term derived by
Kelemen and Szirmay-Kalos [640] is particularly worthy of consideration
due to its low cost and physical basis. The Lambertian diffuse term can
be replaced with one that models the tradeoff between surface and body
reflectance (see Section 7.5.4).
This “mixing and matching” can be extended to pieces represented as
lookup tables, since they do not have an analytic closed-form expression.
This might be because the values are manually painted for creative reasons.
NDF maps are one possibility, but there are others. For example, a one-
dimensional lookup table could be used for the Fresnel term, to allow for
hand-painted color shifts at glancing angles. In other cases, BRDF terms
are derived by computing integrals that may not have closed-form solutions,
such as the microfacet geometry term introduced by Ashikhmin et al. [41],
or the reciprocal energy-conserving diffuse term introduced by Shirley et
al. [640, 1170]. Incorporating such lookup tables can make a BRDF more
expressive. However, a lookup table is not something we can modify by a
parameter, so it cannot easily be made to vary over a surface.
ThefieldofpossibleBRDFmodelsandrepresentations is vast. We have
endeavored to cover the options of most relevance to real-time rendering,
but many others remain. Interested readers are referred to the available
surveys [44, 926, 1129, 1170, 1345, 1346], as well as the second volume of
Glassner’s Principles of Digital Image Synthesis [409] and the more recent
Digital Modeling of Material Appearance [275] by Dorsey, Rushmeier, and
Sillion.
7.7 BRDF Acquisition and Representation
In most real-time applications, BRDFs are manually selected and their
parameters set to achieve a desired look. However, sometimes BRDFs are
i
i
i
i
i
i
i
i
7.7. BRDF Acquisition and Representation 265
acquired, or measured, directly from actual surfaces. In some cases this
is done to closely match rendered objects to real ones (digital doubles in
film production, or digital reproductions of cultural artifacts). In others,
it may be done to save authoring time. In either case, two problems need
to be solved: how to capture the BRDF data, and once captured, how to
represent it for later rendering.
7.7.1 Acquiring BRDFs
Goniometers, imaging bidirectional reflectometers, and image-based meth-
ods have been used to obtain the reflectance measurements over the in-
coming and outgoing angles. Some of these databases are public and
available online, such as those from Cornell University [200], Columbia-
Utrecht [190], and MIT [871]. Ward [1326] discusses measurement in depth,
Kautz et al. [630] give an overview of acquisition techniques, and Marschner
et al. [821] discuss previous work and their own image-based method for
measuring BRDFs, which has been since further refined by Matusik [825]
and Ngan [926].
While the previously mentioned techniques measure a single BRDF
function, the capture of spatially varying BRDFs (SVBRDFs) is of more
interest, since real-world objects rarely have uniform reflectance. Acquisi-
tion of SVBRDFS [225, 226, 1255] is an active area of research, especially
from human faces [232, 369, 388, 1349]. Some SVBRDF capture tech-
niques [232, 377, 495] have been used in commercial applications [2, 1096].
The Columbia-Utrecht database [190] includes some spatially variant mea-
surements, as well as individual BRDFs.
7.7.2 Representations for Measured BRDFs
The result of a BRDF capture is a large, densely sampled four-dimensional
table (six-dimensional for SVBRDFs). The acquisition process also un-
avoidably introduces noise into the data. For these reasons, the raw data
is unsuitable to be used directly for rendering—it must first be converted
into some other representation [1089].
One common method is to select an analytic BRDF and fit its param-
eters to the measured data. This results in a very compact representation,
and rendering is reasonably fast. The results are also easy to edit man-
ually if needed. However, it is not always simple to choose a BRDF for
this purpose, and fitting involves a complex and time-consuming optimiza-
tion process. The error introduced can be quite large and depends on the
BRDF model chosen. One way to improve the quality of the results (al-
though further complicating the fitting process) is to use a weighted sum
of multiple BRDF terms, such as Ward [1326] or Blinn-Phong [97] lobes.
..................Content has been hidden....................

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