Game Development Reference
In-Depth Information
Figure 10.22. Different values for m gls and m spec
diffuse calculations—this is a feature of the lighting model used to achieve
special effects in certain circumstances, but it doesn't have any real-world
meaning. In practice, s spec is almost always equal to the light color used
for diffuse lighting, which, not surprisingly, is denoted in this topic as s diff .
Figure 10.22 shows how different values of m gls and m spec affect the
appearance of an object with specular reflection. The material specular
color m spec goes from black on the leftmost column to white on the right-
most column. The specular exponent m gls is large on the top row and
decreases with each subsequent row. Notice that the heads in the left-most
column all look the same; since the specular strength is zero, the specular
exponent is irrelevant and there is no specular contribution in any case.
(The lighting comes from the diffuse and ambient components, which are
discussed in Sections 10.6.3 and 10.6.4, respectively.)
Blinn [6] popularized a slight modification to the Phong model that
produces very similar visual results, but at the time was a significant opti-
mization. In many cases, it is still faster to compute today, but beware that
vector operations (which are reduced with this model) are not always the
Search WWH ::




Custom Search