What is the normal of a face?
Olivia Zamora
I was told the normal of a face was 'A vector perpendicular to the face' but I still don't get it when trying to draw 3d shapes. Could someone give me a clearer explanation, or (even better) a diagram?
The chunk of code which confuses me is the call to glNormal3f(x, y, z).
2 Answers
The face normal is distinct from the vertex normals which don't have to be perpendicular to the face, while it is.
The face normal is used to determine which way the face is pointing. If it's pointing away from the camera then the face can be ignored when rendering. It's also used to determine the colour of the face when performing quick flat or facetted rendering.
The vertex normals are used to add roundness to the object. The normal at each vertex lies along the radius of the cylinder pointing outwards from the axis - imagine an old fashioned ships wheel if you will:
where the handles are the vertex normals, so that they represent the actual curvature of the cylinder at that point.
If you take a cylinder and facet it you get a regular polygonal tube. Just rendering this using the face normals will give you something like this:
Rendering it using the vertex normals gives you this:
You can still see the facets at the ends of the cylinder, but the body looks smooth.
1A quick Google and you can find this tutorial, which includes the following diagram:
As you can see, the normals are directional vectors that are perpendicular to the face. They are used in lighting calculations so that you can get the correct shading displayed when you have directional lighting.
0