Polygon-Rendering Methods
• Polygon rendering is the process of determining the color and
intensity of each pixel on the surface of a polygon in a 3D space to
create a 2D image.
• It involves applying various shading models, such as constant intensity
shading, Gouraud shading, and Phong shading, to produce a realistic
representation of a three-dimensional object on a two-dimensional
screen.
• The goal is to simulate the appearance of real-world objects by
accurately representing the way they reflect light and cast shadows.
Different polygon rendering methods in computer graphics:
• Constant Intensity Shading
• Gouraud Shading
• Phong Shading
Constant Intensity Shading
• It is a simple method of polygon rendering. It is also called Flat
shading.
• In this method every point has constant intensity. All point of polygon
has same intensity value.
• It is fast rendering method. It is useful for displaying simple curved
surface appearances.
Gouraud Shading
• It is developed by Gouraud. This rendering is done by intensity
interpolation.
• At each point the intensity value is calculated.
• It interpolates linearly in the surface of the polygon. It eliminates
intensity discontinuity. It has match bands.
Each polygon surface is rendered by performing the following
calculations:
• Determine the average unit normal vector at each polygon vertex.
• Apply an illumination model to each vertex to calculate the vertex
intensity.
• Linearly interpolate the vertex intensities over the surface of the
polygon.
• At each polygon vertex, obtain a normal vector by averaging the
surface normal of all polygons sharing that vertex.
σ𝑛
𝑘=1 𝑁𝑘
Nv= σ𝑛
𝑘=1 𝑁𝑘
• Determine the intensity at the vertices from a lighting model.
• Linearly interpolated the vertex intensities over the surface of the
polygon for each scanline the intensity at the intersection with a
polygon edge is linearly interpolated.
• In the above example, the vertex values and intensities of 1,2,3 are
given.
• By linear interpolating, find the intensity at point 4 (by points 1 and 2)
and at point 5 (by points 3 and 2)
y4−y2 y1−y4
I4= I+ I
y1−y2 1 y1−y2 2
y5−y2 y3−y5
I5= I3+ I2
y3−y2 y3−y2
Now, find the intensity at point p
(by points 4 and 5)
x5−xp xp−x4
Ip= I+ I
x5−x4 4 x5−x4 5
Phong Shading
• It is more accurate method of polygon rendering.
• At each point of the surface, it interpolates the normal vector and
applies the illumination model.
• It is also called as normal vector interpolation shading.
• It gives more real highlights of the surface. It reduces match bands.
A polygon surface is rendered by following steps:
• Determine the average unit normal vector at each polygon vertex.
• Linearly interpolate the vertex normal over the surfaces of the
polygon.
y−y2 y1−y
N= N+ N
y1−y2 1 y1−y2 2
• Apply an illumination model along each scan line to calculate the
projected pixel intensities of the surface points.