Glossary · 3D basics

UV mapping

In short

UV mapping is the unwrapping of a 3D surface into a flat 2D layout so that an image (texture) sits correctly on it. Each vertex of a face gets a U/V coordinate in the image [1].

What happens

Picture the surface of a model being cut open and laid flat, like a sewing pattern. Every point in the UV map corresponds to a vertex of the mesh, every face in the map to a face of the model [1]. The letters U and V name the two image axes so they are not confused with X, Y and Z in space.

In glTF, UV coordinates are a separate attribute per vertex (TEXCOORD_0, TEXCOORD_1 and so on) [2]. Without them no texture can sit cleanly on the model.

Why a configurator needs UVs

  • Wood grain, fabric, brushed metal: the grain has to run the right way, or it will cross a rail at an odd angle.
  • Logos, labels, printed artwork: artwork must not be distorted. For packaging this is the whole point of the view.
  • Normal maps: fine surface structure also depends on the UVs, see texture maps.
  • Baking: if you bake light or shadow into a texture, you need a UV map as the target [3].

CAD data and UVs

CAD exports rarely carry usable UV coordinates. They are created during preparation, for example in Blender. Good seams sit where nobody looks: on edges, underneath, in joints.

An example from our library is the beverage can (example configurator, fictional product): its model uses several colour and normal textures that sit on the can body and lid through UV coordinates. The guide CAD to web 3D covers the whole preparation process.

Related terms

  • Texture maps

    Texture maps are images that assign material properties point by point across a 3D surface: colour, surface structure, roughness, metalness or shading. They sit on the model through UV coordinates.

  • Baking

    Baking means storing expensively computed lighting or surface information in image files (textures) in advance. The browser then only displays it instead of recalculating it every frame.

  • Polygon mesh

    A polygon mesh describes the surface of a 3D object as a network of vertices, edges and faces. In the end, graphics cards draw surfaces as triangles, and glTF stores surfaces as triangles too.

  • PBR (physically based rendering)

    PBR (physically based rendering) is a rendering approach that describes materials with physically motivated values such as base colour, metalness and roughness. They then look believable under changing light and similar across different viewers.

Examples to try

Example configurator · fictional product

Beverage can 330 ml

A beverage can with three flavour designs, matt or gloss finish, condensation, single can, 4-pack or 6-pack – to turn and open.

Packaging · Colours · Materials and finishes · Options, modules and accessories

More in our guides

Sources

  1. Blender Manual: UV Unwrapping – Introduction
  2. Khronos Group: glTF 2.0 Specification
  3. Blender Manual: Render Baking

← All terms in the glossary