Graphics Reference
In-Depth Information
although the standard interpretation of these words as descriptions of the light
arriving at the surface was also common. The “lighting model” was typically eval-
uated at the vertices of a triangular mesh and then interpolated in some way to give
values at points in the interior of the triangle. This latter interpolation process was
known as shading, and you'll sometimes read of Gouraud shading (barycentric
interpolation of values at the vertices) or Phong shading, in which, rather than
interpolating the values, the component parts were interpolated so that the normal
vector was reestimated for each internal point of each triangle, and then the inner
product with the incoming light vector was computed, etc. In each case, the desire
was to reduce the artifacts arising from computing the scattering only at the tri-
angle vertices. One of the problems, for instance, with Gouraud shading was that
the different rates of intensity variation in two triangles that shared an edge led to
an enhanced perception of that edge through Mach banding (see Sections 1.7 and
5.3.2) rather than causing the edges to disappear. Thus, although the quality of
the approximation to the ideal was good when measured in physical terms (“How
different is the intensity from the true one?”), in perceptual terms (“How different
does this surface appear from the true surface?”) it was not.
Nowadays we refer to shading and lighting differently: The description of the
outgoing light in response to the incoming light is called a reflection model or
scattering model, and the program fragment that computes this is called a shader.
Because of the highly parallel nature of most graphics processing, the scattering
model is usually evaluated at every pixel, often multiple times, and the “shading”
process (i.e., interpolation across triangles) is no longer necessary; furthermore,
so many triangles are subpixel in size that this interpolation would never be used
anyhow. So the modern use of the word “shader” is unlikely to lead to confusion.
27.5.4 The Lafortune Model
The Phong model expressed the specular component of the BRDF as a cosine
power (specifically, as a power of the cosine of the angle between the out-
going direction and the mirror-reflection direction). Letting R (
, n ) denote the
v
mirror-reflection direction of
at a surface with normal n —in the case where
v
n = 001 T , R (
, n ) is just −ω x −ω y
ω z T —the glossy part of the
v
Phong BRDF is simply
v i , n )) e ,
f r ( P ,
v i ,
v o )= C (
v o ·
R (
(27.22)
where C is a normalization constant. This BRDF is evidently reciprocal in the
case where n = 001 T : Swapping
v i merely negates the x - and
y -coordinates of each vector, thus leaving the dot product unchanged.
v o and
Inline Exercise 27.2: Why does the reciprocality in the case where n =
001 T prove that the formulation is reciprocal in all cases?
Lafortune et al. noticed that measured BRDFs tended to have lobes that
were not necessarily centered about the mirror direction, and that sometimes
they appeared to have multiple lobes. By taking a sum of Phong-like terms, but
with varying substitutes for the mirror direction, they generalized to produce a
much richer model, based on a collection of lobes centered at k different vectors
 
 
 
Search WWH ::




Custom Search