Graphics Reference
In-Depth Information
surfaces in many ways. In any case, the ambient term lets us model this light in a
simple way without doing lots of complicated computations (such as radiosity). Too
little ambient light creates very sharp shadows, too much washes out the entire
picture.
Picking good reflectance coefficients k a , k d , and k s is not easy and they are usually
found by experimentation. The task is basically an art because it relies on one's expe-
rience. This should not be that surprising given the empirical foundation of the
Bouknight and Phong models. Simple models set the entire ambient term to a con-
stant. Other constants to try are
k
=
03
.,
k
=
07
.,
k
=
09
.,
m
=
100
,
and k
=
065
. .
a
d
s
t
For several light sources one uses separate diffuse and specular light components.
There is one problem that arises whether one is using a single or several light sources.
One wants the total computed light intensities at a pixel to fall inside the interval [0,1]
because they are considered to be based on the color cube model. This may not happen
though. The simplest solution would be to clip the value to [0,1]. One can also scale
all pixel values appropriately, although this would involve more work. Unfortunately,
either of these solutions may cause color artifacts. For a good analysis of this problem
see [Hall89]. In general, Hall's topic is a good all-around reference for practical sug-
gestions dealing with illumination and regarding the use of the Phong model. Note
that once intensities are in [0,1] a program would scale them to the correct bit values.
For example, if our graphics system supports 8 bits each for red, green, and blue, then
we would scale to an integer value between 0 and 255. The typical graphics API
requires that colors are represented by integer values (or composites thereof, since
one combines the red, green, and blue parts into one word usually).
Here are some sample RGB color values ([Lind92]), but be aware that these are
not universally agreed on values:
aquamarine = (0.498,1.0,0.8314)
ivory
= (1.0,1.0,0.9412)
beige
= (0.64,0.58,0.5)
maroon
= (0.6902,0.1882,0.3765)
brown
= (0.5,0.1647,0.1647)
mint
= (0.74,0.99,0.79)
carrot
= (0.93,0.57,0.13)
orange
= (1.0,0.5,0.0)
chartreuse
= (0.498,1.0,0.0)
orchid
= (0.8549,0.4392,0.8392)
chocolate
= (0.8235,0.4118,0.1176)
pink
= (1.0,0.7529,0.7961)
cobalt
= (0.24,0.35,0.67)
plum
= (0.8667,0.6275,0.8667)
copper
= (0.84,0.04,0.15)
purple
= (0.6275,0.1255,0.9412)
coral
= (1.0,0.498,0.3137)
silver
= (0.8,0.8,0.8)
flesh
= (1.0,0.49,0.25)
turquoise = (0.251,0.8784,0.8157)
gold
= (1.0,0.8431,0.0)
violet
= (0.56,0.37,0.6)
indigo
= (0.03,0.18,0.33)
wheat
= (0.9608,0.8706,0.7020)
On another matter, to make a light appear in a scene associate to it a sphere which
is fully transparent.
Finally, there is a fact about luminance (measured brightness) that should be men-
tioned. RGB color values and the luminance that they define are not related in a linear
way on most CRT monitors or our visual system. If one were to switch from an inten-
sity value of 0.5 to one of 1.0, one might expect that the image would be twice as
Search WWH ::




Custom Search