header Printer Friendly Version

In this tutorial I am going to walk you through an introduction to laying out your models UV's for use in applying texture maps to your model that do more than simply make it red, blue, yellow, desert sand bug, or a checker board. Yes! I know you are shocked! What more could you possibly need then a shaders color channel and checker a board texture? Not much, but after hours of searching I finally found something that needed something more. :-)

A die.

No, nothing about death you morbid people. A single die, like dice but only 1 of them :-)

In this tutorial we will go through introductory steps as to how to apply a single file texture (tif image file) to our model in order to change it from a simple cube into a die.

For those of you sheltered individuals who have never seen a die before, here is an image of a couple.

diceImage

You will notice that each of the sides of the die in the image has successive dots going from 1 to 6. In order to properly create our die we need our dots to be on the correct sides.

1 dot is opposite of 6, 2 is opposite of 5, and 3 is opposite of 4.
For this tutorial we have some milestones we need to hit in order to call this project complete.

Here they are:
  1. Acquire our model
  2. Acquire and assign our texture map
  3. Layout our models UV's.
  4. Render our final textured model.
Lets get started shall we!

First we need to Acquire our model.

  1. 1. Download simpleDie.zip and save it to your maya projects directory
  2. 2. Unzip/Extract the simpleDice.zip file so that you have the simpleDie project folder in your maya projects directory.
  3. 3. Open maya and go to file> Project> Set
  4. 4. Go to file>Open Scene and choose the simpleDie.ma file
  5. 5. Once the file is opened you should see a simple polygon cube sitting on the grid. See image below.

picture1
I have wireframe on shaded turned on for this tutorial. If your file does not look like mine do the following:

In your panel view go to Shading and choose 'Wireframe on Shaded' to toggle it on and off.

We are going to spending an equal amount of time during this tutorial between our perspective view and our UV texture editing window. To open this window go to your Main Menu Bar > Window > UV Texture Editor. See image below.

Picture 2

There are a number of tools and options built into this window, some of which we will utilize in this tutorial while others we will not. I highly recommend you read up on the remaining tools and experiment with their uses on your own at another time to familiarize yourself with the full scope of UV mapping tools Maya has to offer.

Milestone 'A' has been reached! We have our model. Let's recap and see what we need to do next.
  1. Acquire our model
  2. Acquire and assign our texture map
  3. Layout our models UV's
  4. Render our final textured model
Milestone B is to acquire our texture map. However, before we do that, lets look further at our model and its UV's to determine what they look like and where we need to go next.
  1. 6. Bring up the UV Texture Editor.
    You will notice a grid in the main work area that is split into 4 quadrants.
    Picture 3

    This is the area in which we will be able to layout and arrange our objects UV's. The most important quadrant is #2. You will notice that each of the 10 grid lines are marked evenly (.1 each) from 0 - 1. This is defined as our UV space and is specially positioned in the positive quadrant. Each of the other quadrants are used to display how textures will be tiled if non-repeating texture repeats are set. For now we will ignore quadrants 1,3 and 4 and focus solely on quadrant 2.

  2. 7. Go back to your perspective view and select the cube. Then go back to the UV texture editor. You should see something like the image below. If not, make sure the 'Display Image' button is selected. Toggling this button will turn off/on whether the texture maps for the selected objects shader are displayed or not.

    Picture 4

    What we are seeing is the display of how the texture (in this case a black and white ramp texture) will be displayed on our model.

  3. 8. Go to your perspective view and hit '6' on your keyboard. This will display your scene in texturing mode. If you have any textures applied to your objects shaders they will be displayed in a low resolution mode while in this mode.

    Picture 5

  4. 9. Rotate your camera around the cube and analyze how the ramp texture has been applied to it. Notice that the ramp texture is evenly stretched across each of its 6 faces individually. While the white stripe lines up across 4 of the faces, 2 of them do not. They display the stripe straight up and down.

    Picture 6

    The way this stripe is displayed on our cube entirely depends upon the way its UV's are laid out. In our case each of the 6 faces are laid out overlapping each other evenly in the 0-1 UV space (quadrant #2). In the UV Texture Editor you should see a white border outlining quadrant #2. This is each face of the cube.

  5. Picture 7

  1. 10. Go into component mode (Faces) and select one of the faces on our cube.
  2. 11. In the UV Texture Editor notice now that the face is highlighted evenly in quadrant #2. If you do this for each face you will notice the same thing.

    Picture 8 Picture 9
    This is all nice and good looking, but we are making dice. Not a funny striped cube thingy.
    What are we to do next?
    Well the whole point of this tutorial is to make our cube into a die.
    Our checklist says we need to acquire a texture map to use. Luck for us we have one!

  1. 12. Right click on your cube in the perspective view.
  2. 13. Choose "Assign New Material" from the drop down, then choose blinn as the material we want to assign from the next menu.

    Picture 10

  3. 14. Your attribute editor for the new blinn shader should be up. (If not, open up the attribute editor for the new blinn material we have created).

    Picture 11

  4. 15. Rename this shader to "dieShader"

    Picture 12

  5. 16. Click the checkered box to the right of the color channel. (this will bring up our texture assignment for the color channel of our shader).

    Picture 13

  6. 17. Make sure "Normal" is checked at the top of this window instead of "As projection" or "As stencil." Then click the "file" button. This will attach a file texture to our shader in the color channel. By default it will show up as black, until we choose an image file to apply.

    Picture 14

  7. 18. The attribute editor will now show details for our file texture node.
  8. 19. A dialogue box will come up allowing us to choose a file texture from the computer to use.
  9. 20. Hit "Ok" or "Open" whichever it is on your system.

    Our image file is now attached to the color channel of our dieShader material. If you are in texture mode ('6') in the perspective view you should see this image file now attached to our cube. However, you will notice that it doesn't really look right. every side of our cube looks the same with all of the dots laid out across the face. Close, but not quite right.

    Picture 17
Yes! there is still more to do :-) But, we have completed our second milestone. Let's recap shall we.
  1. Acquire our model (Check).check
  2. Acquire and assign our texture map check
  3. Layout our models UV's.
  4. Render our final textured model.
Ok, so we have our model and the texture map is applied. Now we need to layout the UV's for our model so that each side of our cube has the correct area of the texture applied to it.

Let's continue...
  1. 21. Select the die (our cube) and open the UV Texture Editor. You will notice that the image file is set within the bounds of quadrant #2. Remembering that each of our faces UV's is overlapping one another evenly stretched in quadrant #2, we can see why the texture is displayed the way it is on our cube.

    Picture 18

  2. 22. In your perspective view make sure the cube is selected. Go into component mode (faces) and select the top face of the cube.

    Picture 19

  3. 23. Convert the selected face to its corresponding UV's. Go to the the select menu and choose convert selection and choose "to UVs". Or you could use the hotkey of (control + F12)



  4. 24. Bring up the UV Texture Editor (Notice the 4 green dots around quadrant 2. Within the UV texture editor you can move, rotate and scale selected UV's within the 2D space of the UV texture editor.
  5. 25. move and scale the selected UV's to look like the picture below.

    Picture 21 Picture 22

    This is not the final position we are going to leave our UV's in. This is simply a place to put them while we separate out the rest of the UV's.
  6. 26. Select another face on the cube and convert it to UV's (control + F12).
  7. 27. In the UV Texture Editor again move and scale them so that they are not intersecting any other UV's or edges.
  8. 28. Continue to repeat this for each of the 6 faces until your UV Texture editor looks something like this:

    Picture 23
Now that we have all of our die's side UV's separated. It is time to reposition them so that each side of the die only gets the texture we want it to.

  1. 29. If you have toggled the image display off in the UV Texture editor you will want to turn it back on. You may also want to toggle the template image button (located below the image display button) this will fade the background image and make it easier to see what you are doing).

    Picture 24

    We are going to start with the top face of our cube and we are going to position the UV's so that the side with 1 dot gets assigned to it.
  2. 30. Select the top face of the cube and convert the selection to UV's
  3. 31. In the UV Texture editor scale and move the selected UV's to position it around the part with 1 dot. See picture for example.

    Picture 25

    Like I said earlier the placement of numbers on a die is important. You cannot just pick where each one goes if you want to be accurate. The number opposite of the 1 is the 6. We set our top face to be the 1, so the bottom face will be the 6.

  4. 32. Select the bottom face of the cube and again convert the selection to UV's
  5. 33. In the UV Texture editor scale and move the selected UV's to position it around the part with 6 dots.

    Picture 26

  6. 34. Select one of the side faces and align its Uv's to the spot with 2 dots in the Texture editor.

    Picture 27

  7. 35. Select the face opposite of the one with 2 dots and align its UV's to match up with the section of the texture with 5 dots.

    Picture 28

  8. 36. Now, select the face that is to the right of the 5 and align its UV's to the section of the texture that has 4 dots.

    Picture 29

  9. 37. Finally select the face opposite the 4 and align its UV's to the section with 3 dots.

    Picture 30

    Now we have the relative placement of our UV's setup. At this point your model should look pretty accurate. However, you may have noticed that some of your UV's either have gaps between them or are overlapping. For the final steps we are going to sew our UV's back together to re-link everything.

  1. 38. Make sure you are in component mode and go into 'Edge' mode.
  2. 39. Open the UV texture editor and select the edge between the 1 dot and the 4 dots. image31.png
  3. 40. Notice that another edge in the editor will be highlighted as well. If you are lucky the edge that is right next to it will also be highlighted. If not, then you will need to rotate the UV's of the erroneous face around so that the 2 edges line up.

    Picture 32

  4. 41. Once lined up make sure the 2 edges are selected.
  5. 42. In the UV Texture Editor's Menu go to ( Polygons > Move and Sew UV Edges )

    Picture 33 Picture 34

    You should see the gap between these faces become closed and the whole of the second face move to do so. The edges may be a bit wonky right now but its best to get everything sewn together before we fix any weirdness. We now have combined the UV border for both of these faces and re-linked them together.

  6. 43. Continue to repeat steps 38 - 42 until all of your UV edges have been sewn. Upon completion your UV Texture Editor should look something like this:

    Picture 35

    And after some moving and scaling of the UV's we get this:

    Picture 36
CONGRATULATIONS!!!! You have now successfully laid out the UV's for a model to match a file texture. Lets recap our check list to see where we stand.
  1. Acquire our model check
  2. Acquire and assign our texture map check
  3. Layout our models UV's. check
  4. Render our final textured model.

All we have left to do is do some test renders to make sure our textures are working as we would expect them to. For this final item you should do some quick renders at a reasonable resolution to make sure your model is looking correct.

  1. 44. Render 6 different angles of the die that display each side.
  2. 45. Save them out as .jpg or .tif files by going to the file menu in the render view and choosing save image.
  3. 46. Make sure you save the image to the images directory of your project.
render1 render2 render3
render4 render5 render6
  1. Acquire our model check
  2. Acquire and assign our texture map check
  3. Layout our models UV's check
  4. Render our final textured model check

That's it for the process of UV mapping our simpleDie model.

Now!!!!!

Download (Right Click -> Save As) the high resolution die file and place it in the scenes directory of your simpleDie project.

Follow the same workflow as before but with this new high resolution model.


For your final submission please provide the simpleDie Project directory

2 Files in the scenes folder of your project. simpleDie.ma and hiRes_Die.ma (Fully UV mapped)

The simpleDie_color texture map in the sourceimages folder of your project.

12 rendered images of your fully UV mapped dice. 6 of the simple cube die and 6 of the high resolution die.