UV mapping is a pain in the ass. Excited? It takes a long time, and a lot of patience and logic. It’s effectively like completing a puzzle, except none of the pieces fit together and there’s no picture on the front. It also takes a long time, depending on the complexity of your model, and a character model is about as complex as it gets. The UV Map for this character model took me three days, with two to three hour stints per day, so around six to eight hours in total. Fun.

Now before I start, I should note that the character below, is clearly not the character you were previously making in the earlier steps of this tutorial, it’s a derivative. I decided to take this base and create an updated RoboChick for Jailbreak, and I’ve made quite a few modifications which you can see below.

I should also note that I won’t be taking you through every single one of the steps I did to create the UV Map for this model, I’m simply going to take you through the tools and steps necessary for you to achieve the same thing. If I took you through every single step, this tutorial would be longer than the Lord of the Rings. Seriously.

So what is UV Mapping or UV Unwrapping?
UV mapping is the process of physically unwrapping the polygons of your 3D model and mapping it onto a single (or multiple), 2D plane. This 2D plane then becomes the flat canvas for you to paint the skin of your model onto in Photoshop. You are essentially taking each piece of the model (thankfully most of the model consists of cylinders), cutting a slice in them, then flattening them out. You then need to find a way to fit all of these pieces onto a single square sheet, 1024 x 1024 pixels in size. You can use multiple sheets but I’ll explain more on this later.

So before booting up XSI, load up Photoshop and create a 1024 x 1024 pixel blank Canvas, then fill it with 50% Grey using the F5 shortcut fill key. Save this as a PSD file somewhere easy to access via XSI, and name it something like UVBase1024.psd. It may also be worth creating a 512 x 512 base using the same method.

Now boot up XSI and load your character model. What we’re going to do is UV Map each section of the body individually, then combine that UV Map into a single one right at the end. So for each cylinder we’ve created we need to attach the base PSD to it, so for starters change the 3D view to Textured Decal mode, so we can see the result of what we’re about to do, select ONE of the Leg cylinders (we’ll duplicate it again later along with the UV Map), then click Material; Phong from the left hand side Menu. (I updated XSI Mod Tool at this point, so from here on in I’m using XSI 6.1, there’s not many differences, but some of the menus are in different places).

demo smoother

In the window that appears, click the little two pronged widget on the right, next to the colour swatch and a drop down menu will appear. Select Image from the menu.

demo smoother

In the next window that opens, select the New icon and choose New From File, then select your 1024 x 1024 PSD file from the directory you saved it in.

demo smoother

Click OK when you’ve found it and you’ll be returned to the same window. Now go down a little and select New (next to Texture Projection) and select Cylindrical. This is telling XSI that you wish to cylindrically unwrap this section of your model.

demo smoother

OK, you’ve now applied a cylindrical UV map to your leg, but you’ll need to adjust it to make it sensible before you continue, so press ALT & 7 together on the keyboard to load up the UV mapping window, and adjust the size so you can see both your model and the UV Map at the same time. It will most likely look something like the image below:

demo smoother

We need to adjust the map so we don’t have any odd angles, otherwise when we paint onto this in photoshop later, the skin will act very strangely and look terrible. So, using the UV Map window, select all the points of your cylinder by drag selecting, then click the little button in the toolbar that looks like a Cylinder, and choose Best Fit. The leg should now look something like below:

demo smoother

Better, but still not perfect. Let’s improve it a little further. Select Object from the selection pallette, and click anywhere in the 3D view, then select the little green tube that’s appeared surrounding your models leg. This is a sort of effector, which allows you to change how the UV Map is projected.

demo smoother

As you can see, it’s not inline with the position of the leg, so select it, rotate it (C) and move it (V) until it matches the direction of the leg. As you move it, you can see the effect you’re having on the UV Map in the UV window. When it’s lined up nicely, it should look like this:

demo smoother

Fantastic, this is much easier to work with now in Photoshop. So let’s just adjust the scale of the leg so it fits neatly into one corner of the UV Map (The corners of the UV Map are a slightly lighter grey than the background).

demo smoother

Now, rather than UV Mapping the opposite leg, we’re going to delete it again and duplicate the symmetry, but we want to keep the UV Map so they overlay each other, that way, we only need to skin one leg, and both will appear identical (optional of course, if you want the legs to look different, just move the UV maps apart in the map window). Before you duplicate the symmetry though, make sure to Freeze the leg to ensure the UV is baked on.

demo smoother

OK, I’m going to let you take it from here, but I’ll just mention a few useful controls for UV Mapping in the Map Window. You might find that sometimes using Planar Subprojection (next to the cylinder projection in the map window), is easier with certain parts of your model. Also there are two controls in the top right called ALL and ISL which all you to select chunks of the model at the same time, rather than individual vertex’s. Turn them on and off as you need.

demo smoother

When all the different parts of your model are finished, you’ll want to combine them into a single UV map (or multiple ones depending on what you prefer), so you’ll need to start combining elements of your model together by freezing then merging them. So select the Arm and Leg together, then press ALT-7 to see the two UV maps overlaid against each other, adjust either one so they fit on the same sheet, then Polymesh; Merge them together.

Once you’re ALL done, with the UV Map window open, click Edit; Stamp UV Mesh, and select the file type PSD and name your skin. Make sure to name it something easy to remember, as this is the filename Source will look for when compiled into game.

demo smoother

So there you go, once you’re finished you’ll end up with just one model and one UV Map like below!

demo smoother

Next time we’ll be looking at weight maps, which are even less fun than UV maps! If you haven’t given up already, you are truly the chosen one!

4 Responses to “Character Modeling Part 7: UV Mapping”

  1. Nauz Says:

    Haha, the first paragraph is really motivating, but sadly true.
    For me its the most aweful part of modelling aswell, XSI has exactly the same unwrapping tools as maya.
    Hopefully one day programs will be smart enough to do UV mapping automatically ;)

    ~a frustrated modeler

  2. Sotosyeah Says:

    Yeah, UV mapping is a hell, it would own if it could be done automatically :P

  3. Video Game Violence Says:

    EPIC site :) I’m so happy I wandered here through google, onna need to put this one on the blogroll :D

  4. lg over the range microwave Says:

    i very adore your own posting choice, very remarkable.don抰 quit and keep penning mainly because it simply just that is worth to read it,looking forward to looked over way more of your current well written articles, have a pleasant day!

Leave a Reply