Version 0.7 Last Modified 29th July 2002

Vertex normals

This page gives a brief explanation of what vertex normals are and how to manipulate them to control the shininess (ENV) over the surface of your meshes. If you don't want your objects be shiny, you can skip this and go to the next page.

Any surface, curved or not, is built up from flat polygons. This is an approximation, but mostly produces sufficient results. However, if you want a curved surface to be shiny (to have environment mapping), the approximation becomes obtrusive: light reflected from the surface reveals the facets that make it up. To overcome this and have control over shininess, all vertices that make up the polygons have a vertex normal.

The normal of a vertex is a vector, and shows the direction of the surface at the point where the vertex is (it is perpendicular to the surface). By controlling vertex normals, you control whether the surface is faceted (shines face-by-face), or smooth (shines continuously).

The pictures show a curved surface, with different vertex normals. The polygons are shown as white lines, the vertexes as red dots. The blue-white lines are the vertex normals, and the green line is the (imaginary) surface. This surface does not really exist, but the shininess is calculated as if light was reflected by this.

Vertex normals of neighbouring polygons differ: shininess has a "corner", surface looks faceted. Vertex normals of neighbouring polygons are the same: shininess is smooth, surface looks continuous.

Averaging vertex normals

When you want the vertex normals be averaged (as the right side picture above), two conditions must be met. Any of these is missing, vertex normals won’t be averaged and you will get a faceted surface instead of a smooth one.

  1. Vertices has to be welded. When polygons meet at a corner / edge, they can share the corner vertex or edge, or both can have its own (although at the same position). You can weld vertices (so polygons share one vertex), or you can break them (so each polygon has an own vertex). The former one is required for smooth shine.
  2. Polygons meeting at a corner/edge must have at least one common smoothing group (SG). For any single polygon, you can have any number of SG-s applied. If the neighbouring polygons have no common SG, the vertex normals will not be averaged and the corner/edge will have sharp break in shining. Note that you don’t have to set all SG-s the same in the meeting polygons; the point is to have at least one common SG, and you can get smooth shining.

Here are the pictures of nine similar instances, to see the effect of welding / breaking the vertices and applying different smoothing groups. This object is a capped cylinder (green cylindrical body and a round red cap).

Vertices ->

All vertices broken

All vertices welded, except at the edge where the cap and body meet

All vertices welded

Edges ->

All edges open

The edge where the body and cap meet is open

No open edges

Elements ->

All polygon is a separate element

2 elements: cap and body

The whole mesh is one element

No SG applied

SG "x" for the whole mesh

SG "x": cap (red)
SG "y": body (green)

Note: it is a good idea to weld vertices even if you don’t want the object be shiny. ASE tools optimize vertex data (multiple vertices in the same position with identical normals are collapsed to one). This reduces the number of vertices, therefore it is a performance optimization.

Breaking and welding vertices

A mesh is made up from one or more contiguous polygon surfaces (called elements). The edges of these elements are the open edges. By welding the vertices of an open edge you weld the elements together (remove a sharp edge). By detaching some polygons to an element you create new open (sharp) edges.

Note: if you attach another mesh to your object, vertices are not welded by default. The attached mesh becomes a new element (or more elements if the attached one is made up from more elements).

Contents Page

Next