Game Development Reference
In-Depth Information
very tight hotspot with sharp falloff. (Here we are talking about the hotspot
of a reflection, not to be confused with the hotspot of a spot light.) Perfectly
reflective surfaces, such as chrome, would have an extremely high value for
m gls . When rays of light strike the surface from the incident direction l ,
there is very little variation in the reflected directions. They are reflected in
a very narrow solid angle (“cone”) surrounding the direction described by r ,
with very little scattering. Shiny surfaces that are not perfect reflectors—for
example, the surface of an apple—have lower specular exponents, resulting
in a larger hotspot. Lower specular exponents model a less perfect reflection
of light rays. When rays of light strike the surface at the same incident
direction given by l , there is more variation in the reflected directions. The
distribution clusters about the bounce direction r , but the falloff in intensity
as we move away from r is more gradual. We'll show this difference visually
in just a moment.
Like all of the material properties that are input to the lighting equation,
the value for m gls can vary over the surface, and the specific value for any
given location on that surface may be determined in any way you wish, for
example with a texture map (see Section 10.5) . However, compared to the
other material properties, this is relatively rare; in fact it is quite common
in real-time graphics for the glossiness value to be a constant for an entire
material and not vary over the surface.
Another value in Equation (10.11) related to “shininess” is the mate-
rial's specular color, denoted m spec . While m gls controls the size of the
hotspot, m spec controls its intensity and color. Highly reflective surfaces
will have a higher value for m spec , and more matte surfaces will have a
lower value. If desired, a specular map 14 may be used to control the color
of the hotspot using a bitmap, much as a texture map controls the color of
an object.
The light specular color, denoted s spec , is essentially the “color” of the
light, which contains both its color and intensity. Although many lights will
have a single constant color, the strength of this color will attenuate with
distance (Section 10.7.2) , and this attenuation is contained in s spec in our
formulation. Furthermore, even ignoring attenuation, the same light source
may shine light of different colors in different directions. For rectangular
spot lights, we might determine the color from a gobo, which is a projected
bitmap image. A colored gobo might be used to simulate a light shining
through a stained glass window, or an animated gobo could be used to
fake shadows of spinning ceiling fans or trees blowing in the wind. We use
the letter s to stand for “source.” The subscript “spec” indicates that this
color is used for specular calculations. A different light color can be used for
14 Unfortunately, some people refer to this map as the gloss map, creating confusion
as to exactly which material property is being specified on a per-texel basis.
Search WWH ::




Custom Search