3ds Max UVW Mapping
Some UVW Theory
UVW Mapping is the procedure through which a user applies mapping coordinates to a 3D object in order to describe the relationship between areas of a bitmap or procedural texture and the geometry surface. One can also refer to it as "UV mapping" (the W is the 3rd coordinate in texture space) or "texture coordinates".
UVW stands for the three axes of the texture space, similar to XYZ in world, object, camera and other coordinate systems. Because of the way textures use the UV coordinates to project a bitmap onto a surface, coordinates with values above 1 cause the texture to repeat (or "tile"), virtually warping back to the same coordinate space from 0,0,0 to 1,1,1. This does not mean that UV coordinates have to be limited to values between 0 and 1 - they can contain arbitrary values, both positive and negative.
The UVW coordinates can be seen as a separate mesh existing in UVW space instead of XYZ space. Geometry objects in 3ds Max can store up to 100 mapping channels containing such "texture meshes". It is important to note that the indices of the texture vertices do not necessarily match the indices of the mesh vertices. In other words, vertex 10 in a mesh does not necessarily use texture vertex 10 in the mapping channel. In fact, one mesh vertex can reference an arbitrary number of texture vertices, and one texture vertex can be referenced by any number of mesh vertices. The connection between mesh and texture vertices is provided by the faces - both types of meshes feature an identical number of faces with matching indices. Thus, if a mesh vertex is referenced as the first vertex by face with index 42, a corresponding textrue vertex can be found as the first vertex in the texture face with the same index 42.
When using regular 2D bitmap images, the first two texture coordinates, U and V, are usually enough to project the texture onto the surface. When using procedural textures with explicit texture coordinates though, the 3rd W component can also play a role.
The texture coordinates are used as follows: In the case of a 2D bitmap image, the lower left corner of the bitmap is locked to the UV coordinates [0,0]. The top right corner of the bitmap is placed at coordinates [1,1]. This means that the upper left corner would be pinned down to coordinates [0,1] and the bottom right corner to [1,0], with the center at [0.5,0.5].
When looking at a single triangular face, each of its 3 vertices have 3 corresponding texture vertices in the UVW mapping channel. In order to decide which texel of a bitmap should be rendered at an arbitrary point inside the triangle, the barycentric coordinates of the point can be calculated and the 3 UVW coordinates of the corner vertices can be multiplied by the 3 components of the barycentric coordinates and added together. The resulting UV coordinate is then multiplied by the pixel size of the bitmap - the result is the coordinates of the pixel to appear on that point.
Applying UVW Mapping
Most parametric geometry primitives can generate initial texture coordinates procedurally. They usually write only to channel 1 which was the original (and only) UVW channel in the initial 3D Studio MAX R1.
Custom UVW Mapping in 3DS Max can be applied through either the UVW Map modifier or through the UVW Unwrap modifier which can be used for extensive manual editing of texture vertices and faces. The UVW Map modifier adds a mapping gizmo that gives basic mapping to your selected object without the ability to manualy modify the exact UVW coordinates per vertex. The gizmo can be set to Planar, Cylindrical, Spherical, Shrink-Wrap. Additional modes provide Box (six-sided planar), Face (each face gets UVs from [0,0] to [1,1]) and XYZ to UVW conversion. The UVW Unwrap modifier provides tools for aligning similar gizmos to face selections, an advanced graphical editor displaying the texture mesh in UVW space and featuring a large number of mapping-related tools; and a Pelt Mapping mode allowing the user to flatten the texture coordinates using seam definitions and spring-based stretching.
- This page was last modified 05:49, 16 November 2006.
- This page has been accessed 3,703 times.
- Content is available under GNU Free Documentation License.
- About CGWiki
- Disclaimers

