Home Technical Talk

Utilizing UV space for the sake of it

Hey there all,

I've got a question regarding UV space. Now to most of you pro's who've been doing this for ages and employed in the industry, this is probably an obvious answer, but I'm still very much a beginner so it's things like this I have to ask!

My question is should you always use all of the available UV space, regardless of resulting texture res on mesh components?

Whenever I do an unwrap, I try to keep all of my UV shells scaled to their mesh size/importance, and ideally keep resolution as consistent as possible. Sometimes this will mean I have a lot of leftover UV space, and I know efficient use of UV's is such an important thing to achieve with unwraps.

Here's a quick mesh I'm working on, it's a small saucepan asset that will be a very minor part of an environment. I've tried to explain what I mean in the unwrap. At first glance, it looks like the worst UV layout ever, but hopefully you get what I mean!

Many thanks

uvquestion.jpg

Replies

  • Ben Apuna
    I like to keep the resolution of my UV shells consistent throughout a prop, unless something is going to be in shadow and not seen very much then I shrink it down to make more space for other parts.

    In general you want to keep pixel density fairly consistent in your entire scene from one prop to another as well.

    If you don't mind a bit of mirroring and your engine can handle non-square textures, here's what I came up with for your UV layout.

    Pan_UV_Layout.gif

    Another option would be to shuffle things about to make a large open area then put another prop's texture in the empty space so they share the same texture maps. This can be done if the two props will always be together in the same scene. A knife or ladle perhaps. However if they would ever be separate from each other, then it would be somewhat inefficient to do that.
  • Tom Ellis
    Many thanks Ben, much appreciated.

    Utilizing shared UV's over a couple of assets likely to be grouped was a consideration I'd made, and in this situation that may work quite well. I guess the downside to construcitng assets and a scene the way I'm doing it for this piece is that a bit of guesswork is required as to how smaller assets such as this one will be placed in the final scene.

    I always forget that I can use rectangular UVs in some cases too which should solve some problems.

    Thanks again
  • Mark Dygert
    One thing to keep in mind that most games have fixed sizes for texture slots. Think of it like a shoe rack in a bowling alley, different sized shoes all go into the same sized slot. So the engine expects square textures when it finds a half texture, it ends up taking a full slot.

    So often you're really not saving anything by using smaller textures or a half sheet, unless you pack something else on the other half of the sheet, like another rectangle prop or retexturing the same prop to get a variant.
  • Tom Ellis
    Thanks for the reply Vig, very helpful!
  • Ott
    Offline / Send Message
    Ott polycounter lvl 13
    If I'm not going to be sharing the texture, and I must stay within the UV space for whatever reason (no tiling or intended UV stretching), my process goes like this:
    • I will first run MoP's Normalize script, or use ye' old eyeball scaling with a checker pattern.
    • Try to pack everything into the UV space with a quick pass and check how much room I have left.
    • Grab everything and scale it up or down depending on whether I can fit it in the box or not.
    • Intentionally scale blaring-ly obvious buried or unimportant stuff down. (use at own risk)
    • Intentionally scale any big ticket UV islands up. (use at own risk)
    • Pack UVs as tight as possible with a pixel or two at least between the islands with the knowledge that 50% of the time whatever res you think you are going to get is likely to get scaled down during the optimize pass of your game.
    • Any of the leftover / small bits that can obviously be scaled up, scale em up and move them to an open gap.
    • Go back and forth with minor adjustments to scale and position on the UV page to maximize smaller UV chunks.

    In my mind, if everything starts out pretty uniform, and you run into a situation like your example where you have obvious left over UV space, there is no rule that says you can't maximize your UVs for the sake of maximizing it.

    As long as your important stuff is as big as feasibly possible, there's no reason not to waste UV space with your "lesser" important pieces simply for the sake of having everything a uniform scale.
  • Ghostscape
    Offline / Send Message
    Ghostscape polycounter lvl 13
    Vig wrote: »
    One thing to keep in mind that most games have fixed sizes for texture slots. Think of it like a shoe rack in a bowling alley, different sized shoes all go into the same sized slot. So the engine expects square textures when it finds a half texture, it ends up taking a full slot.

    So often you're really not saving anything by using smaller textures or a half sheet, unless you pack something else on the other half of the sheet, like another rectangle prop or retexturing the same prop to get a variant.

    This is true but I really don't think it matters for a portfolio piece and making a piece fit an artificial slot size when it isn't going into a game that has those sorts of slots seems like a total waste.

    Additionally this is an environment prop so it is much less likely to fit into a pre-defined slot since those are typically for important objects (drivable vehicles, weapons, characters, etc), and instead share a memory pool with the entire environment, so making it very efficient is even more important since the more efficient it is the more clutter objects you can fit into the available environment mempool.

    Also if this is a saucepan in a tiny kitchen scene I would seriously consider very heavy mirroring/tiling - unless the player is going to lick this thing or someone gets brained with it in a cutscene nobody is going to ever notice that it is mirrored/tiled along the edges, etc.
  • CodeFather
    Offline / Send Message
    CodeFather polycounter lvl 15
    Here are two tips that you may do to optimize the UV space in your textures. The first thing is to deform the UV shells so they can fit more tightly:
    UVoptimization01.gif


    You can also quadrify whenever you can in order to squeeze out even more UV space:
    UVoptimization02.gif


    For most of the straightening I tend to use TexTools Align options.
    For major deformations however you can transform your UVs into 3D geometry and manipulate them with modifiers and modeling tools.Here is a quick mini tutorial on this:

    DeformToFit01.jpg

    DeformToFit02.jpg

    DeformToFit03.jpg

    DeformToFit04.jpg


    If you're not familiar with TexTools, I highly recommend it ! You can download it from here:
    http://www.renderhjs.net/textools/
  • Tom Ellis
    Many thanks CodeFather that's a great help.

    I'm a big fan of TexTools and use the align tools a lot, I wasn't aware of the whole 3D UV thing though so thanks for that tip!
  • Michael Knubben
    The idea is that you weigh the advantages of more texture-resolution up against the added hassle of cutting up your uv-islands further. If the price to pay for higher (overall) texture density is breaking off a few bits and stretching some things, that may often be worth i.t
  • mLichy
    Besides packing it in really well, u also want to think about UV splits. For every split, u double your verts basically. Also you may get visible seams when the maps mip out from a distance.
  • MRico
    Offline / Send Message
    MRico polycounter lvl 10
    Ben Apuna wrote: »
    In general you want to keep pixel density fairly consistent in your entire scene from one prop to another as well.

    Is this just having the same checker patten size on all your objects?

    I've heard having the same "pixel density" before but didn't really know what it meant.
  • konstruct
    Offline / Send Message
    konstruct polycounter lvl 18
    HOLY SHIT textools is awesome. I need to hang out in techtalk WAY more often.

    autopsyS thats pretty much what pixel density is. there is a bit more to it tho if your interested.
    http://boards.polycount.net/showthread.php?t=35204

    generally you want to establish a pixel desity standard- that way when ever you make an asset you know what to shoot for, as opposed to just packing your UV`s so they fit your base page and having know Idea how that asset will compare to other assets in the scene. Saves you from having to go back and revisit things.
  • Ben Apuna
    AutopsySoldier:

    Yeah that would do it, given that you are applying the same size checker textures that your real textures would be and that the checkers themselves are a consistent size from texture to texture.

    EDIT:

    konstruct beat me to it, that's what I get for leaving threads open for a while before replying.
  • MRico
    Offline / Send Message
    MRico polycounter lvl 10
    Thanks a lot guys! I'll make sure to keep that in mind when working on my stuff.
Sign In or Register to comment.