PDA

View Full Version : Efficient UV mapping method


Nicool
08-26-2004, 03:17 PM
Hi !

Here is a texture map by the great game artist Paul David . I'm wondering why he decided to fit the pieces into rectanlges. Obvioulsy, a UV checker will be badly deformated, but this way he use the full texture area. Do you know more about i. Would you advise me to do the same?

http://www.planetquake.com/polycount/cottages/souldesigns/portfolio2/david_thomas/david_texture_02.jpg

dur23
08-26-2004, 04:48 PM
Just because all the lines are really straight and such doesn't mean that the texture is gonna warp horribly. IT all dpepends on how your mesh is layed out. In this case souL's mesh was layed out in way that the uv's could be very linear. ie. (modeled the arms straight, body straight, etc. etc.) It just all depends on your edge layout.

[edit] Just Take a Look at the straightness of his modeling, and you'll see that there isn't very much distortion in the texturing (http://www.polycount.com/cottages/souldesigns/re_dude_19.jpg)

Nicool
08-26-2004, 04:54 PM
Does it really matter if my edge (on uv cuts) are not straight since the texture map will wrap to the mesh?

frink
08-26-2004, 05:32 PM
Nicool: If you use Maya take a look at "Auto UV" by CoyHot it's a free plugin and it's part of my workflow......It produces rectangular UV pieces as used in Souls work (dunno if he uses it).


bye

MRAY
08-26-2004, 08:21 PM
i ve been wondering about straight UV layouts myself lately.
like the arms for instance - arms taper at the wrists and when i unwrap my UVs they taper at the bottom (wrist area) which causes bad seams.

How would i go about straightening this out without warping the maps?

I started a thread about this very subject on the max forum -
http://www.cgtalk.com/showthread.php?t=164574

Thanks!
-Mray-

robinb
08-26-2004, 10:16 PM
A good reason to map pieces of the model to rectangles is so that it's easy to paint out the seams where they wrap around (for cylindrical bits like arms). With rectangles you can chop them out of the main texture to temporary images and use the offset filter in Photoshop to roll the texture round and bring the seams together and paint them out. Then you can paste the piece of texture back into the main texture and the seam should be gone. You have to make sure there's at least a pixel of wasted space around all the seams to allow for filtering.

StickFigure
08-26-2004, 10:45 PM
i ve been wondering about straight UV layouts myself lately.
like the arms for instance - arms taper at the wrists and when i unwrap my UVs they taper at the bottom (wrist area) which causes bad seams.

How would i go about straightening this out without warping the maps?

I started a thread about this very subject on the max forum -
http://www.cgtalk.com/showthread.php?t=164574

Thanks!
-Mray-
You can use the method robinb mentions above to fix seams on arms, even if the uv's are not a perfect rectangle. Model your uv's so there is no stretching and taper the arm uv's at the wrist. As long as the uv's are symetrical, you can copy one side and mirror it over and blend into the other side.

Nicool
08-26-2004, 11:34 PM
Thx, good elements here. So, if I understand right, this layout helps to manage seams transitions. I was thinking about quake3 textures where the UVs are layed out really well (but no high seams problem, even though IDsoftware has one of the best ever texture painter). Here is attached my layout I am wondering if I should do Paul David fashion's.

Thanks :thumbsup:

EricChadwick
08-26-2004, 11:55 PM
SouL's layout also makes the most use out of his texture space... there's very little wasted. Thus the pixels on the model will all be smaller.

But distortion would be one reason to avoid it, if you have a model without straight/even limbs.

StickFigure
08-27-2004, 12:12 AM
The UV layout looks pretty good, but there is some wasted around the edges. I don't think you have enough texture resolution in the face though, I would move and scale things around to get more pixels in that area. It is probably going to be worth it scale down the uv's of the neck quite a bit, and then scale out the uv's in the face area. It may cause a bit of stretching on the neck, but well worth the trade off. I would also attach the hair to the forehead and sew the uv's, that will help you avoid a big seam on the top of his head.

MRAY
08-27-2004, 05:04 AM
Hey robinb can you go into a little more detail about the photoshop offset method maybe a little mini tut if you dont mind :)

So when trying to straighten out your UV's (making them more rectangle like) i should expect
that their will be some distortion in the map correct?


THanks!
-Mray-

robinb
08-27-2004, 11:08 AM
I'll go into the offset thing a bit more later. Bit busy at the moment.

But yes you're right that there will be some distortion. The trick is to spread the distortion over as large an area as possible so each quad is only distorted a bit. It works fairly well for the cloth example on the other thread as organic things like cloth don't mind being distorted too much, but seams are hard to get rid of. I wouldn't do it for mechanical bits though as the distortion is much more noticeable. Mechanics usually have visible seams so it doesn't matter too much.

-=InQ=-
08-27-2004, 02:32 PM
He makes his layout like this, be cause it's not one texture. It's really 4 textures. Consoles have a small amount of texture memory and can't use large textures, so you have to make several small textures instead of one large. Absolutely obvious, that's it's not the most rational way.

the_podman
08-27-2004, 03:07 PM
I've had this problem(bad seems) mostly cause I'm a newbie, however, there is one very quick solution. DEEP PAINT 3D will allow you to fix seems very easily. It's pretty much all that app is good for so it's probably not worth spending the money on it. We have that app at school so I use it to hide the seams on my crappy UVs.. lol

-pod

EricChadwick
08-27-2004, 03:18 PM
The offset trick is to help you tile a texture. It's covered well in this tutorial...
http://www.twisted-strand.com/ut_tutorials/text_tut/index.html

I prefer to use some freebie plugins instead of Offset. Half Wrap, Left Right Wrap, and Top Bottom Wrap do the same thing as Offset, but I don't have to type in numbers. They're one-button-press, instead of typing. You can get them here...
http://www.btinternet.com/~cateran/simple/
LR Wrap and TB Wrap are in the "Few Extra" link.

Nicool
08-28-2004, 02:33 PM
Thanks all for explainations. I was right to ask it. So here my "final" layou from your advises. I've decided to leave the top hair alone since the transition will be black/black.

EricChadwick : about the offset, on a painted texture, their is no use working on sees? A simple UV checker do the trick? But yeah, for repeating env. texture, good offset tools! (even though I liked the photoshop bundled one yet) :thumbsup:

NileshXYZ
08-28-2004, 08:28 PM
"Body Paint" is good too for UV direct painting. it has a few good UV tools as well! it can import just about all formats and also export and other formats as well. LW to MAX, MAX to LW etc..

they also have videos tutorials to get you started.

EricChadwick
08-30-2004, 04:33 AM
I agree with NileshXYZ, 3D paint is an excellent way to fix seams.

The offset filter really only helps fix seams when you're using a rectangular UV layout like SouL's character does.

florian
08-31-2004, 06:25 PM
nice thread so far :thumbsup:

Except using as much as space as possible of the texture and killing seems problems, there's another reason working like this.
It's good to standardize all characters UV of the game. Because this way, you can easiely give someones jacket to anotherone. This way they created hundreds of more or less different people in MaxPayne2 for example.
In the way your example map is flattened you can map nearly every human character.

Just wanted to point this nice fact out because it was yet not mentioned.

capone_adam
09-03-2004, 12:20 AM
Is it possible to see soul's wireframe model of the character using that texture to see how it was built differently?, curious to see that.

I am doing my 2nd unwrap job and still suffering, not too sure about this checker texture map...the other example in this thread had numbers on it...is this so you can see every poly is the right way round?, sounds good, where can you get this map?

Lastly...seriously...I have spent about 10 hours unwrapping this, I think my biggest problem is worrying too much about straight lines. I keep making lines straight...for some parts it works well and for others if messes it up and causes stretches. I have flaffed around so much by selecting a dodgy face, detatching and welding it up in the right place etc...poly by poly for alot of it. I am really not sure about my method it involves adding a symetry and unwrap uvw mod to stack and selecting an area of faces and doing a planar map...then I straighten it out and then move vertices around until it looks right...does this sound a ok method?

http://www.caponeart.com/delete_test64.jpg

the_podman
09-03-2004, 01:41 AM
I know how you feel. Unwrapping UVs is still somewhat of a mystery to me. I ended up exporting my mesh as an .obj and loading it up into DeepUV from Right Hemisphere. For some reason, I found it much easier to do it with their app. I'm still a newbie, so I probably don't have to do it this way, but, I thought I'd pass it along.:shrug:

-pod

My Maya thang (http://www.cgtalk.com/showthread.php?t=164776&goto=newpost)

capone_adam
09-03-2004, 10:24 AM
thanks, but I specifically trying to avoid using pluggins so that I force myself to learn how to do things the 'proper' way (which is usually the longest and most difficult way) just incase I end up with a company who do not use that specific pluggin.

This is the right approach isn't it everyone?...or am I giving myself a needless disadvantage?

robinb
09-03-2004, 11:37 AM
Sounds like the right approach to me. But you're probably right that you're worrying too much about straight lines. It's only really the border edges that benefit from being straight and horizontal or vertical, and as pointed out earlier, not all of a model (particularly a rounded one like that) can be unwrapped like that without some distortion. Spherical things are the worst- there's just no way to get rid of at least one pole.

Some people prefer a numbered image for testing, but I just use a checker just like that one. Having numbers on it does help if you have difficulty working out what is what on the layout. That's really more of a problem if you've used auto unwrap as who knows what faces will end up where. It can also help if you hand the model off to someone else for the texturing as they won't necessarily be able to work out what's what if they haven't unwrapped it themselves.

Looks like you've got a bit more arranging to do to make efficient use of the texture space. Remember that not everything necessarily needs to have the same amount of texture space allocated to it. Although in your case there aren't many obvious seams on the model to hide those sorts of transitions. If I've got a dark bit of a model, or it's a plain colour, or an area that's less important or rarely seen, I'll often scale it right down and save the space for something more important (like the face usually). You can sometimes make much better use of the texture space by scaling an area a little in one direction more than another. Not too much or the stretching will be noticeable.

Poopinmymouth
09-03-2004, 11:29 PM
laying things out in a geometric fashion has tons of benefits.

1) its much easier to arrange. the squarish shapes can be butted up against each other much easier, and that allows you to make everything larger to fill up the whole UV area, giving higher pixel density to each part. Think of it like tanagrams.

2) making anything straight becomes a sinch, seams, zippers, pockets, plaid, stripes, zig-zags. you can use the fact that pixels are square, to your advantage. Rather than having to weave a seam (as in fabric seams, not UV seams) all over the place to match your organic uvs, this way you can use a line tool or marquee selection to help you layout linear items.

3) reuse. much like was mentioned, you can use the same texture on other assets, even much later on new projects.


If you are interested in learning this method, I have a two part video tutorial and this is the same way I lay out my uvs.

example:
http://www.poopinmymouth.com/3d/sarah.jpg

tutorial links:
http://www.fileplanet.com/dl.aspx?/planetquake/polycount/tutorials/video/uvone.zip
http://www.fileplanet.com/dl.aspx?/planetquake/polycount/tutorials/video/uvtwo.zip

you need a fileplanet account (free) to download

Ashe Tie'skar
09-03-2004, 11:43 PM
So, can someone explain how you offset the stretching and stuff? I would love to use straight lines/square UVMaps, but how do i offset the stretching. It doesn't look to me like Poopinmymouths texturemap does anything to offset it, and neither does the first persons texture map. So is the answer, nothing?

Poopinmymouth. I watched all of your videos, they were WONDERFUL. They helped me so much (but I won't let anyone that see my terrible graphics know that) :P Last time I checked I didn't see anymore texture videos :( I wanted to watch the rest of it. The end product was awesome looking.

Later,

Poopinmymouth
09-03-2004, 11:47 PM
unless you map every single triangle on its own chunk, you will have stretching, its a fact. even with the best uv unwrap there is loads of stretching. they key is to put your seams in the right place, and unwrap so that the stretching is either negligable or works with the texture map (hair is easy to do this with)

that said, its better (for me personally) to introduce some stretching on purpose, and get all the benefits from a square uv layout. as you can see on the gta character, the stretching is not noticable, so it doesnt really matter.

Ashe Tie'skar
09-04-2004, 03:50 AM
Poopinmymouth, do you mind putting up a texturemap of gta with the wires overlayed?

Poopinmymouth
09-04-2004, 07:50 AM
your wish, is my command. well not really. ever try to command me and ill cut out your throat with a snuffelufagus

http://www.poopinmymouth.com/wip/uvexample.jpg

capone_adam
09-04-2004, 11:55 AM
Thanks poop, downloading your videos...

please if its not too mcuh trouble could you show us a wireframe of the character geometry?

I looked at your map, I'm quite a newbie but personally if that was my map I would straighten many of the lines...such as the verticle ones I have highlighted. Someone above said that these don't matter but what I need to know is this...did you leave those lines like that because a) it suited the geometry and straight lines would distort the outcome or b) You couldn't be bothered making em straight because it would have no great effect.

http://www.caponeart.com/delete_test66.jpg

thanks:D

Nicool
09-04-2004, 01:13 PM
Poopinmymouth : Thx for explainations... Looking at your tips and your layout, I believe I did it right (look at the attached document up to this page - german soldier). Is that true?

Poopinmymouth
09-04-2004, 06:18 PM
because of how low poly this model was (the gta character) some of the edges were moved aroudn to give the best silhouette (in the geometry, not the uvs) so it created less stretching leaving those lines jagged like they are. If you notice, the edges still line up with each other along the seam, so that if i grab a marquee selection along the top edge, duplicate it, and flip it, line it up with the bottom edge, the texture matches perfectly. however there was no benefit to straightening in the middel, and it would have introduced more stretching, probably noticable stretching.

nicool, yeah that unwrap looks good

CGTalk Moderation
01-19-2006, 01:00 AM
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.