![](http://images-20200215.ebookreading.net/11/4/4/9781568814773/9781568814773__a-hitchhikers-guide__9781568814773__bgb5.png)
i
i
i
i
i
i
i
i
164 7. The Rendering Pipeline
It is the specular component of the light reflected from a surface that
makes it look shiny. The cosine power, m, is the parameter which
governs the shininess of a surface. Very shiny surfaces have a high m;
typical values lie in the range 10 to 99.
Thus, in practice, the effect of specular reflection is to add a highlight
to parts of a model that have been designated as shiny. The specular
highlight takes the color of the light and not that of the surface on
which it is visible.
• Depth cuing (I
c
). Like any electromagnetic radiation, light is attenuated
as it travels away from its source. The reflected light (mainly diffuse) ar-
riving at the viewpoint has traveled from the light source to the object,
where it was reflected on to the observer. In theory, the light inten-
sity should be attenuated with distance from its source using an inverse
square law, but in practice a linear fall-off looks much more realistic.
Quite often, depth cuing can be omitted entirely from the model with
only mildly noticeable effect. A linear model is usually written in the
form
I
c
=
1
d
o
+ d
,
where d
o
is a constant and d is the distance of p from the viewpoint.
Assuming that the viewpoint is at (0, 0, 0) and the observer is looking
along the x-axis, a good assumption is to let d = p
x
,thex-coordinate
of p.
If depth cuing is to be used, it is also a good idea to perform an exposur e
test by examining all the polygons and scaling the light intensities so
that the maximum is always unity. If this is not done then it can require
quite a lot of trial and error testing to generate a picture that is neither
under- nor overexposed.
Quickly taking stock, we know that when illuminating a scene, we can
use three standard light sources and the light can interact within the scene in a
number of different ways. It is now time to consider the format for recording
a value for the surface color and illumination within a given fragment. Let
us record this information using the variable c. When recording the color
component, it is obvious that we must use a color model. We must use a
model to describe color. The simplest color model that we can utilize is the