Docsity

Polygon Rendering - Computer Graphics - Lecture Slides, Slides of Computer Graphics

Partial preview of the text

Download Polygon Rendering - Computer Graphics - Lecture Slides and more Slides Computer Graphics in PDF only on Docsity!

Polygon Rendering

Methods

Contents

  • Today we will start to look at rendering methods used in computer graphics - Flat surface rendering - Gouraud surface rendering - Phong surface rendering

Flat Surface Rendering

Images come from: www.siggraph.org/education/materials/HyperGraph/scanline/shade_models/shading.htm

No Surface Rendering Vs Flat Surface Rendering

No Surface Rendering Flat Surface Rendering

Images come from: www.siggraph.org/education/materials/HyperGraph/scanline/shade_models/shading.htmDocsity.com

No Surface Rendering Vs Flat Surface Rendering

Flat Surface Rendering Gouraud Surface Rendering

Images come from: www.siggraph.org/education/materials/HyperGraph/scanline/shade_models/shading.htmDocsity.com

Phong Surface Rendering

Images come from: www.siggraph.org/education/materials/HyperGraph/scanline/shade_models/shading.htm

Flat Surface Rendering

  • The simplest method for rendering a polygon surface
  • The same colour is assigned to all surface positions
  • The illumination at a single point on the surface is calculated and used for the entire surface
  • Flat surface rendering is extremely fast, but can be unrealistic

Overcoming Flat Shading Limitations

  • Just add lots and lots of polygons – however, this

Images come from:is SLOW!

http://www-static.cc.gatech.edu/classes/AY2004/cs4451a_spring/

shading_models/linint.html Docsity.com

Gouraud Surface Rendering (cont…)

  • To render a polygon, Gouraud surface rendering proceeds as follows: 1. Determine the average unit normal vector at each vertex of the polygon 2. Apply an illumination model at each polygon vertex to obtain the light intensity at that position 3. Linearly interpolate the vertex intensities over the projected area of the polygon

Gouraud Surface Rendering (cont…)

  • The average unit

normal vector at v is

given as:

  • or more generally:

∑

∑

=

= = n i

i

n i

i v N

N N

1

1

1 2 3 4

1 2 3 4 N N N N

N N N N N v (^) + + + = + + + N 2

Nv

N 4

N 3

N 1

v

Advantages of Gouraud Surface Rendering

Gouraud Surface Rendering Example

Images come from:

http://www-static.cc.gatech.edu/classes/AY2004/cs4451a_spring/

shading_models/linint.html Docsity.com

Problems With Gouraud Shading

  • Gouraud shading tends to miss certain highlighting In particular Gouraud shading has a problem with specular reflections
  • Also, Gouraud shading can introduce anomalies known as Mach bands Docsity.com

Problems With Gouraud Shading (cont…)

  • The major problem with Gouraud shading is in handling specular reflections

Gouraud shading Phong shading