We use Cylinder Mapping when we have a cylindrical object to unwrap. No surprises here.
Cylinders, cylinders everywhere!
The human body can be broken up into cylinders – check out my character modeling tutorial to see that principle in action.
In the case of cylindrical unwrapping, the arms and legs are good candidates. When you’re unwrapping a character, cylinder unwrapping tends to come into play in those areas.
Let’s create a cylindrical unwrap for the arm.
Right now the arm has UVs from the planar maps I did in part 1. I’m going to select the faces of the arm and you can see them highlighted in the UV editor.
When I click Cylindrical Unwrap, this gizmo will appear centered on the arm. The gizmo will always appear in this orientation, and you can see it doesn’t match our arm’s shape very well. I need to rotate it!
Down in the lower corner of the gizmo is this red T. Click it,
and the gizmo changes – there is now a transform component gizmo centered on the cylindrical unwrap.
Clicking the rotate ring and rotating it affects the cylindrical map like so:
But while I’m doing this, take note of the channel box over to the right – while I’m rotating, I can see that not only does the Cylindrical Projection have its own input node (in this case called polyCylProj1), it has axis rotations that are changing as I’m rotating the transform gizmo.
This means that I can type in my own values – in this case, -90X and 90Y – to orient the cylindrical gizmo to my arm.
The gizmo is still too wide and too short – should I worry about that? Nope.
Open up the UV editor window and look at the arm UVs. They are pretty well shaped already. The size and shape of the cylindrical unwrap gizmo isn’t all that important; the rotation is what’s important.
One of the key aspects of the rotation is where the opening of the cylindrical gizmo is pointing. The gizmo itself looks like it is only half a cylinder – the part opposite the cylinder shape is the opening.
That opening is where the seam for our object will be placed. Just like clothes, seams are where we are cutting our 3D object apart so we can lay it flat.
And just like on clothing, we want to hide our seams as much as possible! In this case, you can see that the seam is in the center of the bottom of the arm – exactly where it should be.
For reference, this is where seams on clothing sleeves are placed too; this is because most of the time, the arm is down at a person’s side, hiding the seam against the body. Doing the same thing with our UV seam is a good idea.
Let’s talk UV topology: in general, we want the wireframe shape of our UVs to perfectly match the wireframe shape of our 3D object. This guarantees minimal distortion.
If you look at my UV layout of my arm and compare it to the 3D object, you’ll see the UV object is a bit too blocky, where the arm model is larger at the shoulder and tapers to the wrist – creating a more conical shape.
This creates distortion. Distortion usually makes our textures look worse! We want to avoid distortion. But how?
Smooth UV Tool!
Maya now has automated tools to make fixing this problem easier. You used to have to do this by hand! (uphill both ways in the snow on an abacus)
You’ll use this tool constantly – that’s why I’ve colored the title red, to make sure you see it and use it! After every new projection? Smooth UVs. Sew two seams together? Do a Smooth UV after. Change your mesh topology? Smooth UVs!
In the UV Editor window, I can switch to UV component mode, and select the UVs of our model.
Once I have my UVs selected, I am going to open the Tool menu in the UV Editor window, and select the Smooth UV Tool.
A yellow box with ‘Unfold’ and ‘Relax’ pops up. I am going to click and drag across Unfold repeatedly and my object will change shape.
Maya is making our UV layout more closely match our actual polygon layout, so that our UVs have a minimum of distortion.
Speaking of distortion, how can we check it? I like to apply a checker material to my color channel. The predictable nature of the checker texture means that it is easy to spot any distortions by looking at the surface of the mesh.
We know a checkerboard should have evenly sized squares and meet at right angles – so when we see something different, we have to fix UV distortion in that area.
In this case, we can see that the UV layout on my arm is working well, because the checkerboard in that area is evenly sized and all the right angles look sharp.
Cylinders for legs!
Now for the leg: I’ve selected the leg faces and have applied cylindrical mapping. I’ve rotated the gizmo 90 degrees to point toward the inside of the leg, where the inseam would be on a pair of pants. Remember, we’re always trying to hide those UV seams!
But when I look in my UV editor window, I see that the result isn’t as clean as the arm projection was. In this case, it is due to the shape of the leg itself.
Remember that human limbs aren’t perfect cylinders. On most legs, the ankle sits further back than the hip, creating a curve in the leg that makes capturing it with a single cylindrical projection tough.
What I like to do instead is unwrap the top and the bottom separately. I’ve grabbed the faces for the top of the leg and have created a cylindrical mapping projection.
I’ll do the same for the faces on the bottom of the leg.
Back in the UV editor, we see that my two new UV projections are overlapping each other. I want to move them apart.
An easy way is to select a single UV on either piece – and then convert my selection (hold shift+right click) to a UV Shell.
There is also a ‘Move UV Shell’ button to the top left of the UV editor.
Now I can just move my pieces apart.
I will once again apply my Smooth UV Tool to adjust the shapes of my UV shells. One thing to note – this tool only works on a single UV shell at a time.
My upper leg is smoothed,
and now the lower leg is smoothed.
But if I look at my object with the checkerboard applied, we see that the inside of the leg still looks a bit distorted.
And what’s more, I can see that the edges I’ve selected, the edges that should mark the seam of the UV shell, aren’t actually the seams on my shells in the UV editor.
I want to rearrange my UVs to make sure that my seam is where it should be.
With my edges selected, I go into the Polygons menu in the UV editor and I choose the ‘Cut UV Edges’ tool. You may want to activate it several times, as this tool can act buggy.
Also note – I am cutting the edges. Cutting on UV components won’t have any effect.
I’ve succesfully cut along those edges. Now I am going to grab individual UVs in the areas that I cut apart, and convert to full UV Shells of those areas.
I can move those over to the other side of the object.
Now I am going to select a few edges again. A neat trick in the UV editor window is that when I select an edge, we usually see some corresponding edges lighting up without us having to do anything.
This is Maya showing us that while UV components may be laid out differently than the way our mesh is laid out, edges are still edges – that is to say, edges are a 3D component, and Maya is highlighting which edges are connected to each other in the 3D world space.
Anyway, the edges that light up are matching edges. And if I go into my Polygons menu again, I can activate Move and Sew UV Edges.
My UV shells snap over to my main leg UV shell, and everything is merged together. Now I have one big contiguous shell, and the surgery I performed with Cut and Sew has moved my UV seam to where I want it.
I can select the edges at the knee and do the same Move and Sew UV Edges trick.
Once the leg is assembled I’ll use my Smooth UV Layout tool again.
Now my leg’s checkerboard is a lot more evenly spaced. We can see the seam very easily on our leg because the checkerboard is so predictable – when we create textures, it should be so obvious.
The outside of the leg, on the other hand, looks like a perfectly tiling checkerboard. Textures will apply nicely here.
On the last page we’ll tackle the rest of the body unwrap.