UV mapping

UV mapping is the 3D modeling process of making a 2D image representation of a 3D model.

Contents

UV mapping

This process projects a texture map onto a 3D object. The letters "U" and "V" are used to describe the 2D mesh[1] because "X", "Y" and "Z" are already used to describe the 3D object in model space.

UV texturing permits polygons that make up a 3D object to be painted with color from an image. The image is called a UV texture map,[2] but it's just an ordinary image. The UV mapping process involves assigning pixels in the image to surface mappings on the polygon, usually done by "programmatically" copying a triangle shaped piece of the image map and pasting it onto a triangle on the object.[3] UV is the alternative to XY, it only maps into a texture space rather than into the geometric space of the object. But the rendering computation uses the UV texture coordinates to determine how to paint the three dimensional surface.

In the example to the right, a sphere is given a checkered texture, first without and then with UV mapping. Without UV mapping, the checkers tile XYZ space and the texture is carved out of the sphere. With UV mapping, the checkers tile UV space and points on the sphere map to this space according to their latitude and longitude.

When a model is created as a polygon mesh using a 3D modeler, UV coordinates can be generated for each vertex in the mesh. One way is for the 3D modeler to unfold the triangle mesh at the seams, automatically laying out the triangles on a flat page. If the mesh is a UV sphere, for example, the modeler might transform it into a equirectangular projection. Once the model is unwrapped, the artist can paint a texture on each triangle individually, using the unwrapped mesh as a template. When the scene is rendered, each triangle will map to the appropriate texture from the "decal sheet".

A UV map can either be generated automatically by the software application, made manually by the artist, or some combination of both. Often a UV map will be generated, and then the artist will adjust and optimize it to minimize seams and overlaps. If the model is symmetric, the artist might overlap opposite triangles to allow painting both sides simultaneously.

UV coordinates are applied per face,[3] not per vertex. This means a shared vertex can have different UV coordinates in each of its triangles, so adjacent triangles can be cut apart and positioned on different areas of the texture map.

The UV Mapping process at its simplest requires three steps: unwrapping the mesh, creating the texture, and applying the texture.[2]

Finding UV on a sphere

UV coordinates represent a projection of the unit space vector onto the xy-plane.

u = \sin\theta\cos\phi = \frac{x}{\sqrt{x^2%2By^2%2Bz^2}}
v = \sin\theta\sin\phi = \frac{y}{\sqrt{x^2%2By^2%2Bz^2}}

See also

References

  1. ^ when using quaternions (which is standard), "W" is also used; cf. UVW mapping
  2. ^ a b Mullen, T (2009). Mastering Blender. 1st ed. Indianapolis, Indiana: Wiley Publishing, Inc.
  3. ^ a b Murdock, K.L. (2008). 3ds Max 2009 Bible. 1st ed. Indianapolis, Indiana: Wiley Publishing, Inc.

External links