Home Technical Talk

3DS 9: Multiple MatID's per face?

polycounter lvl 14
Offline / Send Message
JonConley polycounter lvl 14
This is my first post here but I've been following a lot of the threads here with awe.

My question though is it possible (and if it is how?) to allow faces to have multiple MatIDs in max? What I mean by this is say I have 1 base "skin" texture and I want to apply a sleeve or chest to the model, so I then have a separate texture that is only the chest or arm (which ever) unwrapped and have it applied over top. Now to further complicate this a little, say I have a glove and a sleeve but they overlap by a few polygons (at least the matID's do and the UV's) so I can draw a glove how I want with alpha, and if part of the glove is alpha it will show the sleeve (or if that part of the sleeve texture is alphad also then it'd show the skin).

My solution that I was thinking of was I would have to use a base mesh and then break it into "clones" of these sections and hide / show them as needed with the alpha.

Replies

  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    You can't apply multiple material IDs to a single face.

    What you want to do is using a more complex material - for example, use a "Mix" map in the diffuse slot, use your "base" texture at the lower level, and your "on top" texture (eg. the sleeve or the glove) at the higher level. Then use the mask image for that "on top" texture to mask out how to mix those two maps.

    You can then add more Mix maps as children of that current Mix map, and use different mask images to composite multiple textures on top of each other.

    If you're not sure what I'm talking about, look up "Mix" map in the 3dsmax help documentation.
  • ParoXum
    Offline / Send Message
    ParoXum polycounter lvl 9
    You can also use the vertex color data to mix materials in a way-like MoP explained. With deeper control.
  • JonConley
    Offline / Send Message
    JonConley polycounter lvl 14
    Thanks MoP and Paro.

    I've seen quite a few things on Mix but have never used it. My question then (before a lot of work goes to waste): Would those Mix materials transfer to .X format? (this is for a project I am helping with).
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    As far as I know, no, they wouldn't.

    For the sort of complex set-up you're talking about, you'd probably need something engine-side to cope with it (eg. a texture layering system).
  • JonConley
    Offline / Send Message
    JonConley polycounter lvl 14
    Thanks for the quick reply MoP.
  • Mark Dygert
    You can also use a composite map in the diffuse slot to mix a bunch of different maps.
    WrinkleMapBlending.jpg
    In a standard material, in the diffuse slot instead of putting your bitmap (.tga, .png, .jpg ect...) but a composite map. Then create new layers, loading your bitmaps into the left slot, and masks into the right slot. You can set the blending method just like photoshops layer preferances also. You can also adjust each layers opacity.

    Note:
    This is NOT replacing your standard material with a composite material (that thing is near useless). You want to use a standard material with a composite map. I'm pretty sure the new composite map was added to 3dsmax9, if it was 2008 and higher then you're better off using some other method.

    You can also look into ShaderFX for a handy dandy GUI for creating complex .fx files. It could probably do what you want in a very short time. Love that thing...
Sign In or Register to comment.