The Tutorial - Mapping

Onto the mapping of our character. Mapping is the process of telling textures where to go on your model. For games this generally entails a number of square images to the power of 2. 64x64, 128x128, 256x256, 512x512 and so on.

UT2004 generally uses two 1024x1024 maps for it's characters. For my model however, we will be using two 1024x1024 and a 512x512.

A well used (and recommended) method in mapping is to overlap you mapping. Using the same space to create textures for 2 (or more) areas not only saves space for more things, but allows you to up the quality of that areas texture. Be careful though, as you lower the oppurtunity for customiseablilty (if you overlap half the head for example you can't put a scar on one side for example).

After texturing my creation I have had to come back and warn you of a few points I picked up. I could do it again to be the ultimate perfectionist and look like I'm a god of mapping...but I'm only human and you will learn from my mistakes. So do what I say, not what I do...when I say it ;)

In most instances I had work arounds handy in relation to the issues. For example stretched or squished mapped areas could be stretched or squished textures to counter the imperfection, so you wouldn't know unless you looked closely at the texture. You should, however, always work for uniformity and good proportion. It makes texturing easier, and takes a lot of the guesswork out of it.

I still have my model as elements. I will be using this to help me change the characters mapping channels to suit the three different maps. Each channel represents a texture.

I will be putting the Head, Shoulder pad, Torso and Pack on one 1024x1024 (this is good for having a Red and blue team colours (the mana canisters can be different colours for example)

The trenchcoat, hand and boots will be on the other 1024x1024.

The legs and tech arm will be on the 512x512.

To change the Map Channels, select you elements or Polys using the relevant tool and scroll down the modifier to the 'Material' Section just above the Smoothing Groups grid. Here you can set the Map channerls to 1, 2 and 3. You can select them through here too if need be.


TIP: MAKE SURE you reset the pivot to the world axis, otherwise the mapping process can be VERY annoying. With the mapping tools inside Unwrap UVW using the pivot axis as it's base, skewed pivots make things particularly troublesome when using X, Y and Z mapping.

In the Hierarchy tab ( ) next to the modify tab you will see Adjust Pivot section. Select Affect Pivot Only, and you then have the ability to move and rotate the pivot of your object. Also handy to note is the Centre to Object in the Alignment section which does exactly that.

A wise thing to do is to make sure that all of your objects that you want in the one mesh are at least attached as one. (I don't know if this is compulsory, but it IS a lot cleaner)

Once you have applied the three mapping channels we can start to make some shortcuts to help the unwrapping process by using the usual UVW Mapping techniques. Firstly we will approach the Head with a Cylindrical map. Select the Head element and then apply the UVW Map Modifier with it still selected. Choose the cylinder map type with cap applied and then Fit it to the Head.

To see your results of this example, apply an edit mesh (or Collapse all the modifier stack) and then apply an Unwrap UVW modifier. Now THIS is your new best friend, you'll be spending a lot of time in here if you are the mapping type :)

Select Edit from the Parameters section of the modifier and a new window will come up. This is your map/s. Select the image here to have a quick overview of the main tools I use in this window, and how the head map we just applied looks after filtering map channel 2 and 3 out using the pulldown.. after I moved all the unediting map stuff out of the way of course.

The Unwrap UVW has a subselection called Select Face, this I use to select faces from the 3D viewport if needed :)

Collapse the Modifier stack once more and start working through what elements you can, applying what standard mapping types you can such as cylindrical, Sperical and Box (Planar ones are easily done in the Unwrap UVW however). There ARE tools inside Unwrap UVW to do the things that aren't as easy as the standard shapes, and we'll get to that next. I'm going to use them instead of standard.

Another method of mapping Standard tools is to create an object representing the map you want to use (box, cylinder or sphere) and move it into the position you would want the map to be by using the model instead. Apply the corresponding map to it so that it equals your model exactly. Select the element/polys you want to apply the map to and then apply a UVW Map to it. You can then use Acquire by clicking on the model you just created to use it's mapping information. Handy to use if you need something a little more visual and modifiable.

OK, now to the actual WORK.

Collapse the stack so you have your editable mesh / poly and apply an Unwrap UVW modifier to it. Open the subselection and choose Select Faces. Then, turn off Ignore Backfacing in the modifier (if you want to, I just find it more annoying than not to have it on). Hit the big grey Edit button to pull up the Unwrap window, arrange the screen so you can see your model (a bit of it at least) and the window together . Filter your Map Channels to Channel 1 (at the base of the edit window interface) and we are ready to roll!

The same sort of control scheme works in the Unwrap window as it does in the main viewports. Holding the middle mouse button and moving moves around, scrolling the middle mouse button zooms in and out.

A good, tight map is highly recommended as a skill. If you, or anyone else for that matter, were to skin the model you don't want them having to accomodate for a messy map. Do unto others as you would unto you...sort of thing. So make sure you make it neat and tidy.

Now as you can see, my head has been mapped already using the cylindrical map from before. Although there are still some issues with some missing polys and overlapping (such as interior of the mouth etc.

Firstly lets clean up some holes that have turned up in my model (above the ear in this instance). You can see these holes easily by the green lines as they represent lines that are on the edge of the poly (not joined). Sometimes even lines that SHOULD be joined are in green, and simply require welding of vertices to clean it up.

To see where the missing parts are, select a vertex on the edge of the missing hole, a blue vertex should show up elsewhere in the window, this is the vertex (or vertices) that are joined to the selected vertex on you model. To make it VERY clear, go to Display | Show Vertex Connections to pull up the corresponding vertex number.

Firstly we need to clean up the ear to make sure the overlaps are sorted so we can see what we are doing easier. Move the vertices around so that they don't overlap, but keeping roughly the same poly shape as it would on the model...in this case I scaled the whole ear slightly up, in order to make the internal areas fit a little better. Pay attention to the things you are moving...the back overlap of the ear does not have to have as much detail as the front, for example, so you could get away with keeping the thickness of the rear section to a minimum.

Also note the Right Mouse click menu has tools such as Weld Selected and Target Weld. These were used to weld the vertices that were loose as needed. Target Weld is the Main tool to get vertices around where they need to be. Move the Displaced Polys down closer to the ear area to enough to be able to select each vertex. By using Target Weld, Click and Drag the vertices to the corresponding position so that it joins where it needs to be. If a vertex is pretty much exactly where it needs to be, but isn't welded, sometimes a simple click will weld the two, rather than a click and drag.You should end up with a closed mesh, for the ear area at least. And there you have it...one mapped ear!

I did the same with the other side, without much care for the actual ear layout (although getting rid of overlaps to make it easier to sort once more) as I will be flipping the head in order to up the texture quality of the face area. Firstly though, I will clear out the interior of the mouth in order to make that a lot easier to sort out.

I firstly selected the whole interior mouth area, and then start taking out the vertices that fall on the outside by either using the main viewport, or one by one in the UnWrap window. It's easy enough to do as it's easy to see the mouth line (crossover between exterior and interior of the mouth) and the lines the lead from them.

After I had selected all the vertices of the interior, I then used Right mouse click and Detach Edge Vertices in order to do exactly that, moving the selected vertices to somewhere else to clear out the space.

 

I had a Displaced Poly in there too on the upper lip, so I cleaned that up as well. I also moved the overlap of the eyelid (the polys underneath) and the middle two eye vertices down just under the eyelid. I did this more so the whole eye could be textured (without fear of skin looking like it was on the eye). As the overlap area is under the lid, it can be as small as it wants, as long as it's visible to texture the line of eyelid, and eye itself.

After that, I moved around certain elements in order to balance out the head mapping area. Tools I used were Move vertices, Move polys (select this down the Bottom in the options section of the Unwrap window) Detach Edge Vertices, Target Weld and Weld Selected...all the usual things, to get the following result. This is then ready to be halved, then flipped and then lined up exactly. Note the middle isn't exactly a straight line down, the area that won't be halved, will simply extend beyond the half line...and the texture will take care of that element.

This is a selection of the polys I intend on flipping. To make selection easier I selected all the vertices that lie in the middle and scaled them down along the one axis ( To find this, hold down the Scale button at the top left of the Unwrap window). I then selected the Poly select tool, and selected all the polys on the right hand side of the middle line, and then deselected the polys that fell on the left hand of the line...resulting in the final selection. Make sure to hold down shift when moving the faces so that it stays along the same axis.

I then detached the edges ready to flip.

Finally, mirror the selected face along the horizontal axis ( at the top of the Unwrap window ), and then moved it along to overlap the other half of the face (holding shift still to make sure it stays in line) to the corresponding faces.

It should be very close, but I assume you will need to tweak the vertices nevertheless. I use the scale tool a lot to grab the vertices (on a point) and scale them down to the smallest size possible, Alternatively you can weld them together. Although I only recomend this if you KNOW you are going to over lap and don't need to select the side of the face as an entity again...which I do not. And here is your end result. I scaled it up on the horizontal axis a little as it was looking a little thin. (Click on the image to see the map closer)

And just to test it, lets apply a checker map to see how well it mapped. Pull up the material browser and select a new material. Go to it's Diffuse map and select Checker, and Tile it 10 times on the U and V axis. Make it display in the viewport and apply it to the mesh. The intention is to get the checkers as square as possible over the whole mesh...as you can see in this shot, the top of the head will need some work, but other than that it's pretty much good :) It's easy enough to edit the vertices to accomodate this.

After you have seen it at full black and white, tone the two colour types in your checker to something more reasonable to work with. Two similar shades of grey for example.

> Mapping 1 >