A video game character, a chair in an online catalogue, a building in an architectural visualisation: in the vast majority of cases they are polygon meshes, surfaces built from many small flat polygons. It is a very different way of representing shape from that of 2D images, but it follows a simple logic. Understanding it helps you read a 3D file, recognise a model's problems and prepare objects suited to rendering, 3D printing or real-time use.
The elements of a mesh
A mesh is made of three kinds of element:
- vertices: points in space, each with coordinates (x, y, z);
- edges: segments connecting two vertices;
- faces: closed polygons bounded by edges.
The file does not store "a cube" but eight vertices and six faces connecting them. The most common way to do this is a list of vertices followed by a list of faces that reference them by index. This indexed structure avoids repeating the coordinates of vertices shared by several faces.
Here is a square in OBJ format, a very widespread text format:
v 0 0 0
v 1 0 0
v 1 1 0
v 0 1 0
f 1 2 3 4
The v lines are the vertices, the f line is a face connecting them in the given order (indices in OBJ start at 1).
Triangles, quads and n-gons
- Triangles: always flat, because three points define a plane. Graphics cards draw only triangles: any other face is subdivided before rendering.
- Quads (quadrilaterals): preferred during modelling, because they form regular grids, subdivide predictably and allow you to select edge "loops."
- N-gons (polygons with more than four sides): acceptable on flat surfaces, problematic on curved ones, because their automatic triangulation can produce odd shading.
A quad whose four vertices do not lie on the same plane is not well defined: depending on how it is split into two triangles, the resulting surface changes.
Vertex order and face orientation
The order in which a face's vertices are listed is not random. By convention, looking at the face from the "outside," the vertices run counter-clockwise (some systems use the opposite convention). This order establishes which side is the front.
It has two practical consequences:
- many engines discard faces seen from behind (backface culling) to save computation: if a face has the wrong order, it disappears;
- the order determines the direction of the normal, and therefore the lighting.
Normals
The normal is a vector perpendicular to the surface, of length 1. It is essential for lighting: the amount of light a surface receives depends on the angle between the normal and the light direction.
There are two levels of normals:
- face normals: one per polygon; they produce a faceted look;
- vertex normals: one per vertex, often computed as the average of the adjacent face normals. By interpolating vertex normals across the surface, the model looks smooth even with few polygons.
To get sharp edges on an otherwise smooth object, such as the edge of a table, the vertices along that border are "split": the same point in space has two different normals, one per side. Modelling programs handle this with settings such as smoothing groups, auto smooth or marking edges as "sharp."
Clean topology
Topology describes how vertices and faces are connected, regardless of their position. Good topology makes a model easy to edit, animate and texture. The most common problems are:
| Problem | Description | Consequence |
|---|---|---|
| Non-manifold geometry | an edge shared by more than two faces, or faces touching at a single vertex | errors in 3D printing and many operations |
| Holes | missing faces in a surface that should be closed | 3D printing impossible, rendering "leaks" |
| Flipped normals | faces pointing inwards | black shading, invisible faces |
| Duplicate vertices | coincident points not merged | visible seams, wrong smoothing |
| Degenerate faces | triangles with zero area | artifacts and unstable calculations |
Before delivering a model it is worth running the clean-up functions: merging nearby vertices, recalculating normals consistently, searching for non-manifold geometry.
Density and levels of detail
More polygons mean more detail, but also more memory and longer rendering times. Real-time applications often use several versions of the same object (LOD, levels of detail): the detailed one when the object is close, simplified versions when it is far away. Fine detail, rather than being modelled, is often "painted" with textures and normal maps.
Exchange formats
- OBJ: text-based, simple, widely supported; geometry, texture coordinates and normals, materials in a separate file.
- STL: triangles only, with no colors or textures; the long-standing standard for 3D printing.
- PLY: often used for 3D scans, can hold per-vertex colors.
- glTF: a modern format designed for real-time and web delivery; includes geometry, materials, textures, animations.
- FBX and USD: rich formats used in production pipelines for animation and complex scenes.
In short
- A mesh is made of vertices, edges and faces, usually stored as indexed lists.
- Graphics cards draw triangles; quads are preferred in modelling.
- Vertex order establishes the face's front and the normal's direction.
- Vertex normals make surfaces smooth; sharp edges require split vertices.
- Clean topology avoids holes, non-manifold geometry and flipped normals.