Vertex Normals and Phong Shading

I extended the basic Mesh class to support vertex normals for triangular meshes. Then, I use interpolation to determine a different normal at each point on any face of the mesh, thus giving a smooth rendering of the mesh instead of the faceted look one gets with just face normals.

Also available is a basic vertex normal generation algorithm which creates an approximation to the original vertex normals by taking the sum of all adjacent faces at each vertex and normalising.

Venus de Milo mesh rendered with just face normals.

Venus de Milo mesh rendered with vertex normals and phong shading

Cow mesh flat shaded and then phong shaded using generated vertex normals.

Prev | Home | Next