Home Technical Talk

Is vertex painting a typical way to break up overlapped-UV texturing?

Zablorg
polycounter lvl 6
Offline / Send Message
Zablorg polycounter lvl 6
Using overlapping UV islands is obviously a pretty common way to save on texture space, but you end up with... symmetrical texturing, which is obviously pretty boring.

I figure a nice way to get some asymmetry would be to apply vertex painting to half of the model as needed, and then use the paint to blend in another texture, or just adjust the original texture. This may be blindingly obvious, but I frankly haven't seen much discussion on using vertex painting specifically in regards to overlapping UV layout, so I'm curious about people's thoughts.

As with just about any method in CG, it'd come down to performance trade-offs, right? So I guess I'm just looking for a ballpark idea of whether this is / can be a lot more performant than, say, doubling texture space? I'm guessing so, but I'd like confirmation.

I also have a more advanced question that's relevant to the topic here. If I'm using a model with two layouts (an overlapping one for symmetrical texturing and one with no overlap for lightmapping), and the lightmap is being used, does it then cost anything to invoke that lightmapping UV set in the object's shader? Since the islands aren't overlapping, you could use it to impose some asymmetry in an otherwise symmetrically textured model.

I know that using multiple UV sets multiplies the effective vertex count, I'm just wondering if that cost is already being paid by the use of the lightmap.

Replies

  • Eric Chadwick
    First, overlapping UV does not equal symmetry. You only get symmetry if you mirror a UV.

    Most environment UV tiling is done by simply scaling the UV larger than the 0-to-1 UV square. That causes the texture to repeat across the model. Not causing symmetry, which means creating a rorshach or "butterfly" pattern.


    If you're simply doubling texture size, for example changing a 1024x1024 into a 2048x1024, then that's slightly less memory cost than blending two 1024x1024 textures with vertex color.

    Two reasons... 1) vertex color usually adds to the size of the model in memory (only a tiny amount, but still does, usually). 2) it's generally slower to load two textures into memory than one, even though two 1024s are (mostly) the same size as a single 2048x1024.

    Blending a couple textures together is also usually a bit more expensive than using a single texture. 

    But, even with those truths, it's still often better to blend the textures. It's worth the cost, because you can reuse those textures more across the game, less specific. You can also get more variety.


    Lightmap... The 2nd UV is not a big cost, but the lightmap itself is usually expensive because it takes up a lot of room in memory. 

    It won't do much to hide tiling repetition though. But it's again, usually worth the cost, because you get high quality pre-computed lighting which is usually cheaper than realtime lighting of comparable quality.
  • Zablorg
    Offline / Send Message
    Zablorg polycounter lvl 6
    First, overlapping UV does not equal symmetry. You only get symmetry if you mirror a UV.


    Thanks for your response! To be clear, I did indeed mean mirroring UV islands and positioning them over the same UV space. I think we are both on the same page, though.
  • Eric Chadwick
    We put lots in the wiki about vertex blending. Have you seen this?
    http://wiki.polycount.com/wiki/MultiTexture

    Also more here
    http://wiki.polycount.com/wiki/VertexColor
  • Zablorg
    Offline / Send Message
    Zablorg polycounter lvl 6
    We put lots in the wiki about vertex blending. Have you seen this?
    http://wiki.polycount.com/wiki/MultiTexture

    Also more here
    http://wiki.polycount.com/wiki/VertexColor
    Sure have! They've been very helpful. I do find though (on this subject and many others) that articles/entries are more often about implementations of a technique and less about tradeoffs between techniques and their relative performance, and that's typically when I'll ask around. Your insight on using two textures vs one texture double the size is exactly the kind of thing I'm looking for, for instance.
  • Eric Chadwick
    The tradeoffs are difficult to quantify though. They are extremely dependent on the situation. Type of game, art style, hardware, delivery method, what else is nearby, etc.

    It's all generalities. You go with your best guess, and adjust/adapt to the circumstances.
  • sprunghunt
    Offline / Send Message
    sprunghunt polycounter
    Zablorg said:
    We put lots in the wiki about vertex blending. Have you seen this?
    http://wiki.polycount.com/wiki/MultiTexture

    Also more here
    http://wiki.polycount.com/wiki/VertexColor
    Sure have! They've been very helpful. I do find though (on this subject and many others) that articles/entries are more often about implementations of a technique and less about tradeoffs between techniques and their relative performance, and that's typically when I'll ask around. Your insight on using two textures vs one texture double the size is exactly the kind of thing I'm looking for, for instance.

    For most games I would be using vertex blending extensively on environment assets. It's a super useful tool that's pretty cheap from a performance and memory point of view. It's great for hiding repetition or just allowing for customization of the same asset.  

    But for hiding symmetrical texturing I would just try to avoid making the design of the asset so that it's really obviously symmetrical. 
Sign In or Register to comment.