Home Technical Talk

UV mapping for "industry standard"

Offline / Send Message
Pinned
Noob question. I'm wandering what UV mapping is expected by game industry.

No distortion in map. Is it good enough left example, or it should be more like right example ?

Replies

  • V!nc3r
    Offline / Send Message
    V!nc3r polycounter lvl 8
    I never worked in game industry, but I guess the same rules apply everywhere in realtime: the more pixels you're using from a texture, the best it is.
  • Eric Chadwick
    It all depends. Generally, the less uv seams, the better. Less distortion is better. 
  • Ghogiel
    Offline / Send Message
    Ghogiel greentooth
    I think it's worth noting that often clamping on some seam edges to avoid aliasing in texture bakes is a trade off worth making for some distortion
  • SnowInChina
    Offline / Send Message
    SnowInChina interpolator
    its always tradeoffs, more seams -> less distortion || fewer seams -> more distortion (generally)  and it really depends on your texture and the importance and viewing distance of your object
    for example, on organic textures you might not notice distortion as much as on "mechanical" textures
  • Mark Dygert
    It totally depends on the object, how you're going to texture it and how it will be used in game. There isn't one rule "the game industry always does X and it always works perfectly". There are common practices that get used over and over again, usually for specific reasons but...

     ...without knowing any of the other important info, or even seeing the UV Layout of each it's hard to guess which would be the best way to move forward with this particular model.

    Instead, you follow a few loose guiding principles:

    Keep your total vert count as low as possible 
    Don't waste time needlessly optimizing and don't create a nightmare workflow for yourself. Keep in mind that smoothing breaks and UV seams add verts to the final in-game model, even if you're content creation app doesn't tell you. So minimize them as much as possible, within reason.

    Try to minimize distortion as much as you can
    This goes two ways, you can either relax something, or straighten it. If you relax a UV layout it gets less distorted, but then straight lines along edges will become jagged or anti-aliasing will blur it.

    Pixels make great straight lines when you stack them vertically or horizontally but not at a diagonal. Do straight lines matter to your model? No. Then who cares. If yes, then you might want to straighten a few edges and account for any distortion that might introduce across the surface of the face.


    Try to use as many pixels
    Know that some pixels will need to be sacrificed to the void to combat void creep with mip-maps. Edge padding isn't wasted space, it's space that gets used, later... The wiki has a good section on edge padding http://wiki.polycount.com/wiki/Edge_padding and on mip maps http://wiki.polycount.com/wiki/Mip_Mapping


    Try to keep a consistent pixel density (texel)
    Not everything needs it's own unique space and not everything has the same importance level. For example the base of a statue that sits on the ground might need to be capped off to keep light from leaking in from the bottom and making the model shade in a weird way. But we never see those faces so do they deserve a large chunk of the UV layout? Nope, that crap gets 2px in the void. Now if the statue gets tipped over and we see the bottom, then we might need more pixels. But in general you want to try and avoid ultra blurry pieces sitting right next to ultra sharp parts.

    Example: I have a postcard that uses 2048, you can read the cursive handwriting perfectly. I also have a billboard that also uses a 2048 and you can't read any of large bold fonts. I hold the postcard up to the billboard and examine them both. Clearly I smooshed too many pixels into the postcard and not enough into the billboard. This plays out with UV shells the same way it does with whole objects. Don't scale up a shell if on the model it is right next to one you scaled down to make room.

    Try to have a consistent pixel size across your model and across the game in general. If 1cm = 10px great, if 1m = 1px awesome just try to be consistent but you don't have to be ultra dogmatic about it, especially if it hurts the visual aesthetic of the game, creates a technical problem or if it stretches out the time it takes to make that asset.

    There are always caveats...
    These aren't rules. They are just a series of "if you do this, that will probably happen". In some cases you might do one and ignore all the others because the result is not what you need. You might have to come up with a whole new guideline that is specific to that particular project or model. All of these have reasons and repercussions for using them and there are certain scenarios that cause you to throw them out, but in most cases they are good things to keep in mind.

    You should also do some research into each one and really dig into why they where created and why people generally follow them. Then experiment and test out different ideas and see how it changes the result.

    That experimental experience will be critical when you run into issues like this, especially when you encounter something the industry has never had to deal with before. Setting up a framework for figuring out problems is actually more important than memorizing rules and following them.

    As artists we should fight complacency and apathy. "Well that's the way it's always been done so that's how I did it" is a horrible workflow and an easy trap to fall into. It will help to stop every once in a while and ask yourself "yea but is this the best way?" if the answer is yes, great. If no then why? Is it something you can implement now or is it better to save that for the next one?

    ANYWAY... (climbs off soapbox)
  • Eric Chadwick
    (never climb down, Mark!)

    Ghogiel said:
    I think it's worth noting that often clamping on some seam edges to avoid aliasing in texture bakes is a trade off worth making for some distortion
    Can you explain this s bit more? What does it mean to clamp seams?
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    I assume it means to straighten seam edges. 

    Strictly speaking we should pixel snap our seam UVs so we can avoid fuzzy bits
  • Ghogiel
    Offline / Send Message
    Ghogiel greentooth

    (never climb down, Mark!)

    Ghogiel said:
    I think it's worth noting that often clamping on some seam edges to avoid aliasing in texture bakes is a trade off worth making for some distortion
    Can you explain this s bit more? What does it mean to clamp seams?

    poopipe said:
    I assume it means to straighten seam edges. 

    Strictly speaking we should pixel snap our seam UVs so we can avoid fuzzy bits
    ^This.
Sign In or Register to comment.