A newer tutorial, which is hopefully easier to understand than this section, is now available: here it is.
To solve the problem we'll use the Flip UVs option from the Polygons menu in the texture editor. If you don't know which problem I'm referring to, please go back and read the previous two sections!
Important: your UVs might be arrange differently from mine depending on what you did when you were arranging them. Nevertheless, the techniques I will demonstrate are the same so follow along as best you can. Here's what I did:
First I used the Scale Tool (hotkey: R) to ensure all the UVs lay inside the (0, 0) to (1, 1) UV space. If this isn't done, our texture won't cover them all.
Notice how I squashed the "bottom" of the chest? This is so it takes up less space. When we come to create our texture we will squash that too, and the finished article will be expanded with UV map.
In Edge selection mode, I then selected the bottom-left edge of the bottom-left face. This was an arbitrary selection. The perspective view shows the selected edge at the same time so I saw that this edge did indeed correspond the left corner of a face in the model.
However the other side of the highlighted edge was flipped. It was on the left of the face in the texture editor window but it was on the right of the face in the perspective view. Therefore I needed to flip the UVs so they faced the right way.
In Face selection mode, I selected the errant face. Notice how Maya hides the unselected faces so you can work with selections easily.
Then I used the Flip UVs menu (MEL: polyFlipUV -ft 0 -l
on
). No change shows in the texture editor (because there's no texture
loaded yet) but the Script Editor (Menu: Window /
General Editors / Script Editor) shows the the result of the
flip. Now you can select by edge again and voilà the right edges are
selected. For the sake of "doing it properly" I also rearranged the
two faces so they are linked in the logical way.
Using the same technique I flipped and moved the other two faces:
OK I realise that the whole UV thing was quite long. If there's anything you didn't follow, just go back and read through it again. It's really quite simple once you get your head round it. The trick is making sure that adjacent edges in the viewports are adjacent in the texture editor as well, and that the logical way of folding the UV planes together is the right way!
With the UV maps set, it's time to create a texture file. In the texture editor, choose UV Snapshot from the Polygons menu and save the file in the format of your choosing (Targa is a good one) to some directory on your hard drive.
Now you can load the snapshot into Photoshop and use the lines as a guide on where to draw your textures.
Here's my incredibly detailed image. Notice how I squashed the "bottom" of the chest (side E)...
Now it's time to apply our texture to the model. Select the mesh and right click to bring up the context menu. Select Materials / Assign New Material / Lambert. The following window appears:
Click the checkerbox to the right of Color. I've highlighted it in red. From the next menu, choose File:
Now you can browse for the texture file:
Unless you give a low priority to actually seeing your texture, you'll want to select Hardware Texturing from the Shading menu of your viewports. Here's my image. Oh no! Face E is upside down. I need to flip the UVs on that face (again)...
After selecting the face and flipping UVs, it's still not right:
I need to rotate the UVs 180 degrees, which I can do in the texture editor.
| intro | part 1: Setting the layout | part 2: Editing basics | part 3: Vertex manipulation | part 4: Face manipulation | part 5: Materials, texturing and UVs - (i) | part 6: Materials, texturing and UVs - (ii) | part 7: Materials, texturing and UVs - (iii) | part 8: Final notes |