Monthly Archives: May 2013

You now can check out Dota 2 item creation in real-time, check out my twtich stream at http://www.twitch.tv/vladimir_the_implyer

stream

Masks

With the testmap issues fixed and bunch of new heroes added to the importer tool I feel like it’s time to talk about texture files and masks . The requirements page tells us that:

  • The “_color” texture can be 24 or 32 bit.
  • Alpha channel of 32 bit “_color” texture can be used as opacity for your item if alpha is allowed for this hero.
  • The “_normal” texture should be 24-bit and use the 3dsmax format(red channel is left; green is up; blue is top). If you aren’t creating a custom normal map, use a flat normal color (128,128,255).
  • “_mask1” is a 32-bit texture and every channel is used.
    Red is the detail map mask.
    Green is the diffuse and fresnel warp mask.
    Blue is the metalness mask which controls where the Color and Fresnel are suppressed. Works best in combination with mask 2 blue channel “tint specular by base color” which brings the color back through specular.
    Alpha is the self-illumination mask, where the color is drawn from Color texture. Even if you are not using this, fill it with black and pixel of non-black in the corner of the material. This is done in order for texture compiler to keep this channel. If it is entirely black or white, it will be thrown out and the shader will think it’s pure white and your item will be full bright.
  • “_mask2” is 32-bit and again every channel is used.
    Red is specular intensity.
    Green is rimlight intensity.
    Blue is “tint specular by base color”, white color in this channel will color specular highlights by diffuse color from _color texture, black will keep specular highlights of whatever color light affecting the surface is.
    Alpha is the scale factor of specular exponent from hero shader(vmt). For example, if the specular exponent is set to 16, then values for this channel of 0…255 will control exponent values from 0 to 16. Even if you are not using this, fill it with white and pixel of non-black in the corner of the texture. This is done in order for texture compiler to keep this channel. If it is entirely black or white, it will be thrown out resulting in a different texture format when compiled.

And Valve even rolled a nice guide about the shader masks. You can find it here. Let’s take another look at them.

Continue reading