Home Technical Talk

Proper way to do alpha maps?

Cyph3r
polycounter lvl 9
Offline / Send Message
Cyph3r polycounter lvl 9
With alphas are they supposed to be a seperate map? or combined into the diffuse as the alpha channel? also how can you get alphas to show in the max viewport?

Replies

  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    I assume you're talking about opacity maps. Alpha can be used for anything (for example the alpha channel of specular maps is often used to store glossiness or specular exponent information).

    Generally opacity maps are placed into the diffuse's alpha channel, although different engines will use them in different places and sometimes they are stored as separate maps. There's no solid convention for where opacity maps are stored, but most studios and engines I've seen tend to put them in the diffuse's alpha channel, so that's a safe bet for being optimised.

    To get them working in Max, you need to specify in the Bitmap material parameters that you want to use the "Alpha" channel for output. You'll use one Bitmap pointing to your diffuse file in the Diffuse slot, and just leave that as default, then set up a second Bitmap type in the Opacity slot, pointing to the same file, but with the Bitmap options changed to only read the alpha channel (there's a bunch of radio buttons somewhere in there in the Material Editor with a few labelled Alpha - look around and you'll find them).

    Then just make sure that the material is set to Show Map In Viewport at the top level, rather than on a sub-map basis.
  • iamtravis316
    Options
    Offline / Send Message
    iamtravis316 polycounter lvl 11
    Hey Cyp3r,

    You can have a separate map for the alpha channel, but I'm sure it would take up more memory etc...

    you can combine the alpha and diffuse by putting the alpha on the alpha channel on a 32bit targa file.

    I know if you have a separate alpha map then you can put the alpha map on the alpha channel on the max materials and make sure you hit that little button that allows you to view the material in the viewport, (under the spheres somewhere) However, if you have the alpha and diffuse combined im not sure, I would asume do the same thing but idk (yet).

    Someone please correct me if I'm wrong about any of this!


    EDIT:
    Awww MoP beat me to it while I was typing lol
  • cw
    Options
    Offline / Send Message
    cw polycounter lvl 17
    MoP got it bang on.

    There is a quirk to do with alpha maps in max too if you plan to render them out. By default as the opacity goes towards 0 the colour gets blended with the ambient or diffuse slot colour too somehow. Very annoying! So if you have diffuse texture with alpha applied in this way it can be useful to set the ambient/diffuse slots to black to make sure you don't get the strange 'fringe' around the edge of the alpha bits.

    Good luck! show us your results! :D
  • System
    Options
    Offline / Send Message
    System admin
    MoP wrote: »
    Alpha can be used for anything (for example the alpha channel of specular maps is often used to store glossiness or specular exponent information).

    Can you tell me more about this? Is this just inside a game engine or can it be done in max?
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Well, like I said in the initial reply, you can force Max to read the alpha channel of any 32-bit texture by telling it to ignore the RGB and use Alpha.

    So in this way, since you're just using a Bitmap map type, you can put this anywhere in the Material Editor that accepts regular map types. Thus you could have the gloss info in your diffuse map's alpha channel, or you could even put specular brightness (although not colour obviously) into the alpha channel.

    Many game engines hard-code this so it will always be opacity for example, but in some engines with material editors (eg. Unreal) you can individually take each component separately (R, G, B, A) and plug them into any input.
  • System
    Options
    Offline / Send Message
    System admin
    Cheers, will do a few experiments, sounds like this method could save some memory.
Sign In or Register to comment.