PDA

View Full Version : As it turns out, we all suck at unwrapping?


Super Happy Cow
02-07-2011, 10:12 PM
After someone told me that my unwraps suck, and I should stick my face in a massive blender(lie). It made me sad. : [

Since then, I made several training montages tuned to 80s rock that depicted my journey unwrapping meshes over a period of 5 years(lie). After all that sweat and blood, still I use only 80 percent of my UV space while 20 remains for buffer space and edge padding(mostly true).

Ready to fall asleep on subway tracks(lie), I decided to first check the efficiency of models that people have created for games. Turns out, the average usage of UV space actually is 25 percent, with the best I've seen (on a complex unwrap comprised of 5 characters) 16.5 percent vacant space.

So, optimizing meshes for MAXIMUM UV space U-U-USAGE. Is it worth it? How much time would you spend on unwrapping a current day character or complex item? with numerous UV islands of different sizes and shapes.

What are some of the most efficient UV unwraps you've made? And I'm not talking about on a series of crates. I mean on complex items and characters that contain both organic and hard edged shapes. What's your average?

And if you're not using a program that can check UV efficiency, do this:

Export UVs to photoshop, magic wand, select empty space with contiguous option selected, ctrl+shift+m, select all, ctrl+shift+m. Divide the huge "Area" number by the slightly less huge "Area" number.

malcolm
02-07-2011, 10:33 PM
What does ctrl+shift+m do? I tried it and it doesn't do anything?

pior
02-07-2011, 10:44 PM
Surface is mostly irrelevant. You want to make sure that things are lining up nicely, that whatever points up on the model points up on the unwrap, and so on. I personally cannot stand the 'surface-anal' kind of unwraps, with chunks at an angle just to save space, causing straight lines to be at an angle thus downscaling badly...

Super Happy Cow
02-07-2011, 10:46 PM
Technically it doesn't matter, but for texturing/weathering, the brain works 100x faster if things point the right way. Would you airbrush a scale model upside down ?

It is also good practice in a studio environment, since the person unwrapping the mesh is not necessarily the one texturing it.

[shiiiiiiiiiiiiiiiiiit sorry I clicked edit instead of reply!! Im such a dumbass. My bad, SHC!! Feel free to edit back!!!]

equil
02-08-2011, 12:50 AM
on the other hand you don't want the uv islands to be too close to each other either, as some padding helps prevent mipmap bleeding.

D4V1DC
02-08-2011, 12:56 AM
The above post is so true, also how do they do those box unwraps??? Where everything is so neat? Pm me the answer if you don't want the secret revealed.

renderhjs
02-08-2011, 01:04 AM
I think some good planning on how to go about the UV unwrapping, putting objects into 1 map etc. is always a good thing todo. With better planning it usually turns out easier to place things nice and tight and perhaps even readable (if you texture in 2d instead of projected 3d).
Having a system helped me often to just unwrap faster and cleaner, like long pieces always orient in the same direction, or biggest related pieces always are put into the corners first,...

Quite a few people are not really interested in UV mapping and as a result all they ever get into is some pelt mapping but thats it. Cumpsy placement, rotated shells (no pixel alignment), no aligned UV edges and heaps of wasted UV space (35%+). I guess part of that reason are the horrible build in tools that Max or Maya have and they are often not as efficient to use as lets say their modeling tools.

I experienced myself what a huge difference more time spend on efficient UV's can make: you can often get way more texture space used and better aligned texels resulting into a more crispy and clean looking texture on the model.

Justin Meisse
02-08-2011, 07:03 AM
were you looking at characters that use a customization system? Lots of times they have janky UVs because all their components bake down to one texture.

thomasp
02-08-2011, 09:52 AM
those optimized pelts can be tricky to paint on. also, when content ends up being too optimized it can make it difficult to reuse bits elsewhere.

i'd just make sure that the layout can be painted on nicely and that it won't cause obvious seams in normal maps.

then preferably create your textures at 4 times the target resolution and rebake to a final UV layout and scale down as you see fit later down the road - but keep the inbetween steps if the asset is likely to get reworked (characters often do...).

EarthQuake
02-08-2011, 11:23 AM
Surface is mostly irrelevant. You want to make sure that things are lining up nicely, that whatever points up on the model points up on the unwrap, and so on. I personally cannot stand the 'surface-anal' kind of unwraps, with chunks at an angle just to save space, causing straight lines to be at an angle thus downscaling badly...

This is very important, to represent a straight line on a straight unwrap, you need 1 row of pixels, to do it on a 45* unwrap you need 2 rows, anti-aliased. People go nuts and pack their maps all crazy thinking that they are being super efficient, but end up with much worse unwraps technically(for mipping) and detail wise(rotating randomly).

In addition to that, it always drives me nuts when people are super anal about welding 1 side of a cylinder cap onto the side unwrap, which makes it:
A. harder to pack
B. harder to use technically, as now you can add a hard edge on that cap without getting artifacts on your bake.

And for what purpose, so 1 edge of your cylinder doesn't have a seam? Its retarded.

In general the things I try to focus on are:

A. Straight unwraps, wobly edges result in less detail, clamp those edges up after unwrap/relax! Especially bad are people who leave cylindrical unwraps as like, banana shapes instead of clamping it down into a nice rectangle, this wastes soooo much uv space.

B. Making sure uv islands that are close in 3d space, are also close in UV space. I often unwrap bit-by-bit with complex meshes, giving my a bunch of "unwrap groups" and then I try to pack those all together keeping them near their buddies as much as possible. To me this is more important than if a piece is 90, 180 degrees, etc. I try not to put things upside down, but i'm not too anal about it, most important thing is that it simply makes sense. I'm talking hard surface mechanical stuff here which is more abstract than character uvs however.

C. Making sure technical issues are well planed;
1. Leaving plenty of room for padding/mipping
2. Making sure I have a uv seam anywhere I would like to use a hard edge, this generally is going to be where you naturally want a seam, but its worth putting some good thought into.

D. Make sure detail priority is given to areas that will be seen close up, for weapons this is the entire backside/fpv area, iron-sights, etc. Usually get 125-150% more detail on these areas.

Oh yeah, and last of all. Model your low with a solid plan for uvs! By the time i'm done with my low i know exactly how I will unwrap, where my seams need to be and where my problem areas are. Always consider uvs while modeling your low(and even you high to an extent).

sprunghunt
02-08-2011, 01:51 PM
I've found that in general you save way more UV space by repeating elements or mirroring UVs where you can than from any kind of packing improvements.

Like EarthQuake said it's very important to plan your lowpoly, and your highpoly since that's what your lowpoly is based off, to be efficient with regards to repeating UVs and hiding seams.

mortalhuman
02-08-2011, 02:16 PM
This is [probably] my weakest point in modeling applications. I like roadkill a lot (when its use is warranted) just because while it's based on blender it's still nice to have those functions abstracted to a simple app away from the rest of the tools, in any app, it's nice roadkill is a few hotkeys and two simple windows, but you still have to pack the results.

I'm one of those people who tends to pack it all as much as I can, rotating indiscriminately, but already there are some points made here that make me want to be more persistent about readability and intuitive placement.

Watching this thread, and it would awesome to see past threads linked with do-not-miss info in them covering unwrapping if anyone sees this thread and has spoken about this in the past. As we all know, I'm all about the forum reading :x

r_fletch_r
02-08-2011, 02:44 PM
How do you guys find projection painting has changed things in UV Layout.. if at all

moof
02-08-2011, 03:40 PM
How do you guys find projection painting has changed things in UV Layout.. if at all

makes things easier, not a lot difference in how I lay things out.
Like what has been mentioned multiple times here, keeping things pointing the proper direction, squared off etc...

Projection painting just makes it easier to not worry about distortions from what I've found.

D4V1DC
02-08-2011, 03:42 PM
Projection painting is the greatest thing for me but It isn't 100%. Painting across seams is where It gets funky for me in Body Paint 3D r12 at least but I will take what I can get.

I will have to dab into Zbrush to find out how well It works as I haven't gotten around to It in that way since I knew how to use body paint first, always good to learn new things. [Any assistance on that is welcome, i.e. paid/free video tuts.]

I feel projection painting fits in with this issue of Uv's because that's the point of uv's to get a good/great texture map done. Good question Fletch.

sltrOlsson
02-09-2011, 08:51 AM
Tools i use


Castor Lee's UV tools plugin for maya. (http://www.castorlee.com/maya-tools/auto-uv-mapper) - It got some nice features like straighten UV-shell..
Roadkill - For quick unwraps and quick packing.
Rotate function is PS cs5 - If some stuff needs to be rotated 90 degrees it's awesome to rotate it back in PS. Just hold "R" and left like (i think). Hold R+Shift to rotate 90 degrees..

What i do

I got my UV fully UN wrapped and my saggy packing. I pack it tighter together and try to fit it into a 1:1/1:2/1:4 ratio. Then i count the negative space in my editor window. The grid is set to 10*10. If i have 7 squares that's not "filled" i scale my UV with 1.07 and start packing again.

And as EQ said, keep everything nice and straight. The only time i don't stick to that is with most organic models that's gonna be baked and shit..

I've done this since i made my revolver a year or two back. This UV map is far from perfect, and it was possible to fit everything course it had many small islands. But some stuff is a bit to spread. Like the hammer, spread over half the texture.. And some shells are slightly rotated. Mostly stuff that got mainly rounded shapes.. As i said, in no way perfect..

Just try to look at it as a jigsaw puzzel :)

Render of the gun (http://fc09.deviantart.net/fs70/o/2010/249/3/e/3e16af52662464099e0fe8a1ccb26535.jpg)

http://i53.tinypic.com/w2lovs.jpg

EarthQuake
02-09-2011, 09:25 AM
^^^^ Packed way too tight, a good example of being too anal and paying attention to "stats" when this sort of unwrap is just going to cause problems ingame. I try to keep min of 4-8 pixels inbetween islands at 1024-2048,

ZacD
02-09-2011, 09:31 AM
ahh bleeding and Mipmap beware!

Stradigos
02-09-2011, 09:31 AM
Does Castor Lee's plugin work with 2010? I love how he just skips over it =P Love that Roadkill program. It's a bit buggy for me sometimes, but it's really helpful. Crazybump is to texturing what Roadkill is to unwrapping. At least that's how I feel about it.

sltrOlsson
02-09-2011, 09:52 AM
^^^^ Packed way too tight, a good example of being too anal and paying attention to "stats" when this sort of unwrap is just going to cause problems ingame. I try to keep min of 4-8 pixels inbetween islands at 1024-2048,

ahh bleeding and Mipmap beware!

I haven't had any mipmap problems what so ever on the model. (http://fc09.deviantart.net/fs70/o/2010/249/3/e/3e16af52662464099e0fe8a1ccb26535.jpg) Then, this it's a 2k map. And i guess i'm a pretty anal person, mmmh, when it comes to UV-mapping.

Though i think it's a pretty good workflow counting percent of you negative space, if you want it to be tight that is.

But if i were to do it today, i would absolutely keep a higher border size..

Does Castor Lee's plugin work with 2010? I love how he just skips over it =P Love that Roadkill program. It's a bit buggy for me sometimes, but it's really helpful. Crazybump is to texturing what Roadkill is to unwrapping. At least that's how I feel about it.

I didn't realize he didn't have support for 2010 x64, so i just toke the downloader and instlled it. Witch works, then i talked to him and i gave him my settings or what ever, and now he have updated the support for 2010 x64.

EarthQuake
02-09-2011, 09:56 AM
I haven't had any mipmap problems what so ever on the model. (http://fc09.deviantart.net/fs70/o/2010/249/3/e/3e16af52662464099e0fe8a1ccb26535.jpg) Then, this it's a 2k map. And i guess i'm a pretty anal person, mmmh, when it comes to UV-mapping.


Of course you don't see any problems viewing the asset 4x bigger than you would ever see it ingame, in a 3d app. The problem is mip mapping, when that 2048 sizes down to 1024, 512, 256, 128, your edges will bleed over and you'll get nasty seams. If we viewed everything super close up with mip mapping turned off, it would never be a problem. =)

Mark Dygert
02-09-2011, 10:04 AM
You definitely need more padding between those pieces in most cases...

You're very lucky that most of the model is black and the pieces boarder next to other black pieces, so if it was to mip or you where forced to down res (something that is very common on projects) you're not going to notice. Black hides problems extremely well in just about everything you do.

If you where to try that same approach on something with varied colors and materials you would more than likely run into problems with seams, down resing and mip mapping.

dtschultz
02-09-2011, 10:15 AM
A. Straight unwraps, wobly edges result in less detail, clamp those edges up after unwrap/relax! Especially bad are people who leave cylindrical unwraps as like, banana shapes instead of clamping it down into a nice rectangle, this wastes soooo much uv space.




Ha. This is a good thread. So, I get what you were saying earlier about not putting things at an angle that should be straight. I have found this out the hard way for sure.

As the quote above: Are you saying that you should clamp the edges on organic shapes? Or is this just for meshes with regular shapes or lines like a cylinder?

sltrOlsson
02-09-2011, 10:20 AM
Haha, you guys makes me feel the need of proving (http://i56.tinypic.com/vyo2o3.jpg) that i'm not a retarded nazi UV-mapper :D

And that gun was from start to finish thought to act as an first person weapon, no more, no less. But ofc, it's a show piece so it were never used..

EarthQuake
02-09-2011, 10:34 AM
And that gun was from start to finish thought to act as an first person weapon, no more, no less. But ofc, it's a show piece so it were never used..

FPV weapons mip too, and especially at the acute angles they are viewed at, mipping is a serious problem, you cant assume everyone will run the game with 8x anisotropic filtering! Also, most games have texture quality settings, so if someone is playing your game at "low" or "medium" you will have issues as well. I do weapon models more than anything, and the same rules apply.

But i'll stop harping on you, I'm sure you get it, I just didn't want anyone to be confused and think FPV = no need to worry about mipping.

sltrOlsson
02-09-2011, 11:00 AM
FPV weapons mip too, and especially at the acute angles they are viewed at, mipping is a serious problem, you cant assume everyone will run the game with 8x anisotropic filtering! Also, most games have texture quality settings, so if someone is playing your game at "low" or "medium" you will have issues as well. I do weapon models more than anything, and the same rules apply.

But i'll stop harping on you, I'm sure you get it, I just didn't want anyone to be confused and think FPV = no need to worry about mipping.

Yeah, that's true. The filtering of the render is a bit crazy actually, like 16 or something. And ofc, would be bad if someone saw that as a good way to UV stack. Bad choice for the illustrative purpose!

Stradigos
02-09-2011, 11:15 AM
I didn't realize he didn't have support for 2010 x64, so i just toke the downloader and instlled it. Witch works, then i talked to him and i gave him my settings or what ever, and now he have updated the support for 2010 x64.

Thanks for looking into that, I appreciate it. :)

Mark Dygert
02-09-2011, 11:33 AM
As the quote above: Are you saying that you should clamp the edges on organic shapes? Or is this just for meshes with regular shapes or lines like a cylinder?I don't mean to speak for EQ but it looks like this might go unanswered so I'll take a stab.

If it was something like a belt that curved around a big belly I would probably separate it and straighten it out, so long as the straightening didn't significantly impact the texture by stretching it, ie wonky belt loop holes or something.

If it was the digits in a hand probably not going to waste my time straightening edges.

If its a long pipe that curves through the scene it probably won't relax to straight edges, but it will be fine to square it off to straight edges. Or if it was a spline, leave it squared.

Long post short if (like others already pointed out) the curved line is going to have some thin pixel details that would benefit from straitening vs being aliased or if it would pack better being squared off, then its probably a good idea to straighten them.

malcolm
02-09-2011, 11:46 AM
On the topic of padding your uv shells 8 pixels apart. The way I do this is after my unwrap is complete I apply a texture with checker pattern that is 1 pixel squares and then turn off bilinear filtering in the uv editor and then move the shells 8 pixels apart from each other. You could also turn on pixel snapping to help as well. Anyone got a better workflow for this, I'm in Maya.

EarthQuake
02-09-2011, 11:59 AM
I don't mean to speak for EQ but it looks like this might go unanswered so I'll take a stab.

If it was something like a belt that curved around a big belly I would probably separate it and straighten it out, so long as the straightening didn't significantly impact the texture by stretching it, ie wonky belt loop holes or something.

If it was the digits in a hand probably not going to waste my time straightening edges.

If its a long pipe that curves through the scene it probably won't relax to straight edges, but it will be fine to square it off to straight edges. Or if it was a spline, leave it squared.

Long post short if (like others already pointed out) the curved line is going to have some thin pixel details that would benefit from straitening vs being aliased or if it would pack better being squared off, then its probably a good idea to straighten them.

Yeah pretty much, i'm not one of these guys who obsessively straightens every line, but stuff like this:
http://dl.dropbox.com/u/499159/bentuv.jpg

You can see how much more space the top layout uses up, with just the default unwrap+relax. As Mark says, pipes and stuff that curve a lot are good to relax out and straighten up, otherwise they take up a huge amount of space. More of a taper in the mesh and the results exaggerate as well.

Mark Dygert
02-09-2011, 12:01 PM
I mostly eyeball it, if I really need to be anal about the padding I have a single pixel pattern I apply and use that. In max the procedural checker pattern doesn't allow pixel snapping, only actual bitmap images with pixels will pixel snap, which is annoying.

sprunghunt
02-09-2011, 12:06 PM
If you're using max you can set your grid size to be 0.0623 in the UVW unwrap preferences. This gives you a 16x16 grid which can be helpful for this kind of thing.

dtschultz
02-09-2011, 12:49 PM
Yeah pretty much, i'm not one of these guys who obsessively straightens every line, but stuff like this:
http://dl.dropbox.com/u/499159/bentuv.jpg

You can see how much more space the top layout uses up, with just the default unwrap+relax. As Mark says, pipes and stuff that curve a lot are good to relax out and straighten up, otherwise they take up a huge amount of space. More of a taper in the mesh and the results exaggerate as well.

Cool. That's what I thought you were saying. I guess it's better to deal with a little distortion than to deal with the wasted uv space. I knew that was definitely true with tiling textures, but I wasn't sure if that would be true for something that had a unique unwrap. Thanks, EarthQuake and Mark.

r_fletch_r
02-09-2011, 01:47 PM
uvlayout has a nice feature for fixing this. you tag the edges as straight lines and it keeps track of them and makes sure they relax into straight lines. you can even tag edges to relax onto the verticle or horizontal axis. that and the packing lets you specify pixel bleed distance.

Super Happy Cow
02-09-2011, 05:53 PM
What's the issue with keeping everything close together and facing up in the unwrap that's doing likewise in real space? I've never had issues with such things.

FPV weapons mip too, and especially at the acute angles they are viewed at, mipping is a serious problem, you cant assume everyone will run the game with 8x anisotropic filtering! Also, most games have texture quality settings, so if someone is playing your game at "low" or "medium" you will have issues as well. I do weapon models more than anything, and the same rules apply.

But i'll stop harping on you, I'm sure you get it, I just didn't want anyone to be confused and think FPV = no need to worry about mipping.

I realized this the other day when working on that handcannon I did. It was mipping super bad and my initial reaction was "Well, fuck a duck." But, everything is lined up pretty well., and packed with decent space for a 2048.
http://img694.imageshack.us/img694/9787/0weaponalbatrossviewalb.jpg

Don't judge my unwrapping skills!! A large reason for the big empty areas is because I deleted 3 sets of "elements" that were eating up tons of polygons.

Devoid
02-09-2011, 08:10 PM
Gonna jump on the bandwagon and suggest leaving more padding than the examples I'm seeing here. In game, especially with terrible texture compression on console, these are going to mip out and cause bad artifacting. Really bad errors occur when you get mipping on normal maps that haven't left enough padding- especially when people leave their backgrounds black (see people do that all the time for some reason).

pior
02-09-2011, 09:22 PM
Hehe yeah, the two weapon UVs posted so far are both pretty terrible :)

All thin, long rectangles should be grouped together in a square corner of the UV space, and also rows of rings should be straight, not bent. It helps for later selections and painting.

Also, both these UVs reveal density problems in the corresponding meshes. If the object has a nice, unified density then the UV should have the same qualities.

ZacD
02-09-2011, 09:36 PM
http://dl.dropbox.com/u/499159/bentuv.jpg

on stuff like this I always thought it'd be better to straighten out the vertical lines as well, the more slanted // pieces are going to be distorted already, and pixels look better if they line up with the edges.

pior
02-09-2011, 11:35 PM
Yup!

Stradigos
02-10-2011, 05:56 AM
especially when people leave their backgrounds black (see people do that all the time for some reason).


I've always done that, never even thought about switching. What color do you use then? Do you average out the colors in the texture or something?

[HP]
02-10-2011, 06:03 AM
I've always done that, never even thought about switching. What color do you use then? Do you average out the colors in the texture or something?

Yes, imo the most predominant colors of your texture, should be the background. (Slightly desaturated tho) that's what I do at least.

r_fletch_r
02-10-2011, 06:09 AM
;1286226']Yes, imo the most predominant colors of your texture, should be the background. (Slightly desaturated tho) that's what I do at least.
Better to bleed your diffuse islands out into the empty space. much like max does when you set the bleed to 64 when baking. It looks like a streaky mess but it mips much better.

Mark Dygert
02-10-2011, 06:28 AM
Yea with proper padding it "shouldn't" matter what the background color is, but I normally play it safe and go with something that is the average color, or I take time to mask out the shells (simple photoshop script after texporting UV's with simple colors) and paint similar colors around their edges.

I also remember someone mentioning a trick to get edge padding by using Render To Texture with the padding cranked. I don't remember if that works on the diffuse or not... Might be a simple way to get quick padding.

Bal
02-10-2011, 06:33 AM
Yeah I have a photoshop script that bleeds each UV shell the most possible, filling all the empty space.
Good discussion here, I used to be pretty silly about packing, rotating stuff whichever which way. Now I try and be alot more careful, and keep good spacing, but I'm still pretty crazy about aligning stuff, like that cylinder EQ showed, I'd also align the vertical lines.

[HP]
02-10-2011, 06:37 AM
You guys mind sharing the script with us?

r_fletch_r
02-10-2011, 06:37 AM
I believe XNormal has a plugin to do the bleed for you. havent used it myself.

Bal
02-10-2011, 06:46 AM
It's fairly simple :
I just always have a layer in my PSD, with the UV Shells filled in white, no padding (I set the layer to multiply to make sure it never changes anything if made visible by someone else). I always name it the same (UV Shells), my script ctrl-clicks it (grab selection) ctrl-shift-c (copies the whole selection area, merged) paste into new layer, then run xNormal's photoshop dilate script a few times (I think it does 64pix max, so I do it twice just in case, kinda hacky but it's not too long). Then that's what I save as TGA or DDS.

I only do it when I'm nearing the end of my work on a texture usually, as it's a couple seconds longer than my regular save. You also need to make sure that you're still baking your maps with a few pixels of padding of course, to make sure the UV shell selection doesn't grab any of the background color.

sltrOlsson
02-10-2011, 06:51 AM
If you have you shells all masked out, so that the background is 100% transparent use gaussian blur to bleed. Just make a copy of your layers, merge it, blur it, duplicate that and merge with the first one. Repeat 10-15 times. Easy to set up a action for that to..

I do this mostly with leafs and stuff like that, but wouldn't be a problem with any diffuse? What do you say.

[EDIT]


It's fairly simple :
I just always have a layer in my PSD, with the UV Shells filled in white, no padding (I set the layer to multiply to make sure it never changes anything if made visible by someone else). I always name it the same (UV Shells), my script ctrl-clicks it (grab selection) ctrl-shift-c (copies the whole selection area, merged) paste into new layer, then run xNormal's photoshop dilate script a few times (I think it does 64pix max, so I do it twice just in case, kinda hacky but it's not too long). Then that's what I save as TGA or DDS.

I only do it when I'm nearing the end of my work on a texture usually, as it's a couple seconds longer than my regular save. You also need to make sure that you're still baking your maps with a few pixels of padding of course, to make sure the UV shell selection doesn't grab any of the background color.

Haven't seen that one before. Really nice feature. Works great..

Bal
02-10-2011, 06:54 AM
sltrOlsson, probably faster to use the xNormal script, and more precise, as the blurring isn't taking into account your UV angles, but yeah in most cases it should end up fairly similar.

sltrOlsson
02-10-2011, 06:57 AM
Yeah, pretty much the same. But quicker!

http://i53.tinypic.com/ra1401.jpg

Mark Dygert
02-10-2011, 07:20 AM
;1286243']You guys mind sharing the script with us?
With the Render UV template create a .tga (so its not compressed) with the setting set to this:
http://www.vigville.com/forum_images/RenderUVTemplate.jpg
Fill: Green 255
Edges and Seam Edges: Red 255, Blue 255

Note if you go Unwrap Window Menu > Options > Save settings as default, you only need to change these settings once.


Then run this photoshop action on your tga file and it will separate your, wire and shells to different layers.
http://www.vigville.com/forum_images/UVs.atn

It was a simple recorded action that anyone can recreate however they like, if you don't like the way the layer folders are structured delete those parts and record your own. All its doing is making selections based on colors.

Also I think TexTools has some pretty handy features for this kind of stuff too. There is a wires to paths script floating around the intertubes too. Also there are a few scripts that assign different materials and ID's then you can render to texture those colors and use them as masks, such as mark your metal bits with mat ID 2 and your wood bits with mat ID 3, ect that way you have UV shell masks for each thing.

dtschultz
02-10-2011, 07:53 AM
As the kids say, this thread is full of win! Thanks for sharing this stuff.

MightyPea
02-10-2011, 09:50 AM
Instead of the white layer Bal uses, I just use a mask of all my uv-islands I've got on my Wires folder:
http://dl.dropbox.com/u/17715/layers.png

I Copy Merged (ctrl-shift-c? Not sure, it's become such a habit I don't think about it anymore), paste onto a new layer, use the Xnormal Dilate Filter and mask that layer so that only the dilated are shown and all layers underneath still come through.

[HP]
02-10-2011, 09:55 AM
Cheers Mark! Thanks a bunch!

EarthQuake
02-10-2011, 10:02 AM
on stuff like this I always thought it'd be better to straighten out the vertical lines as well, the more slanted // pieces are going to be distorted already, and pixels look better if they line up with the edges.

It depends on what sort of detail the high has, generally. I prefer not to get super excessive to the point where i'm clamping down every edge regardless of distortion. Most shapes like this you'll be concerned with detail running horizontally instead of vertically, so its just not a big deal.

http://dl.dropbox.com/u/499159/uvtest2.jpg

I generally do the middle layout here for a shape like this, sure the bottom one would be fine here as well, but really isn't going to make much of a different(maybe seam correction is easier). And will introduce more distortion, I try to avoid going nuts with the edge clamping, if the shape had even more variation serious stretching would occur.

Combining the first two tests, we see the top layout has the least distortion, but is the worst to work with. The middle one has a very small amount of distortion, and is a perfectly acceptable layout to work with. The last being the easiest to work with, has by far the most distortion. Depending on the detail level you need to have the distortion will be more or less of an issue, if its a simple, hand painted style you can probably get away with the bottom layout, if its a more detailed realistic texture style you'll want the middle one.

http://dl.dropbox.com/u/499159/uvtest3.jpg

Also, contrary to the ideal that you want straight edges for good bakes, on this bottom layout here we introduce so much distortion and uneven pixel density that your bakes are going to come out very poorly, if you've got any sort of complex geometric detail on out high, so straightening edges should never trump even texal distribution and distortion.


One last image
http://dl.dropbox.com/u/499159/uvtest4.jpg

You look at this image, and you'd think instantly that the bottom layout uses "more" of the uv space, while technically correct, you do not actually get any more "detail" out of this layout, just a whole bunch of distortion up at top. For all practical purposes, the top result contains the same amount of "detail", and better yet, is all uniform detail.

This is why paying attention to "uv stats" is a bunch of bullshit. UV stats are only good to show a noob he's using 35% of his layout, common sense and good judgment should always win over trying to fill a certain % quota of uv usage.

People seem to be afraid to have any "unused" space on their layouts, even to the extent they will do dumb stuff to try to fill it in. Your asset doesn't look or perform any better if you stretch your uvs all out of whack to fit the square.

bizarr0
02-10-2011, 11:49 AM
So how about a thread of nicely unwrapped models with a render and the wires shown ?
have these come from some of the production artists on here as examples so people can see what really good unwraps are like ?

It would also act as something akin to pimpage and promo
for people and there unrwrapping mojo :P

r_fletch_r
02-10-2011, 11:58 AM
Do the rules blur /shift when you get to lightmaps?
This is something im planning on researching soon as I may have some Unreal work comming up.

Is it a good idea to enlarge certain more detailed Islands to help sharpen their detail, while leaving less detailed islands with less UV area. This sounds good to me but i have heard that uneven density in these maps can cause problems(cant think why, but then i don't know the territory).

EarthQuake
02-10-2011, 12:27 PM
Do the rules blur /shift when you get to lightmaps?
This is something im planning on researching soon as I may have some Unreal work comming up.


Yes they do, there are some funky things you can do with lightmap UVs, there was a thread here a while back that covered snapping your LM uvs to pixels or "quading" them it might have been called. Its not something i've done before but I know Vince(Vahl) did stuff like this for dark sector.


Is it a good idea to enlarge certain more detailed Islands to help sharpen their detail, while leaving less detailed islands with less UV area. This sounds good to me but i have heard that uneven density in these maps can cause problems(cant think why, but then i don't know the territory).

If an area is going to be seen up close, I give it extra space, if an area is going to be mostly occluded/rarely seen, I give it less space, I try to give everything else a consistent amount of space. Things can get messy quickly when you try to start prioritizing based on surface detail.

One thing to remember is that scaling a UV chunk 125% in both U and V means that you're giving that area 50% more pixels than the area next to it, and 150% in U and V = twice as many pixels.

Scaling islands -/+ 5.. maybe 10% to fit, can be fine in most cases.

timwiese
02-10-2011, 12:54 PM
Great Thread! Full of so much useful information!

r_fletch_r
02-10-2011, 12:59 PM
Yes they do, there are some funky things you can do with lightmap UVs, there was a thread here a while back that covered snapping your LM uvs to pixels or "quading" them it might have been called. Its not something i've done before but I know Vince(Vahl) did stuff like this for dark sector.



If an area is going to be seen up close, I give it extra space, if an area is going to be mostly occluded/rarely seen, I give it less space, I try to give everything else a consistent amount of space. Things can get messy quickly when you try to start prioritizing based on surface detail.

One thing to remember is that scaling a UV chunk 125% in both U and V means that you're giving that area 50% more pixels than the area next to it, and 150% in U and V = twice as many pixels.

Scaling islands -/+ 5.. maybe 10% to fit, can be fine in most cases.
Polycount need to start paying you :) thanks man

EarthQuake
02-10-2011, 09:11 PM
Polycount need to start paying you :) thanks man

Yes.

leechdemon
02-11-2011, 01:50 PM
So, someone was mentioning earlier in the thread that being "super anal" about UV efficiency (to the point where straight lines aren't vertical or horizontal, etc) is far less important than other factors such as padding.

Usually when I unwrap, I spend a decent amount of time unwrapping each shell into a shape that makes sense and has seams where I want them, avoiding distortion whenever possible. I throw all the shells into a corner, run a Normalize Script, and Pack UV's to get them all spread out. Then I go back and custom-arrange them into more space-efficient groups (which is where the rotation comes in).

Are we saying that's bad? Should I be done after I pack the UV's, assuming no major issues? Or is a lot of jimmy-rigging usually needed?

Mark Dygert
02-11-2011, 02:26 PM
If you rotate what would normally be a single horizontal/vertical pixel line so it becomes a aliased line? THEN your layout is FUBAR.
http://dl.dropbox.com/u/2336353/RotateUVsBad.jpg



It's going to take more pixels to retain a nice crisp line if its rotated vs being a simple 1px row.
http://dl.dropbox.com/u/2336353/RotateUVsBad2.jpg

leechdemon
02-11-2011, 02:40 PM
Sure, I get that. What I'm asking though, is do you still take the time to meticulously pack them, even if you're keeping all your straight lines nice and neat?

Basically, it was said not to worry about efficiency if it comes at the cost of rotations like the one you mentioned. You still want to be efficient, but without rotations your options are much more limited, so does this mean I'm probably spending too long packing them, as well?

Mark Dygert
02-11-2011, 03:37 PM
For me its not really a hard and fast rule and you're more or less stuck making those calls on a per object, per shell basis. If its going to hurt chances of getting crisp lines then its not worth it. If its going to net you more definition and a better use of space it might be ok.

Gotta remember what the player sees is king. No player is really going to crack your objects open and examine your UV layout but they'll notice a lumpy bumpy line and post screen shots all over the web. "Yea but my UV layout utilized .002% more of the space that way" isn't really a good defense heh =P

You also have to factor in all the time spent being super anal about stacking and packing pieces if that time can't be better spent making the materials or maybe even other objects.

Super Happy Cow
02-11-2011, 08:09 PM
My workflow is generally seams, stack UV spaces, scale all parts by priority, then drag them back onto the space piece by piece. Largest pieces go first, smaller pieces fill gaps. If the entire space isn't used(relatively rare), I scale everything up and try again.

The directions the objects face don't matter at all to me, as long as rectangular shapes are vertical/horizontal and partially circular shapes that can be clamped are. If they are within constant view of the player, I don't clamp them at all, but instead try to fill the gap created with a half circle, or a full circle. I use all my UVs for masking after separating parts of objects with similar materials/texture info.

Hehe yeah, the two weapon UVs posted so far are both pretty terrible :)

All thin, long rectangles should be grouped together in a square corner of the UV space, and also rows of rings should be straight, not bent. It helps for later selections and painting.

Also, both these UVs reveal density problems in the corresponding meshes. If the object has a nice, unified density then the UV should have the same qualities.

My weapon unwrap was pretty tight until I removed some things because of polycount that didn't logically make sense. It's fine, since those gaps are always useful for reworking things if ever necessary.

No cylinders are left rounded, but I should've packed more rect's together, probably.

Though I find it sometimes better to have a mix between square and organic shapes to fill gaps left by the organic shapes with the squares. I don't really see the complete necessity in having clamped edges on everything, especially things that'll be baked, and painted.

Unwrapping is the strangest part of the entire process. : O

pior
02-11-2011, 08:58 PM
Well the gaps dont bother me too much - it's more about the odd organization and the inconsistent polygon density. Like EQ said it, alot of that might come from a model not fully thought out for UVs.

As a matter of fact ... would you mind uploading the mesh ? For some weird reason I feel like unwrapping something haha (also curious to see if the latest versions of Max caught up with Maya on that front ... that'd be a nice way to find out!)

Super Happy Cow
02-11-2011, 09:45 PM
Have at it.

http://www.megaupload.com/?d=D0AQTVUK

Yeah, there was way too much reworking with this one, that's what caused the density disaster, but I still managed to use a huge majority of the space. : D

pior
02-11-2011, 09:48 PM
Very cool! Thanks man!

malcolm
02-12-2011, 01:04 PM
Why don't we have a work shop on uv packing. I'd participate in this and it should only take one day or less to unwrap pretty much anything, so everyone could participate regardless of their schedule. Maybe someone could donate a character and a weapon for diffuse texture packing, and someone could donate a building for lightmap packing. I do a lot of lightmap packing but do next to no modeling or unwrapping these days, could be interesting.

Super Happy Cow
02-13-2011, 07:48 PM
You couuuld start with that weapon I posted up there. I'll surely participate in that case.

EarthQuake
02-13-2011, 10:00 PM
Malcolm, if you want to write up a quick workshop and find some meshes, feel free. Just post it in the workshop forum, #6! Nobody is doing #5 anyway, asshats!

I was actually going to try to find some UV examples on some of my older models, but I find a lot of the stuff I do, I violate the "rules" or guidelines i've talked about here anyway, my more recent stuff is better but its all under NDA, and there is still a lot of lazy stuff I do. =P

However, I tend to do many many testbakes as i'm constructing my low and doing quick uv tests, so potential issues are generally stomped down that way.

malcolm
02-14-2011, 12:11 AM
Ha, yeah I'm still working on workshop #3 hope to finish that one day but I got past all the fun parts into the stuff I already know. Here's my 1st pass at the challenge feel free to discuss if you don't agree with anything in here. I just threw out random resolutions for the character and weapon so perhaps Mop can tell us what they're using on Brink since I feel that game is looking quite nice.

Subject:
Practice your unwrapping/packing skills for diffuse textures and lightmaps. Share your secret techniques, work flows and any custom scripts you use in your respective 3d software to get the job done. Feel free to only participate in the unwrapping of the models you're interested in.

Objectives:
Unwrap and pack diffuse uv's for the supplied character model assuming a 1024x1024 for the body and 1024x1024 for the head.
Unwrap and pack diffuse uv's for the supplied weapon model assuming a 1024x1024 texture will be applied.
Unwrap and pack lightmap uv's for the supplied building model assuming a 256x256 lightmap will be applied.

Submission:
You must show progress and discuss your workflow as you go. When you're finished post a screenshot clearly showing your uv layout and the model with the supplied checkboard texture. If possible screencap or render the model with trilinear filtering turned on.

Extra Credit:
Bake ambient occlusion and directional lighting into each texture to test for padding and lightmap issues.


Rules of thumb for unwrapping diffuse uv's:
Pad your uv shells at least 8 pixels apart from each other
Straighten curved shells where appropriate don't grid everything
Don't rotate straight edge shells diagonally into weird positions to save space
Try to maintain even pixel density across all uv's shells unless the shell is rarely seen.
Don't weld a single side of a cap to it's corresponding shell.

Rules of thumb for unwrapping lightmap uv's:
Overlapping and tiling uv's are not allowed.
Pad your uv shells based on the resolution of the lightmap you're going to apply, smaller maps need more padding
Always cut uv shells where there is a hard normal/smoothing group change in the geometry
Avoid excessive uv seams, don't automatic map/box map everything, soft edges need to be sew together.
Non uniform scaling for packing is okay for lightmap uv's
Straighten curved sheels where appropriate don't grid everything.
Scale down shells that are rarely seen.
Scale up tiny shells that are too small to even register to be included in the baking process.

Brendan
02-14-2011, 01:26 AM
I suck at unwrapping?
I'm drunk, you don't have an excuse.

:(


Are there any tips on how to improve this?
http://i700.photobucket.com/albums/ww5/TBR427/wheel_unwrap.png

Neox
02-14-2011, 02:17 AM
holy crap didn't see this thread has 3 pages sorry :X

FPV weapons mip too, and especially at the acute angles they are viewed at, mipping is a serious problem, you cant assume everyone will run the game with 8x anisotropic filtering! Also, most games have texture quality settings, so if someone is playing your game at "low" or "medium" you will have issues as well. I do weapon models more than anything, and the same rules apply.

But i'll stop harping on you, I'm sure you get it, I just didn't want anyone to be confused and think FPV = no need to worry about mipping.


but to be fair in this specific case the gun is almost entirely black or dark grey so the mipping might not cause as much trouble as it would on an asset with much more color variance - but yeah i agree its always easier and safer to stay with a few pixels padding around the chunks and optimizing the hell out of it isn't really the best option afterall, also for some clients i worked for it was much more crucial to have all assets of the same kind (characters as a type, buildings as a type) within the same pixel ratio, which means that a hell lot of uv space is going to be wasted and only assets with a large surface (like very fat guys with a large hat) will use the uvspace to a usual amount. But this will guarantee that Asset1 and Asset350 will work together in one screen without any noticable differences - well this and the art direction of course.

Marcus Aseth
02-14-2011, 10:24 AM
Hi guys,I have done this:

http://img844.imageshack.us/img844/5120/15162160.jpg

without knowing about this mipmap problem,so i was wondering,is possible maybe with some plug in to select all the pieces & hit a button that scale down every piece about 1% in order to obtain this same texture sheet but with the 8 pixel spacing between the uv pieces?

(btw,the real texture size is 2048x2048 & the smaller space between uv pieces i think is 3 pixel)

Bal
02-14-2011, 10:31 AM
A script like that would be nice, but it wouldn't work in every case, if you scale from the center of each shell, sometimes the result could have overlaps because of concave areas etc.
And yeah, that unwrap is way too tight.

pior
02-14-2011, 11:22 AM
Hehe just started on mine, its fun :P

EarthQuake
02-14-2011, 12:48 PM
holy crap didn't see this thread has 3 pages sorry :X




but to be fair in this specific case the gun is almost entirely black or dark grey so the mipping might not cause as much trouble as it would on an asset with much more color variance - but yeah i agree its always easier and safer to stay with a few pixels padding around the chunks and optimizing the hell out of it isn't really the best option afterall, also for some clients i worked for it was much more crucial to have all assets of the same kind (characters as a type, buildings as a type) within the same pixel ratio, which means that a hell lot of uv space is going to be wasted and only assets with a large surface (like very fat guys with a large hat) will use the uvspace to a usual amount. But this will guarantee that Asset1 and Asset350 will work together in one screen without any noticable differences - well this and the art direction of course.

Yeah the content of the image is very important, I've had modular tile sets, where I have a light concrete tile and a tar roof tile right next to each other, and the roof is always viewed at an acute angle, so I needed like 32 pixels of padding to fix it.

Howeverrrr, just because the diffuse is grey or black, doesn't account for the normals, if your uvs are 1 pixel apart, when it starts mipping down those orange and purple beveled edge colors are going to bleed together and cause seams.

Super Happy Cow
02-15-2011, 08:07 PM
I wonder if there's anything wrong with tiling a part of a mesh within the same UV space of a model that isn't tiled, save for that part.

I just tiled the chin straps of a helmet vertically across the tire treads of an unwrap to save time. I know, sounds like a terrible idea, but it looks perfect in game.

Seems to me to be really bad practice, but I needed it now.

Neox
02-16-2011, 05:52 AM
if it works, it works