You are on page 1of 14

POLYGON RENDERING METHODS

RENDERING means giving proper intensity at each point in a graphical object to make it look like real world object.

Different Rendering Methods are


Constant Intensity Shading. Gouraud Shading.

Phong Shading.
Fast Phong Shading.

CONSTANT INTENSITY SHADING


Also Called Flat Shading Fast and Simple Method A single intensity is calculated for each polygon(
in the polygon-mesh)

All points in the surface of polygon are displayed


with the same intensity value.
N1 N3

N4

N2

For Getting Good Results Through Constant Intensity Shading

Object is a polyhedron. Light sources illuminating the object are


sufficiently far from the surface

The viewing position is sufficiently far from


the surface.

GOURAUD SHADING
Intensity interpolation scheme developed by
Gouraud.

Represents a polygon surface by linearly interpolating


intensity across the polygon surface.

Intensity values for each polygon are matched with


adjacent polygon along common edges.

Eliminates the intensity discontinuity that can occur in flat


shading.

Polygon surface is represented by the following calculations:

1. Determine the average unit vector at each


polygon vertex.

2. Apply an illumination model to each vertex to


calculate the vertex intensity.

3. Linearly interpolate the vertex intensities over


the surface of the polygon.

5 p

Advantages

It removes intensity discontinuities associated with flat


shading. Disadvantages

Highlights on the surface are sometimes displayed in


irregular shapes.

Linear intensity interpolation can cause intensity stripe


called Mach bands, to appear on the surface.

Phong Shading
Normal Vector Interpolation Shading Developed by Phong Bui Tuong

Accurate method
Displays more realistic highlights Reduces Mach band effect Interpolate normal vectors and then apply illumination

Polygon surface is rendered using the following steps :

Determine the average unit normal vector at each


polygon vertex

Linearly interpolate the vertex normals over the


surface of the polygon

Apply an illumination model along each scan line to


calculate projected pixel intensities for the surface points

Interpolation of surface normals along a polygon edge


N1 N3

Scan line

N2

Advantages n Disadvantages
Adv. Intensity calculations produce more accurate results Displays more realistic highlights on the surface Greatly reduces the Mach-band effect. [The Mach band effect exaggerates the change in intensity at any boundary where there is a discontinuity in magnitude or slope of intensity.] Dis adv. Requires more calculations

Fast Phong Shading


It is a goal of any one writing
a 3D engine.

Phong shading is still


common in 3D system.

It is faster and easier way to


approximate the intensity calculation.

Phong shading is more realistic than Gouraud


shading, but requires more computation.

Phong shading using differences takes about six


to seven time longer than Gouraud shading.

Limitations in the normal phong shading lead to

the development of fast-phong shading


technique.

Fast Phong Shading


Surface Rendering can be speeded up by using
approximations in the illumination-model
calculations of normal vectors.

It approximates the intensity calculations using a


Taylor-series expansion and triangular surface patches.

Rendering is faster than the normal Phong shading.

You might also like