Home Technical Talk

Multiple textures on single model

interpolator
Offline / Send Message
Hito interpolator
whats the impact on final asset for in-game?

All textures I've made so far has been a single sheet. I'm guess multiple textures utilizes the UV channels for different parts of model. Are all game engines able to accept this or is it engine dependent?

thanks!

Replies

  • CrazyButcher
    Options
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    engine dependent (like nearly everything).
    most will only allow one UV set, or sometimes 2 (diffuse + lightmap). I'd say modern engines give you more control.

    however I think most texturing is done with one channel, the others are more for effect stuff, like lightmaps (ambient occlusion...). You may mix detail textures on top, but they could use the same UVs I guess
  • Hito
    Options
    Offline / Send Message
    Hito interpolator
    I should clarify, multiple sets of UVs; but each covers a different part of the model.

    Eg
    the Head uses UV channel 2; and a 512x512 map;
    the Torso and Arms use UV Channel 1 and a 1024x1024 map;
    the legs use UV channel 3 and a 512x512 map;

    I don't see this being done as much with characters as much as environment pieces. whats the rationale behind that?
  • gamedev
    Options
    Offline / Send Message
    gamedev polycounter lvl 12
    This is something that was common even with UT2004 - one texture for the body and one for the head. Generally a high rez texture for the head for detail. Multiple textures that cover seperate UV spaces are going to be engine dependent. You do see this with some environment pieces, larger pieces like buildings. Smaller props however can usually get all the detail into one map.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Why would you need different UV channels for those pieces? You only need different UV channels when the same geometry needs different uv-mapping (like Crazybutcher suggested with lightmaps for example) - unless you mean different materials for each part.
    All the different maps could all be on the same UV channel though.
    Usually it's best to keep as many things on a single sheet, since it saves on paging textures in and out of graphics memory - it only has to load one texture for the whole thing.

    For example, if you have your character set up as you mentioned earlier, why not just use a 1024 x 1536 map (unusual size, yes, but still a power of 2) and just stack the head and legs 512 maps below, above, or to the side of the main 1024 map, and adjust the UVs accordingly (ie move them up or down by 1-2 UV units).

    Back to your original question - there probably isn't *too* much impact if it's just a single character model, but the more you split up textures, the more swapping is likely to take place, so if all the textures are gonna be seen at the same time (like on a character), it's better to put them all on one sheet.
    It's also engine dependent, but I'd expect most engines these days to handle multiple textures without problems.
  • Mark Dygert
    Options
    Offline / Send Message
    I think he was confusing UV channels with Material ID's?

    The only reason I think you would need separate textures is if pieces of the models are being swapped out, such was the case with the UT2004 heads. You don't want to load a whole body/head texture if it is going to use only a small piece for the head and reference another totally different texture for the body. Like MoP said if no swapping of pieces will take place, put it all on one, unless you have a really really good excuse not to.
  • Hito
    Options
    Offline / Send Message
    Hito interpolator
    Okay, I was just curious since I noticed a few models I saw recently employed two or more texture sheets and figured I ask.

    Vig, yeah I forgot about material IDs.

    Thanks for clearing things up!
  • CrazyButcher
    Options
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    [ QUOTE ]
    use a 1024 x 1536 map (unusual size, yes, but still a power of 2)


    [/ QUOTE ]

    no, 1024x2048 would be power of 2. Always "double", you cant just sum with another power of 2 number.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Ooops blush.gif
    Probably be better if the 2 512 pieces were combined into a 1024 x 512, then smile.gif
  • Eric Chadwick
    Options
    Offline / Send Message
    Not mentioned but important... multiple UV sets may double the vertex count of the model. Some engines are smart about only storing the deltas (differences) between multiple UV sets, but still, good to know. This old-ish article might be a good read.
    http://www.ericchadwick.com/examples/provost/byf1.html

    Another reason for a separate material for the head may be that it has an expensive multipass shader, but you don't want that rendering cost to be applied to the rest of the body as well. Still good to share the same UV and texture sheets though, in my experience.
  • Hito
    Options
    Offline / Send Message
    Hito interpolator
    Thanks for the link Eric! I read that a while back, but things are showing in different light this time around.
  • Joshua Stubbles
    Options
    Offline / Send Message
    Joshua Stubbles polycounter lvl 19
    Lol. Don't worry, MoP - 1024x1536 is still OpenGL compliant smile.gif

    Nice doc, Eric.
  • CrazyButcher
    Options
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    but only newest hardware generations support non-power-of-two textures, and they are likely being a bit slower, and also often are not fully supported (come with useage limits on filtering and so on). And 1536 remains to be a non-power-of-two :P

    and Eric's linked article is a classic, it should be sticky must-read for everyone =)
Sign In or Register to comment.