Introduction to UVs
Tuesday, November 24, 2015
7:23 PM
What are UVs?
UV unwrapping is the step that comes between modeling and texturing an object in Maya. This process translates our 3D object into a 2D map that we can use as guides to paint our texture with. Because this map will be responsible for the way that textures are projected on our object, it's very important to create it carefully, and with a minimum number of cuts, which are referred to as seams.
Image by Zephris via wikipedia
If you have a background in sewing, papercraft, or skinning animals (…from hunting/taxidermy, not from being crazy), then you have already experienced a similar process to UV unwrapping.
The term UV specifically refers to the fact that our 3D object is being charted in a 2D space. Just as 3D space is referred to in X, Y, and Z, 2D space is referred to in X and Y (length and height). To avoid confusion, the letters are shifted from X and Y to U and V, so when discussing them, it is immediately known that you are talking about 2D coordinates, and not just specific coordinates in 3D.
So, the UVs of our objects are merely the points that represent our 3D object in 2D space.
Working with UVs in Maya
In Maya, we work with UVs exclusively within the UV texture editor. This can be found in the Polygon menu set under Edit UVS => UV Texture Editor (it's at the very bottom).
The UV texture editor is a stand-alone window that features a variety of tools on the top, and a grid below that's divided into four quadrants. Notice that the upper right hand quadrant has a green and red line in the corner. These represent the Y and X coordinates. This specific quadrant is where we will be laying out our UVs, and is referred to as the 0 to 1 space.
By default, when we apply textures to objects in Maya, they will only appear in the 0 to 1 space, and tile in all the other quadrants. So it's important that when we are unwrapping UVs and preparing them for a texture we make sure that they only appear in this area. There are many more advanced things that can be done with the remaining UV grid, however they will be covered in future classes. For now, we're going to just focus on the 0 to 1 space, and only use the remaining grid quadrants as a work area.
When you select an object in the scene view, the object's UVs will appear in the UV texture editor. All objects in Maya come with UVs, however these can become distorted over the course of the modeling process.
The character model you see above started as a cube and had the same exact UV set as the cube example, however, through the process of extruding, combining objects, adding edge loops and modifying the shape, the UVs became a huge jumbled mess.
By unwrapping UVs in a specific way, we're able to translate the map into something easier for the human eye to parse, and by extension, create something that we can use to paint a texture map with.
UV Texture Editor Tools
Displays checkered tiles on your UVs:
Shows you if your mesh is distorted. Red is compressed, blue is stretched.
Shows you if the UVs are oriented correctly. Blue means UVs are correct, red means UVs are flipped.
To Flip UVs, select the flipped UV shell and click one of these flip UV buttons. The one on the left flips side to side, and the right up and down.
Selects UV shells. Remember, you must be in UV mode, then click this button, and then select the shell you want to select.
Unfolds selected UVs and places them in the 0 to 1 space.
Unfolds/Relaxes UVs. Left click and drag over the icon to perform the operation.
Rotates your UV shells clockwise or counterclockwise.
Cuts edges. Remember to select the edge you want cut, and then hit this button.
Move and sew. Select the edge you want sewn together, and then click this button. Your shells will be moved together and sewn.
Unwrapping UVs
In Maya, there are five main operations for generating UVs for your meshes. Each one serves a specific purpose, and is best used on certain items, primarily based on their shape. The first four of these operations can be found under the Create UVs dropdown.
Planar Mapping
Planar mapping is best utilized for large flat surfaces such as planes and boxes. Generally, you select the surface that you want to UV, and then go to Create UVs => Planar Mapping.
Before using this tool for the first time, I highly recommend going to the Planar Mapping options box to change a few settings.
By default the Fit Projection To option is set to Bounding box, and the 'Keep image width/height ratio' box is unchecked. Change the projection to 'Best Plane', and tick the width/height ratio box. With these options, Maya will look at what you have selected and decide the best direction to project from, and will keep the proportions of the selection as well. This is really useful for faster UV unwrapping.
Cylindrical Unwrapping
Cylindrical unwrapping is ideal for…cylinders! Half cylinders, whole cylinders, anything that has a round shape that isn't a sphere.
When you first enter the cylindrical unwrap tool, the projection tool only wraps halfway around the object. Drag the red handles all the way around the mesh so they are opposite of the yellow cube.
Spherical Unwrapping
Similar to cylindrical unwrapping, however there's an extra handle to wrap all the way around the sphere.
Note that spherical mapping creates poles at the top of your UVs that will need to be cleaned up.
Automatic Unwrapping
The last UV toolset is actually under a different dropdown. This is not to be confused with the automatic unwrap tool in the Create UVs drop down! Instead, this tool can be found under Bonus Tools => UV Editing => Auto Unwrap UV Tools.
Once you enter the tool, there will be an initial window. Click Enter Tool and Close.
Unlike the other unwrapping tools, with the Auto Unwrap UV tool, we define the edges we want to become the seams of our UV islands.
Select the edges that you want to become seams, and then hit the Add Borders button. If you accidentally add a border that you don’t want, select the edges you want to get rid of and choose Remove Borders. When you are finished adding seams, hit Continue. Maya will auto generate your UVs for you.
If you're happy with the results, click Done, otherwise choose Go Back and continue to refine your edges.