uv mapping 101 – part 1

For beginners, UV mapping has always been a challenging part of the modeling/texturing process. Although the theory is rather simple (think of how you would ‘unwrap’ the earth to create a flat map of it) it seems that no software package offers an ideal intuitive solution to performing UV mapping. For definitions I suggest you refer to the 3D glossary provided and also it would be useful to read two articles written by Steve Theodore for GDMag (June/July 2004 and September 2004): Maps and legends and Stitch, Cut and Relax.

The ultimate goal of this tutorial is to complement the class and the textbook (which is rather weak in its presentation of such an important subject as UV mapping). We will work with the model of a spaceship provided here. When you are working with your own model you need to make sure that: your model is clean (ie no hidden faces) and that you have deleted the history.

Before we move on to the spaceship I will use the simple concept of texturing a cube as a dice as it is the most simple example of UV mapping you can find. Let’s get started!

1. Create a new project. Save the scene as cube_01.mb

2. Create a polygonal cube as below – one face per side. You could texture the dice by assigning a different material with a different file texture representing each number to each face. It wouldn’t be efficient though and think about what happens when you have an object with more than 6 faces!


click for larger image

3. Create a picture like the one below in Photoshop (or your favorite image editing package). Save the file as one jpg or iff in the texture folder of your project directory. The reason why the dice dots are laid out in the shape of a cross in the PSD file is to use the analogy that if you would have to unfold the cube if it was made of cardboard it would look that way. Usually textures are square and more compact.


click for larger image

4. Back to Maya create a Blinn material and map the file you have just created to the color attribute. Assign the material to the cube and see what happens. The file is mapped to every face. Which is not right. Not at all.


click for larger image

5. With the dice selected open the Window > UV Texture Editor and look at the window that just opened. You can see that the cube is unwrapped but the individual faces are not aligned with the right dots. Also the dice is unwrapped in a different way than what we thought it would. You could adjust the texture in Photoshop but here I want to keep it as it is to show how to adjust the UVs instead. Please note that in this case, because the cube is a primitive, we already have a UV set. In most cases, polygonal objects do not have a UV set and you have to create one with projections (we’ll do this with the spaceship).

6. In the UV Texture Editor (UVTE from now on), zoom out (all the keyboard and mouse operations from Maya work here too) and right click above a segment of the unwrapped cube. See below:


click for larger image

7. Now marquee select all off the cube. You have selected the UVs from the cube. Look in the perspective panel. All the corner verts of the cube seem to be selected. UVs indicate what point of a texture should be aligned to certain verts. But wait you say! Most of the texture here is gray! In the UVTE open Image > Image Range Options and play with the values such as below. You’ll see that the texture gets tiled although it might not necessarily show. Reset the image range settings to what you had originally


click for larger image

8. In the UVTE Select all the UVs again and scale and rotate them (same commands as in the regular Maya interface) as below. As you can see, the dice has correctly mapped faces with the exception of two of them (number 3 and 5 in this example). If you look in the UVTE you can see that two faces are on top sitting above some flat green. Let’s move them to where they belong.


click for larger image

9. (I hid the texture here to have clearer screengrabs – to hide the texture you can toggle Image > Display Image in the UVTE). Right click above the cube in the UVTE and choose Edge (you chose UV previously). Click on the edge shared by the top-left and the top-middle cube faces (in the UVTE). As shown below. In the UVTE choose Polygons > Cut UVs .


click for larger image

10. Not much might seem to have happened but yes you have just performed your first UV cutting operation. Now select the bottom edge of the top-left cube face. You can see that the corresponding edge in the second middle face from the top is highlighted. This means that they are common edges. Choose Polygons > Move and Sew UVs.


click for larger image

11. Adjust the UVs (right click and choose UVs). Repeat for the other (right) side.


click for larger image

12. The dice should now be perfectly textured.


click for larger image

13. Conclusion: this simple example shows how by manipulating the UVs of a polygon object the artist can align very precisely with an object. UVs are kept and arranged within the texture space in the UV Texture Editor. Now let’s move on to a more complex object by texturing the spaceship provided with the files.


click for larger image

Final scene file here

in the news

Acupuncture improves quality of life for allergic asthma patients


A large randomized controlled trial involving 1445 patients with allergic asthma found that an integrative medicine approach in which acupuncture is added to routine care demonstrated improvements in both quality of life and physical and mental health.

more...

herbe du jour

Huáng Qí / Astragali Radix


Qi Tonic - Tonifies Qi and Blood, raises Yang Qi, boost immune system, reduces edema, generates flesh and promotes discharge of pus.

more...

upcoming events

  • 09/16/2017Mastering Functional Endocrinology
  • 11/17/2017Mastering Functional Blood Chemistry
AEC v1.0.4