UV map
| Texture Space | Some graphics APIs sample the texture from the top left to the bottom right ↘ while others sample from the bottom left to the top right ↗. Some may also refer to UVW as STU coordinates originating from parametric mathematics.
The Source Engine's code references both UV and ST conventions. | |
|---|---|---|
1 V ↑ |
||
| 0 | U → 1 | |
A UV map is a property of a model's geometry data that does not contain any pixel data (eg color, etc). It is essentially a matrix relating 3D to 2D coordinates which defines the area of a 2D pixelmap to be sampled and rendered onto each polygonal surface. The mesh vertices store UV float positions [0 - 1] for each face it comprises [confirm], this means a vertex that connects multiple faces can represent multiple points within a UV map. UV vertices are then connect together into faces at the same time faces of the mesh are generated [confirm]. The method of defining vertex UV coordinates is called UV mapping, UV unwrapping or skinning.
Materials apply the pixel data of each VTF (base map, normal map, specular mask) to the same UV area of the model. Therefore the model's material/skin) can easily be changed without having to create additional UV maps.
UV maps are usually repeating tiles where the geometry can move beyond the bounds of the first tile and still render with textures. This is useful for managing complicated layouts and/or reusing texture space of multiple disconnected meshes, though it is mostly used on tiling textures/trimsheets.
| To UV map: | Use |
|---|---|
| Models | model editor (such as |
| Brushes | Hammer Face Edit Dialog (and the Paint Alpha Dialog for blending Materials on Displacements) |
| Decals | Hammer Decal Tool |
| Overlays | Hammer Overlay Tool |
VMT files can also specify UV mapping adjustments for each VTF seperately, via the $basetexturetransform, $bumptransform, etc VMT parameters.
- Todo: confirm: this only works for VMTs applied to Brushes, not to Models?
Sampling
Secondary UV
UV Animation
External links
UV mapping and
Texture mapping for the theory.- The layout of a complex Model Skin is comparable to a
Texture atlas.
UVW mapping (used in 3DS Max only?)