In previous tutorials, we showed you how to map UVs onto models
in order to place 2D textures on them.
While these workflows are all still valid, Maya 2017 Update 3 introduces a brand new UV Editor
and additional tools to make the process quicker and easier.
In this series, we’ll use these new tools to map UVs
onto our Emma character model along with her arsenal.
For more information on the basics of UV theory,
watch the first minute of our “Unfolding a UV mesh” tutorial.
Before you begin, set your project to the provided scene folder,
then open the file “01-UVToolkit_pistol_start.ma”.
In this video we’ll start by mapping the simplest of these objects: the pistol.
Select the pistol, then switch to the UV Editing Workspace.
This opens the UV Editor in a panel next to the Viewport.
As you can see, the UVs for this gun are unusable at the moment.
Note the UV Toolkit.
It contains all the tools you need for working with UVs, organized by common tasks.
Start by expanding the Create section.
From here we can project UVs onto the mesh in a number of different ways.
In this case, we’ll use Planar UV projection.
However, upon clicking the Planar button, the initial projection looks like a garbled mess.
That’s because the default axis for a planar projection is X.
That means the UVs are being projected from the top of our gun, instead of the side.
To change this, Shift + click the Planar button to open the options window.
In general, you can Shift + click various buttons in the UV Toolkit to access the option window
for those tools that have one.
Change the axis to Z.
While you’re at it, turn on Keep image width/height ratio to ensure the shell doesn’t get warped,
then project the UVs again.
This time the projection looks much better.
Maya has clearly stretched the UV mesh to fit the 0-1 UV space, so use the Scale Tool to fix it.
Let’s also Rotate it 90 degrees so it’s upright. While you could do this using the Rotate Tool,
you can also do it via the Transform section in the UV Toolkit.
This allows you to rotate by an exact increment.
This takes care of the left side. Now we need to do the three other sides.
The barrel is the easiest place to start,
so select its faces in the Viewport and create a planar mapping for them, this time in the Y axis.
Orient and scale the resulting UV mesh as necessary.
You’ll want to do the same for the rear of the gun, but these faces are a little harder to select.
The easiest way is to select a couple of faces on the furthest extremities (the hammer and guard),
then use the Grow Selection button until most of the back faces are selected.
You can then Shift + select any remaining faces
and apply another planar mapping to them in the Y axis.
Next, you can select the faces along the pistol’s bottom by Shift + double-clicking
between the faces along the same face loop from barrel tip to handle.
Apply a planar projection in X to these faces.
Use the same technique to select the faces on the top of the barrel
and planar project onto them as well.
You’ll need to combine the two techniques you used for the back and bottom of the gun
in order to get both the barrel and sights.
Finally, we just need to take care of the right side.
We actually already projected the UV map for this side when we did the left side.
We can confirm this by turning on UV shading, either by clicking this button or pressing the 5 key.
In the default shaded display, blue shells represent those facing forward,
and red those facing backwards.
This pink shell shows we have a blue on top of a red.
The easiest way to separate the two is to turn on the Back-facing Selection Constraint,
then marquee select the side mesh in face mode.
Looking at our Viewport, you’ll see that Maya has only selected the backward facing (red) faces.
To separate these out, go to the Cut and Sew section of the UV Toolkit
and click Create UV Shell.
You can now use the Move Tool to separate it from the left side shell.
And in the Transform section, you can use the Flip button to flip it in U.
Once finished, turn the Selection Constraint off again.
Because this is such a simple mesh, it’s easy to arrange the shells so they don’t overlap.
Once you’ve done that, click the Save UV Snapshot button to save an image file of the UVs.
You can now use this image to create an associated 2D texture.
Once that’s done, you can apply that texture to the pistol in the Color channel of a new material.
That finishes up the pistol.
In the next tutorial, we’ll show you how to map UVs to the more complex rifle.