The Basics

In essence, UV mapping is the technique used to "wrap" a 2D image onto a 3D mesh. It is a games way of saying 'this portion of the image goes here’. The end result is a texture that fits evenly all over the mesh in question, with each piece in the right place. If an object is not UV mapped or mapped incorrectly then you could end up with things like a person’s face being textured with the clothes they are wearing or the paint of a car being stretched over everything, even the wheels or the steering wheel!

The Analogy

One of the best analogies to imagine UV mapping is cutting up a cardboard box. The box is a 3D object, but, if you were to take a pair of scissors and cut up the folds of the box, you would be able to lay it out flat on a table, making it 2D. If we were then to look down at the box ‘U’ would be the horizontal (Left-Right) direction, whilst 'V' would be the vertical (Up-Down Direction). The letters ‘U’ and ‘V’ are used because X', 'Y' and 'Z' are already used as the coordinates in ‘3D space’ to say where the vertices of the box are.

Once you then reassemble the box, a certain UV location is transferred to a location on the box. This is how the game decides how to wrap the texture around a mesh.

UV Unwrapping

Normally, just using a box UV map can work well to texture some objects. However, for complex objects which require more precision, a process called UV unwrapping is used. Continuing on from the example above, this would be like cutting the 2d ‘net’ of the cardboard box up into even smaller pieces, then stretching them around so that they are arranged onto a picture you want to cover the box with. That way, when the box is reassembled, the pieces of the box return to their original shape and size, but the picture on each piece scale/reshape with them, resulting in pieces of the picture being plastered all over the box in the way you want.