UV mapping tips

Maya provides a number of features that let you easily create and edit UV texture coordinates for texture mapping your polygon and subdivision surfaces. The UV Editor (UV > UV Editor) is the primary tool for arranging and laying out UVs for optimal textures.

Knowing how to arrange UV texture coordinates is an important skill to master that depends on whether you are generating a new texture using the UVs as a guide, or if you are adapting the UVs to optimally fit an existing image. The best arrangement depends on the types of textures you will apply and also upon whether you are creating rendered images or models for interactive games.

Overall UV Mapping strategies

There are many ways that you can map a 3D object, all of which balance optimization versus minimizing stretching/pinching differently. Here are three of the most common strategies along with their uses.

Heavily optimized UV mapping

One extreme is a heavily optimized UV map, which is used exclusively for real-time graphics. The end-goal is to have as much coverage on a map that is as small as possible. Heavily optimized UV maps are most common when working with mobile/low-poly graphics, where you have heavy limitations on your assets, but also for current gen graphics since loading texture maps into the graphics memory is heavy work. The Texel density will vary a lot and stretching and pinching will be created on purpose where it's needed. Every shell that can be mirrored (along a plane or radially) is often stacked on top of each other. Furthermore, shells are oriented straight along U/V, and those with odd shapes are cut up into smaller parts. Do not be afraid of straightening border shells so that you can pack shells tighter together so that they fit within the 0 to +1 UV space. Additionally for mobile graphics, consider pushing the UVs of a shell into a line segment if you only need information in one direction (like a gradient) or even a point (if you only need a color).

See the Optimization section below for more details.

Technical UV mapping

On the other end of the spectrum is technical UV mapping. This approach is most common when the model is going to be used for pre-rendered graphics, technical demonstrations, or for promo material. Pixel aspect ratio is very important, while texture space and optimization is not. It is important that all your shells have the same Texel Density and that you eradicate stretching and pinching as best you can. It is also common practice to use multiple large UV maps for different parts of the mesh (known as multi-tile UV mapping). However, not all pre-rendered art will require a UV map, as it is common to use procedural 3d textures for different materials as well. Always check with your art director/art lead to make sure that the UV map is actually necessary.

Continuous UV mapping

Located somewhere in-between the previous two extremes. This is the most common method when working with more high-detail organic models (e.g. a character or a tree). The focus is on reducing the number of seams and to preserve the Texel Density across the shells. Heavy optimizations are difficult due to all the oddly-shaped UV shells, but try not to neglect optimizing altogether.

Optimizations

Unless you are mapping for technical models or VFX assets, you need to think about optimizations that will enhance performance while reducing memory usage. Here are some tips:
  • Consider what parts of your model are going to be visible to the camera, how often, and at what distances. Start by setting a uniform texel density to all UV shells and then scale up or down according to those factors. For example if you are working on a FPS weapon with iron sights then the scope part should have the highest density, and the right and front side of the gun the lowest.
  • Symmetry mapping: When working on symmetrical meshes, you can stack shells on top of each other that are mirrored over a plane, or even radially, so that they reference the same portion of the texture. However, when doing so be careful to consider what kind of ambient occlusion shadows the affected shells will receive (if you use AO). If you have some form of text or logo on one side of the model that you don't want mirrored to the other, consider mirroring the entire shell except the area with the logo. Sometimes you can even add extra geometry around this logo in order to cut out that particular part of the shell, allowing everything else from the large shells to be stacked. To make symmetry mapping easier, cut your mesh in half before performing a layout.
  • Divide and conquer: Start laying out UV shells by placing the largest and most oddly-shaped shells into the UV range (0 to 1) first. Also consider going for another ratio than 1:1, such as 2:1 or even 4:1, as the shape of the texture map does not affect the texture processing at all. Work from one corner towards the opposite one, while trying to keep the layout ratio intact. This way, if you end up with too little or too much UV space left, you can simply select your entire UV layout and scale it.
  • Loading textures into the graphics memory is slowed down by the following factors: How many channels there are in the texture (RGBA is 4x more expensive than grayscale), how many pixels there are in the texture, and how many texture maps your asset uses. The latter is very important. When doing environment art, you are strongly advised to use texture atlases.

Shell spacing

Shell spacing refers to the amount of space between UV shells (also known as shell padding). There are a few things to note when it comes to shell spacing:
  • Texture bleeding: Texture bleeding is when the color information inside one UV shell bleeds into another UV shell due to texture filtering. In general, it's good practice to keep at least 2 pixels around all UV shells so that there is a 2px margin to the texture map border, and a 4px margin between UV shells. However, that only applies to the final version of the texture. If the texture map is further reduced in size by the engine you need to increase this padding.
  • If LOD models are being used, then every LOD/Mipmap step requires double the shell spacing. For example: If you have an asset with 3x LOD steps and an original texture size of 2048px, then on the smallest mipmap level the texture is only 512px. In this case, the spacing needs to be 4px between shells at 512px, then 8px at 1024px, then 16px at 2048px. Thus, when doing the layout you need to make sure that you have at least 16px distance between shells and 8px distance to the UV map border. You can use the UV Toolkit's Measure tool to keep track of pixel distances.

Keep UVs within the 0 to +1 texture coordinates

The UV Editor displays a grid marking the texture space for UVs. The working area of the grid begins at 0 and extends to 1. By default, the UV mapping operations in Maya automatically fit UVs within the 0 to 1 coordinates. While it is possible to move or scale the UVs so they reside outside of this 0 to 1 region, you should keep the UVs for a surface positioned within these 0 to 1 coordinates, in the majority of situations.

When the UVs extend beyond the 0 to 1 range, the texture will appear to repeat or wrap around the corresponding vertices when viewed in the 3D scene or rendered image. The exception to this guideline is when you actually want the texture to repeat on the surface, such as a brick texture along the model of a wall.

Overlapping UV shells

If any of the UV shells overlap in the UV Editor, the texture will repeat on the corresponding vertices. Depending on the mapping strategy (above) you want to use, you will either want to take advantage of / avoid this. Shells can be easily stacked using the UV Toolkit's Stack Shells command, or separated using its Layout command.

Snapping UVs

You can use snapping in the UV Editor to lock your transformations to existing objects in the scene. This functionality is similar to the snapping functionality in the scene view.

You can use the Preserve Component Spacing option in the Move Tool settings when transforming multiple UVs to maintain their relative spacing.

To snap to... Hold Icon
Grid intersections x

(In the Status Line)

Other UVs (points) v

(In the Status Line)

Pixels  

(In the UV Editor toolbar)

Note:
  • If snapping is on and you drag an axis manipulator (as opposed to the manipulator’s center), the manipulator snaps to the nearest point or grid intersection restricted to that axis (depending on the snapping mode). Alternatively, you can use Shift + x or Shift + v to snap to the nearest point restricted by the U or V axis respectively.
  • Pixel Snapping is measured by monitor pixels. You can zoom in close to the UVs to achieve better results. This setting also affects snapping for rotating and scaling pivot locations.

Related topics