UV mapping tut using unfolding paradigm

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  10 October 2004
UVmapping tut using the auto-unfolding paradigm

Here is a little tutorial for you guys, its kinda a case study so i can learn too. I dont think the unfolding method is that well known but it is very useful in my opinion.

Im using wings3d autoUV tool, im sure there are similar tools in other programs.

We will take a head and run it thru the unfolding process , after the initial pass we will see a problem with the ears and then take steps to correct this problem.

Here is the head we will be uv mapping.

As you can see its not a particularly great model but it will surfice for our study.

So the first thing i do when looking at a model like this is to figure out what are the most important parts of the model, and what are the least important. The least important parts will be parts of the model that wont really be seen. These areas are good candidates for seams.

So here I've colored in the areas that are most important to me, the eyes nose mouth and ears.

UV mapping by using an unfolding algorithm is different than the tradtional projection methods or mesh editing. With the projection methods one chooses a simple mapping such as planar or spherical and then the uv's are projected onto the vertices by that mapping. It is great for simple shapes, but for heads and such it isnt always the best solution. The second way is to first edit/relax your mesh to make it conform better to a traditional projection (edit- thanks EricChadwick) and then morph the mesh back to a reference. Even this can be a painstaking task and seeing the result can take some time.

The idea of unfolding is that one defines the seams directly on the model, the program (in this case wings) then mathematically unfolds the mesh based on a set of equations. Not wanting to get too technical it takes each polygon at a time and unfolds it by looking at its angle to its neighbouring polygon.

Anyway enough of the science. Basically it requires us to choose some seams then click GO .

Well we could just choose no seams, but we know that wouldnt be the best unwrapping, all the features would be squashed into the middle. So lets take some sensible seams, a cut round the back of the head and one under the throat. These are sensible seams for two reasons.

1. The back of the head doesnt have a huge mount of variance across it and will probably be covered by hats or hair or such.

2. The throat also doesnt have a huge color variance across it, also its hidden by the chin and maybe clothing and accessories that this dude is wearing.

Seams accross areas of little variance are easier to paint as one doesnt have to match up a load of intricate details over the seams. Some bluring and blending in photoshop often enough.

So lets see what happens when we 'unfold'

Not a bad result. The unfolding is very tidy & symmetrical and also has no overlap. However there is a couple of issues.

1. The mapping doesnt use up much of the texturespace this means that some pixels and therefore resolution will be wasted when using a square sized map.

2. The ears look ridiculously squashed. If we look again at the model, we see the ears at slightly larger that the eyes but in this case the mapping squashes them and distorts their shape. This makes painting the ears very hard in photoshop.

So what can we do. Well we could go straight into uv tweaking but that is a tedious job and really would take up quite a bit of time. So the other option is to add some more seams. Lets think...

Well we got those 2 problems (squased ear and mishapen ear) the source of both comes from the unfolding trying to fit the ear inside the space used by the ear funnel. the ear funnel is like a cylinder wedge protruding from the head but the ear itself is well er ear shaped not circlular. So What we are going to do is cut a seam around the ear shape itself, this will provide a natural unfolding that follows the ear shape.

Last edited by rebo : 10 October 2004 at 02:05 AM.
  10 October 2004
But how do we connect this cut with the rest of the unfolding. Well we need both a connection to connect the earshape to the face and also we need to cut from behind the ear round the back of the head, so the ear shape wont still be stuck within that funnel
circle. Here are the cuts.

And the result:

Well we are kind of there, as we can see the shape of the ear unfolded really nicely, but its too small , the seam has fixed the shape but not the size. Again we could goto tweaking but there is a quicker way. Unfolding algorithms like in wings lets us customize the unfolding process, it lets us "pin" certain UV's and it will make sure the unfolding respects the reletive position of those pinned UVs.

So what we can do, is move two verts apart on each ear to in effect scale up the ear in the unfolding process. But which two do we use? well remember when doing this sort of thing pick the most unique kind of UV's possible, so the algoritihm can follow a natural shape with the rest of the normal uv's.

So the four ( 2 on each ear) uv's we pick to move apart are those at the corner of each seam round the ear. We move them apart and then ( with them still selected) run the unfolding process again. [Tip:: before moving the verts, select all 4 and store that selection, you find yourself picking them lots if you do futher tweaks, and this saves time cos u can just recall that selection]

We get this nice output. Ears in proportion and correct shape a really easy map to paint in photoshop.

Ofcourse there are still some big issues with this uv-mapping. the two upper lobes are out of scale. But these are much easier to tweak than ears, mouth or eyes. There is also a little bit of overlap around the ear seam, but again this can be easily tweaked out and will be hidden by the ear itself anyway.

I think also id like to give more texture space to the mouth, this should be possible by pinning like I did with the ear.

Once the upper lobes are corrected (i.e. scaled down), and mouth fixed the uv-mapping will be almost square, and as such can be scaled up to take advantage of all the texture space. Or another option is ofcourse seperating completely the neck and scalp from the face, this provides maximal face texture-space at the expense of having seperate uv patches at a different scale from the face, as shown here.

In conclusion the auto-unfolding method makes some aspects of uv-mapping easier. However there are challanges to be overcome, in particular scaling of important features (as demonstrated with this ear problem above) .

In effect you are gaining time and ease of use but sacrificing control from a tweak only approach. However these tools are still at a early stage of development and hopefully we will see better and more useful features that make this sort of uvmapping easier to control and apply.

Here you may find the tutorial head I made in "obj." format so that you can try the above technique if you wish. Ofcourse any improvements or suggestions to the method are very appreciated. Maybe there are different seam cuts that give a better unfolding?


Last edited by rebo : 10 October 2004 at 02:16 AM.
  10 October 2004
Well written, thanks for this!

I guess the nose could also be tweaked the same way the ears have been. This makes me want to examine Wings3D in greater detail. The ability to weight the unfold algorithm sounds like a real plus.

One rather old-school method for the ears/nose/mouth/eyes is to relax the mesh itself, unfold the UVs, then revert the mesh. But your method sounds better, since you see the result immediately in the UV view rather than as a later step.

Thanks again.
  10 October 2004
Thanks !

The main issue i have with this method, is that whilst it creates well layed out UV's with no overlap or stetching it does almost tend to 'over-relax' the mapping. For instance in the above example, lets compare the unfolding result with a straight quick and dirty planar projection.

Now whilst the planar projection (on the right) has horrendous problems of stretching, overlapping uvs, and the like, it cannot be denyed that its easier to visualise the planar map when painting in photoshop, than the mapping on the left that results from the unfolding algorithm.

So im not entirely convinced of this method yet. We need enough control to get the best of the planar projection world and this nice auto unfolding,no stretching world.

You can help alleviate this problem by using a lightmap bake. Here is an example and using it as reference really helps the texturing process.

Last edited by rebo : 10 October 2004 at 01:13 AM.
  10 October 2004
hi, interesting you have the head cut horizontaly at the back. I always make the ear a seperate shell, cut at the most inner loop of the ear where it attach to the face, less noticable there. Hence make a bigger uv space for the ear.

Is that a maya uv editor? I'm looking into either wings3d or blender3D for their auto uv feature, just to do the uv there. Do you know about the connection to maya? ie how stable is the obj export/import in wings3d? will I be able to script an auto import export...? for a maya to wings connection?
"Story in a game is like story in a porn movie. It's expected to be there, but it's not that important." - John Carmack
  10 October 2004
Yea i use maya to wings3d and back again, the obj import/export is fine. I really wouldnt recommend blender i find its obj interface horrible:/
  10 October 2004
Thanks for the info but... how/where are you getting the "Mark Edges to Cut" menu from?


- Keith
  11 November 2004
..I guess I answered my own question... apparently, if your model already has some form of UV coordinates, you don't get that menu, so I had to delete what was there first.
  11 November 2004
Rebo: I wanted to check those UV tools so I installed the latest Wings3D.
The problem is... I can't seem to access the AutoUV tool... I tried by installing the plugin but even if it says the plugin was successfully installed, I can't find it at all.

Did I miss something?


The ripper.
Observation is the key
  11 November 2004
Forget about my question... I found it

The ripper.
Observation is the key
  11 November 2004
sweet. Thx rebo. I totally didn't know about pinning verts in wings. That's going to be a big help.

  01 January 2006
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 12:34 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.