Presentation is loading. Please wait.

Presentation is loading. Please wait.

©Larry F. Hodges (modified by Amos Johnson) 1 Shading Models.

Similar presentations


Presentation on theme: "©Larry F. Hodges (modified by Amos Johnson) 1 Shading Models."— Presentation transcript:

1 ©Larry F. Hodges (modified by Amos Johnson) 1 Shading Models

2 ©Larry F. Hodges (modified by Amos Johnson) 2 Flat Shading Every pixel interior to the polygon is assigned the same intensity. The normal at a point on the polygon is the normal of the plane determined by the polygon. (Use cross product of edge vectors to compute normal.) Fast and simple, uses standard polygon fill provided by most frame buffers Shading of a polygon independent of shade of adjacent polygons Gives object a faceted appearance

3 ©Larry F. Hodges (modified by Amos Johnson) 3 Gouraud Shading 1. Approximate the normal to the surface at a vertex by averaging all normals of abutting polygons. 2. Calculate the intensity at each vertex using illumination equations. 3. Use linear interpolation along a polygon edge to compute the intensity at each edge pixel. 4. Use linear interpolation along a scan line to compute the intensity at each interior pixel of a polygon. DA = (bD1 + aD4)/(a+b)

4 ©Larry F. Hodges (modified by Amos Johnson) 4 Phong Shading 1. Approximate the normal to the surface at a vertex by averaging all normals of abutting polygons. 2. Interpolate normals along the edge between two vertex points.

5 ©Larry F. Hodges (modified by Amos Johnson) 5 Pros and Cons Flat Shading –Pro: Simple and fast –Con: Flat appears and polygon sections looks discontinuous. Gourand Shading –Pro: Polygon section looks continuous. –Con: May miss specular reflections. Phong Shanding –Pro: Keeps specular reflections –Con: High complexity because illumination is compute at every pixel.


Download ppt "©Larry F. Hodges (modified by Amos Johnson) 1 Shading Models."

Similar presentations


Ads by Google