Game Development Reference
In-Depth Information
performance bottleneck. The basic idea is this: if the distance to the viewer
is large relative to the size of an object, then v may be computed once and
then considered constant for an entire object. Likewise for a light source
and the vector l . (In fact, for directional lights, l is always constant.) How-
ever, since the surface normal n is not constant, we must still compute the
reflection vector r , a computation that we would like to avoid, if possible.
The Blinn model introduces a new vector h , which stands for “halfway” vec-
tor and is the result of averaging v and l and then normalizing the result:
The halfway vector h,
used in the Blinn
specular model
v + l
v + l .
h =
Then, rather than using the angle between v and r , as the Phong model
does, the cosine of the angle between n and h is used. The situation is
shown in Figure 10.23.
Figure 10.23
Blinn model for specular reflection
The formula for the Blinn model is quite similar to the original Phong
model. Only the dot product portion is changed.
The Blinn Model for Specular Reflection
m spec ) (cosθ) m gls = ( s spec
m spec ) ( n h ) m gls .
c spec = ( s spec
The Blinn model can be faster to implement in hardware than the Phong
model, if the viewer and light source are far enough away from the object
to be considered a constant, since then h is a constant and only needs to be
computed once. But when v or l may not be considered constant, the Phong
calculation might be faster. As we've said, the two models produce similar,
but not identical, results (see Fisher and Woo [21] for a comparison). Both
Search WWH ::




Custom Search