UV mapping

Also known as: UV unwrapping

On this page 7

UV mapping is the process of assigning each vertex of a 3D mesh a two-dimensional coordinate on a flat texture image, so that the renderer knows which part of the image belongs to which part of the surface. In 3D graphics & animation, and specifically in texturing & materials, it is the step that makes image-based textures such as color, normal and roughness maps possible on polygon models.

The letters U and V name the horizontal and vertical axes of texture space, chosen to avoid confusion with the X, Y and Z axes of the 3D scene. Creating these coordinates usually involves UV unwrapping, in which the surface is cut along seams and flattened, much like a cardboard box is unfolded into a single sheet.

How UV coordinates connect a mesh to a texture

UV mapping works by storing a UV coordinate pair for every face corner of the mesh, usually in the 0 to 1 range of texture space. During rendering, the GPU interpolates these coordinates across each triangle and samples the texture at the resulting position, which is why a single image can cover a complex shape.

Coordinates are stored per face corner rather than strictly per vertex, which allows one 3D vertex to have several UV positions. That is exactly what happens along a UV seam: the vertex exists once in 3D but appears on two edges of separate UV islands in 2D. The main building blocks are summarized below.

ElementWhat it isWhy it matters
UV seamAn edge where the surface is cutAllows flattening, may show a visible line
UV islandA connected group of flattened facesUnit of packing and texture painting
UV spaceThe square 0 to 1 texture areaDefines where pixels are sampled
PaddingEmpty margin around each islandPrevents color bleeding in mipmaps
UV channelOne complete set of coordinatesSeparate sets for textures and lightmaps
Key elements of a UV layout

Projection and unwrapping methods

UV coordinates can be generated by projection from a simple shape or by unwrapping that minimizes distortion. Projections are fast and predictable for objects that resemble the projection shape, while unwrapping algorithms such as least squares conformal mapping and angle-based flattening produce better results on irregular geometry.

MethodPrincipleBest suited for
Planar projectionProjects along one axisFlat walls, floors and decals
Box projectionProjects from six directionsCrates, buildings, blocky props
Cylindrical projectionWraps around an axisBottles, pipes, limbs
Spherical projectionMaps latitude and longitudePlanets, eyeballs, domes
Seam-based unwrapCuts and flattens with low distortionCharacters and organic models
Automatic unwrapSplits by angle and packs islandsLightmaps and quick previews
Common UV generation methods

In practice, artists mark seams manually on organic and hero assets, then run an unwrap solver and pack the islands efficiently. Automatic methods are acceptable for lightmap channels and background objects, but they tend to create many small islands and seams in visible places.

Quality criteria for a good UV layout

A good UV layout balances low distortion, few visible seams and efficient use of texture space. These goals conflict: fewer seams usually mean more stretching, while cutting more seams reduces stretching but adds discontinuities that texture artists must hide.

  • Distortion measures how much angles and areas change between 3D and 2D; checker textures reveal it as stretched or skewed squares.
  • Texel density, the number of texture pixels per unit of surface, should be consistent across an asset and between neighboring assets.
  • Packing efficiency describes how much of the square is used; well-packed layouts typically fill about 70 to 85 percent of the space.
  • Seam placement works best in hidden or natural boundaries, such as under arms, along clothing stitches or on the back of objects.

Real-time assets also need adequate padding, commonly 4 to 16 pixels depending on resolution, because mipmapping averages neighboring pixels and otherwise blends colors from adjacent islands into the edges.

UV mapping compared with other texturing approaches

UV mapping is the dominant approach for unique, painted textures, but it is not the only way to place materials on a surface. Other approaches avoid explicit coordinates or extend the standard square in different ways.

ApproachHow it places textureTypical useLimitation
Unique UV layoutEvery face gets its own texture areaHero characters, baked detailLimited by one texture resolution
UDIMSpreads islands over numbered tilesFilm assets with very high detailMore files, limited engine support
Trim sheet and tilingOverlapping UVs reuse a textureGame environments, architectureRepetition, no unique baking
Triplanar mappingBlends three world-space projectionsTerrain and rocks without UVsBlur at blends, higher shader cost
Procedural textureComputes patterns from positionNoise, wood, marbleHard to paint specific details
UV mapping and alternative approaches

A texture atlas combines several objects into one shared UV layout to reduce draw calls, which is common in mobile and web graphics. Overlapping UVs save memory but prevent correct baking of normal or ambient occlusion maps, so baking layouts must keep islands separate.

Common UV mapping problems

Most UV problems become visible only after texturing or baking, which is why experienced artists test layouts early with a checker pattern. The table lists typical symptoms and their origins.

SymptomCauseFix
Stretched checker squaresToo few seams on curved areasAdd seams and relax the island
Visible line across a textureSeam in a prominent placeMove the seam or paint across it
Blurry areas next to sharp onesInconsistent texel densityRescale islands to one density
Color bleeding at island edgesInsufficient paddingIncrease margin and edge padding
Normal map seams after bakingHard edges not split in UVsSplit UVs at hard edges
Typical UV mapping errors and fixes

A further mistake is mirroring or overlapping UVs without planning: it saves space, but text and asymmetric details then appear reversed, and unique damage cannot be painted on only one side.

The short version

UV mapping is like unfolding a gift box into a flat sheet. Once it is flat, painting a design on it is easy, and when the box is folded again, the design lands exactly where it should.

A 3D model is cut along chosen lines, laid out flat and matched to a picture. The computer then uses this flat map as instructions for wrapping the picture around the model. Good maps keep the picture undistorted and hide the cuts where nobody looks.

Where it makes a difference

A texture artist prepares a leather backpack for a racing game. The model has about 8,000 triangles and must use one 2048 by 2048 texture set. The artist places seams along the real stitching lines, unwraps the straps and pockets, and scales every island to a texel density of 10.24 pixels per centimeter, matching the rest of the character kit.

The islands are packed with eight pixels of padding, and normal and ambient occlusion maps are baked from a high-resolution sculpt. In the engine, the leather grain looks even across the whole bag, no seams are visible from typical camera angles and the edges stay clean at distance, which shows how careful UV mapping protects texture quality within a fixed memory budget.