UV mapping

From Wikipedia, the free encyclopedia

Jump to: navigation, search
A checkered sphere, without and with UV mapping.
A representation of the UV mapping of a cube. The flattened cube net may then be textured to texture the cube.

UV mapping is a 3D modeling process of making a 2D image representing a 3D model. The map transforms the 3D object onto an image known as a texture. In contrast to "X", "Y" and "Z", which are the coordinates for the original 3D object in the modeling space, "U" and "V" are the coordinates of the transformed object. This creates the effect of painting the image onto the surface of the 3D object.

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 sphere is carved out of them. 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.

It is important to note that UV coordinates are applied per face, 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.

[edit] Finding UV on a sphere

UV coordinates represent the projection of the unit spacevector onto the xy-plane.

u = \sin\theta\cos\phi = \frac{x}{\sqrt{x^2+y^2+z^2}}


v = \sin\theta\sin\phi = \frac{y}{\sqrt{x^2+y^2+z^2}}

[edit] See also

[edit] External links

Personal tools