UV mapping is known as the most time-consuming task in 3D, especially for beginners, but it is also the glue that holds models, bakes, and textures together. It’s also a critical task because a poor set of UVs and their consequent output can ruin even the best 3D models. Whether you like or dislike UVs, they are unavoidable – they are essential to understand.
UV mapping is the 3D modeling process of projecting a 2D picture onto the surface of a 3D model for texture mapping. Because “X,” “Y,” and “Z” are already used to express the axes of the 3D object in model space, the letters “U” and “V” represent the axes of the 2D texture, while in computing quaternion rotations, a typical operatic operation is using “W” (in addition to XYZ).
UVs are vital because they connect a mesh surface to how an image texture is placed onto that surface. They are the control points that determine which pixels on the texture correspond to which vertex on the 3D model. UV unwrapping is the process of producing a UV map.
UV Unwrapping (seams)
Now that we’ve covered the meaning of UV maps, we can move on to the more advanced parts of UV unwrapping, especially seams. Seams are an inherent but unwanted side effect of flattening any 3D geometry. A seam is a part of the mesh that must be split to turn a 3D mesh into a 2D UV map. UV unwrapping is always a compromise between causing as little distortion to the wireframe as possible while minimizing seams.
In terms of a UV map, distortion refers to how much the shape and size of the polygons have had to change to allow the flattening procedure. Excessive distortion will have an impact on how details appear on the final model.
In the image above, the cube that has been unwrapped has not distorted the polygons. It is easy to tell by applying a basic checkered texture. If the checkered pattern isn’t stretched, then you’ve avoided distortion in your unwrap.
However, the downside to this method of just splitting all your polygons apart is the number of seams it produces.
The cube on the left has the UV seams highlighted in green. You can see the pattern doesn’t line up as it moves around the edges. It can become a problem in more complex meshes, so you need to practice and be cautious with your seam placement.
The image above is an example of what happens if you heavily distort your polygons in your UV unwrap. The texture on this cube is no different than the previous example, but as you can see, it stretched and pulled out of shape because it is heavily distorted.
UV Channel
A UV Channel is a set of data within a Static Mesh that maps each of the mesh’s vertices to coordinates in 2D space. These mappings define how 2D texture maps get wrapped around the 3D geometry when the mesh is rendered.
You typically create and manage your UV mappings in a dedicated modeling tool—the same tool you use to create the geometry of your Static Mesh. However, the Editor does offer a few possibilities for working with the UV Channels of your models, outlined below on this page.
UV Channels have two main purposes in the Engine:
- Texture coordinates in Materials: When you create a Material that samples a texture map and applies it to the surface of a Static Mesh, you can use a Texture Coordinate (or Texcoord) node to specify a UV Channel. The Material uses the mapping between 2D coordinates and 3D vertex positions contained in the selected UV Channel to determine which areas of the texture should be used to shade what triangles in the 3D model.
- Lightmaps: UV channels are also used to store and apply lightmaps. A lightmap is a special kind of texture that stores precomputed lighting information for Static Meshes. When you have lights in your Level that have their Mobility setting set to Stationary or Static, and you build the lighting for your Level, the Lightmass tool saves the indirect lighting (and direct lighting for Static lights) to lightmap textures, using a UV channel to determine the mapping between the 3D geometry of the Static Mesh and the 2D texture space.
UV channels used for lightmaps have to follow some special rules. Because every part of an object usually receives different amounts of lighting, no two triangles in the mesh can overlap in the 2D texture space. Each triangle must cover its own area in the texture. In addition, all UV coordinate values must fall between 0 and 1. Lightmap textures can not “wrap around” the same way as regular texture mappings. For these reasons, lightmap UVs are typically generated—or packed—from simpler UV mappings.
Reference source: Spiria.com || creativebloq.com || pluralsight.com || conceptartempire.com || gamasutra.com || wikipedia.com || paulhpaulino.com || unrealengine.com