Page 190 - DCAP504_Computer Graphics
P. 190
Unit 12: Color and Shading Model
Among the above mentioned assumptions, if any of the first two assumptions goes wrong and if we
carry on with constant shading then we need to determine a single value for each L and V with the help
of some other methods.
Some of the advantages of constant shading method are that:
1. It is fast because it uses only one shading computation to shade a polygon.
2. A polygon can be filled with a single color.
Some of the disadvantages of constant shading method are that it may produce inaccurate results when
it is used to shade polygons that share a common boundary and each shaded differently.
The values for L and V may be determined for the center of the polygon or for
the polygon's first vertex.
When constant shading is used to shade a polygon, it results in uniformly shaded
polygon surface.
Constant shading can produce good results for dull polyhedrons reflected by light sources that are
located far away from the polygon. The main disadvantage of this method is that there may be wrong
lines appearing in between adjacent polygons that approximate a curved surface. Suppose if a selected
surface point is at the point of the strongest specular reflection of the light source then constant shading
may modify the color of the corresponding polygon.
Constant shading method uses a single color (as shown in figure 12.7) to shade a given polygon.
Figure 12.7: Constant Shading of an Image
Source: http://images.yourdictionary.com/images/computer/_SHADING.GIF
Gouraud Shading
Gouraud shading is also known as intensity interpolation and it is used to display smooth-shaded
polygons by defining the RGB color combination of each polygon vertex. The first thing that the
Gouraud shading does is to estimate the RGB values between the vertical vertices along each edge.
Using this method, we can obtain the RGB value for the left and right edges of each scan line. Then,
LOVELY PROFESSIONAL UNIVERSITY 183