Home Technical Talk

UV Theory

polycounter lvl 10
Offline / Send Message
ralusek polycounter lvl 10
Ok so please correct me if i'm wrong, but i really see very little purpose to minimizing distortion in a final UV map, and that is what seems to be everybody's priority. I'm of course primarily speaking from the perspective of someone with bodypaint/zbrush/3dcoat available to them, but i still feel minimizing distortion is completely overrated across the board.

That being said, here is why. We have to consider the battle of choice when it comes to making a UV map, and those primary choices are:

Lower Distortion vs. More Seams
Lower Distortion vs. Optimal Texture Space
and then obviously More Seams vs. Optimal Texture Space

you could even throw in a fourth consideration for hand painting, and that would be the fact that you have to know exactly what and where you are painting based on the UV's.

why lowering distortion seems to be among the highest priorities (i.e. checkerboard with every map) is likely for applying grunge overlays, mechanical/photo referenced details, or any other handpainted details on a 2d program. however, if you just stretch the maps to cover as much uv space as possible, and then paint the model in a 3d app, the distortion is completely irrelevant and you've simply optimized your texture.

that being said, even if you prefer to paint in photoshop, simply create a map that is rougly 2x larger than the final map, do your textures on your distortion-free map, take them to a 3d map and apply those textures to the super-distorted-but-optimized map, and you're now being way more efficient with your texture space. you can always save the original for reference and changes. The best part of this is that you can also get rid of a lot of seams so long as you're willing to sacrifice a bit of distortion, and still almost always gain texture space for every UV.

again, correct me if i'm wrong, but i've been wondering why i don't see this more.

Replies

  • ralusek
    Offline / Send Message
    ralusek polycounter lvl 10
    double post, but i guess something to consider is that with really high distortion, gradient levels of detail could appear across a surface, with a pixelated corner that fades to a sharper opposing corner etc, but i haven't encountered this yet. especially since these days, the maps are already big enough where the gradient would be from "pretty crisp" to "more crisp"
  • EarthQuake
    Well, unless your low distortion unwrap is a terrible, terrible waste of space to begin with, you're just adding a lot of work for a very minimal gain(requiring 3d painting, rebaking to a different uv set etc, any other custom workflow). Not to mention that if your asset needs consistent detail, having massive amounts of distortion is actually going to result in a "blurier" end result than if you simply used a little less space. Doing a good unwrap is all about maximizing space usage, minimizing distortion, and getting the best usability out of it. Its a blend of many things, not simply one aspect vs another aspect that makes a good uv layout.

    You're likely talking such a small % of improved usage, that is really not worth the extra time spent working on it, not to mention even extra time doing custom workflows and other stuff to work around it, when in all likely hood, you would never notice the usage gains unless, as i started with, you have a terrible layout to begin with.

    When i think about uv usage, here are the things i generally consider important:

    1. Is there enough UV space for detail areas, IE will areas of the mesh(on a FVP weapon for example) that are highly visible given enough resolution to not appear blurry?
    2. Are my UVs set up well to bake properly, do i have uv splits where i need to have hard edges for tangent space maps?
    3. Are my UVs mostly distortion free in areas that require a lot of detail? Generally "Relax" takes care of this for 95% of the job
    4. Are my UVs running at good angles relative to the 3d space? IE is my UV chunk rotated 17.367 degrees, if so, is a part of the mesh with a lot of detail? In which case i will try to straiten it out, so the pixels arent running on some poor axis
    5. Are my UVs packed well? This has a few sub-sections;
    - Are similar uv islands packed near their buddies to make finding them in 2d easy?
    - Do i have enough breathing room around each island to make sure i can have plenty of padding and avoid poor mip-mapping in game?
    - Is my space usage optimal? Could i rescale a few pieces, or puzzle some stuff together differently to get a bit more usage out of the layout?

    Now, if you follow all of this, which i feel is pretty standard UV guidelines, you shouldn't find yourself worrying about baking your textures to different uvsets, or painting everything in 3d, or any other restrictive workflows.
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    From my experience I can squeeze out usually another 20-30 % extra texel space by just packing more efficient and sometimes distorting some areas of the UV relatively.
    I worked on some low poly stuff before (flash based 3D engines, unity, iPhone) and texture space is always limited so packing everything tight is kind of essential in order to get most out of it.
  • rumblesushi
    Interesting post. For my AS3 3D engine I need to look into maximising UV space, partly from a performance point of view, getting models to share textures etc to minimise draw calls.
  • 3DRyan
    Offline / Send Message
    3DRyan polycounter lvl 8
    I have a question with all this. Say I model something that has a piece in it with a lot of height to it. Like a tether ball pole for example's sake. Obviously, I'll have the unwrap of the pole, maybe string, and ball itself. Now, as to be expected, if there is the minimal amount of seams on the pole (1), then there will be alot of UV space left to use. Would it be better to waste the space, or cut the pole up into more UV shells to maximize texture space? Is texture space sharing between objects a good way to go? That's what I've been leaning towards on the project I'm working on now.
  • pior
    Offline / Send Message
    pior grand marshal polycounter
    Concept for model,
    model for UVs.
  • ralusek
    Offline / Send Message
    ralusek polycounter lvl 10
    3DRyan wrote: »
    I have a question with all this. Say I model something that has a piece in it with a lot of height to it. Like a tether ball pole for example's sake. Obviously, I'll have the unwrap of the pole, maybe string, and ball itself. Now, as to be expected, if there is the minimal amount of seams on the pole (1), then there will be alot of UV space left to use. Would it be better to waste the space, or cut the pole up into more UV shells to maximize texture space? Is texture space sharing between objects a good way to go? That's what I've been leaning towards on the project I'm working on now.

    so what i'm saying is, leave the pole with one seam, and just stretch its horizontal coords to take up as much space as you have available. you can also stretch the ball, etc, so long as you're painting in 3d and not on the uv template
  • EarthQuake
    That is generally a pretty bad idea, it just isnt going to look good. If you're talking +/- 15% or something then yeah its probably fine, but major stretching is a big no-no. Or if the asset really has no detail other than very basic color information, than you can get away with some more drastic stretching.

    One thing to keep in mind, as you tried to make this point earlier is not only the max res you'll see the asset at, but the fact that it is going to mip, and your overly stretched layout is going to fare much worse than a nice, proper layout. Also the good chance that your asset could be downsized at some point, or the game run at a lower texture quality by some users that will most definately notice the horrible stretching, even if the base texture is "detailed enough".

    As pior says, model for uvs! In this specific case what i would do is instead of constructing the pole as one solid, simple shape, i would create a highres that has some seam detail. Build the pole in a few pieces with nice seam detail for the normals, that way you can easily chop up the uvs at those natural seam points without any sort of visual or workflow issue.

    Unwrapping the pole and ball separately would be another option in this case as well, you use the proper aspect ratio for each then.
  • EarthQuake
    Something i feel that is often overlooked, is creating your lowpoly mesh and uvs in line with the shapes and seams of the parts in your high. What this means is, even if its a little more tris to cut in some more edges to follow a line where 2 objects come together and form a seam in the high, its a good thing to do, as it will give you more flexibility when it comes to unwraping, and it really helps to have the natural "break away" points where you can cut off the uvs without really ever affecting your texturing. If you've got a natural seam on your uv seam, you can worry much much less about "fixing seams" and the such. I rarely, almost never have any need to use extern programs or convoluted methods to fix seams, instead i plan my models and uvs accordingly so i do not end up cutting a detailed area in half, and plan my texturing accordingly as to not place large amounts of detail along obvious seams.
  • 3DRyan
    Offline / Send Message
    3DRyan polycounter lvl 8
    Ah I see, makes sense. Thanks for the good input!
Sign In or Register to comment.