Learning path

Full curriculum

Full curriculum

Unit content

Surface normals, orientation and winding

A surface normal is a direction perpendicular to a surface. For a triangle with vertices $\mathbf{p}_0,\mathbf{p}_1,\mathbf{p}_2$, an unnormalized normal can be computed as

$$\mathbf{n}=(\mathbf{p}_1-\mathbf{p}_0)\times(\mathbf{p}_2-\mathbf{p}_0).$$

Reversing the vertex order reverses the cross product. Meshes therefore use a consistent winding order—for example counterclockwise when viewed from the front—to distinguish front-facing from back-facing triangles.

Normals need not be identical to geometric face normals. Smooth shading commonly stores per-vertex normals obtained from neighboring faces or from the original smooth model.

A normal is not transformed like an ordinary position. Under non-uniform scaling, applying the same linear transform can destroy perpendicularity. The correct transformed normal is proportional to

$$A^{-T}\mathbf{n},$$

followed by normalization.

Normals encode orientation information used by lighting, back-face culling and many geometric computations.