3D Animation Workshop: Lesson 3: Let There Be Light | 2 | WebReference

3D Animation Workshop: Lesson 3: Let There Be Light | 2


Lesson 3 - Let There Be Light - Part 3

It may seem that we have strayed far from our promise to explain how curved surfaces can be created using only flat polygons, but actually we have just arrived at the brink on this minor miracle.

A sphere is the ultimate smooth surface. If we create it out of a mesh of flat polygons, we get something like this.

A close-up view shows a kind of faceted ball of the kind used for New Year's Eve party decoration.

Each little four-sided polygon on the surface has its own normal. That is to say that each polygon faces a slightly different direction toward the light. Now, we might imagine dividing the ball up into smaller and smaller units, and if the squares were many and small enough, a good illusion would be created of a smooth surface. All computer graphics is based on this kind of digital principle. We can scan a continuous tone picture into a bitmap composed of discrete little points very convincingly. But we need not go this far with our 3-D model of a sphere. We can keep the relatively rough polygonal model we have and make it look smooth when it renders.

This, believe it or not, is how the very same model looks when rendered with "smooth shading" instead of "flat shading."

In flat shading, all of the points on a polygon surface have the same normal. They all point in the same direction. In smooth shading, the lighting for every point on the surface of a polygon is computed separately, and the normal is adjusted for each point so that there is a slight change of direction against the light at each pixel as it is drawn. To achieve smooth shading, the idea of a normal is expanded from what we already understand. We are no longer concerned with the normals of the individual faces, but rather of the normals at the points (the vertices) where these faces meet. The normal at a vertex is determined by averaging the normals of all the polygons that share it. Thus there is a kind of direction toward the light at a given point on the surface of the sphere.

This idea may seem very peculiar, but it is a core concept found again and again in mathematics. If we pick a point on a sphere, we can imagine a plane that is tangent to that point--a plane that grazes that point alone and no other on the sphere. Once we have a plane, we can easily imagine a normal to that plane, and that normal is, in effect the normal to the point on the sphere. The following animation should convey the idea of the continuous change of normals across the surface of a sphere.

Now that we have some idea of how smooth surfaces are created from 3-D polygon models, we'll take a look how models are created by the 3-D artist. But that's for our next lesson.

To Return to Parts 1 and 2, Use Arrow Buttons

Previous Lesson / Table of Contents / Next Lesson

Created: March 11, 1997
Revised: March 6, 1998

URL: http://webreference.com/3d/lesson3/part3.html