Home Dota 2

Confusion with Mask 2 Blue channel, need help

Ifurzzar
null
Offline / Send Message
Ifurzzar null
Based on Valve's doc the blue channel of mask 2 is the specular tint mask, black value means the specular highlight will more remain whatever color the lighting is, white value means the highlight will more take the color from diffuse color map.
Then I had a look at Ogre Magi:
BiAHaW5.png

Notice the yellow band on his bracer and the coins on the shoulder, below are the blue channel from masks for bracer and shoulder I pulled out by GIMP:
ZMt0zF5.png

TgobW5Q.png

both the band and coins on the mask is total black, meaning their highlights should take on the default specular color, which is white (1,1,1 from vmt material file).

But on the screenshot, at least to my eye, they obviously take on difuse color. It seems the value from mask2 blue channel should have been reversed to match the real effect.
Could anyone tell me what trick source engine is playing here?

thanks very much!

Replies

  • BlueFlytrap
    Options
    Offline / Send Message
    BlueFlytrap polycounter lvl 9
    Dota 2's hero shader reads the basetint mask inverted. Hence why black is full tint and white is no tint.

    This is unique to the Dota 2 branch. Other builds of source (specifically other shaders) have them set up as the documentation says. With white being full tint and black being no tint.


    It's a matter of inverting the mask depending on whether or not you're using Dota 2.
  • Baddcog
    Options
    Offline / Send Message
    Baddcog polycounter lvl 9
    easy way to remember is white will give white highlights.
  • Ifurzzar
    Options
    Offline / Send Message
    Ifurzzar null
    Dota 2's hero shader reads the basetint mask inverted. Hence why black is full tint and white is no tint.

    This is unique to the Dota 2 branch. Other builds of source (specifically other shaders) have them set up as the documentation says. With white being full tint and black being no tint.


    It's a matter of inverting the mask depending on whether or not you're using Dota 2.

    You always come to my salvation just in time BlueFlytrap! thanks very much, I have a strong feeling the mask is inverted, but still need some expert to confirm. this piece of info is not mentioned on dota2 masks doc at all.

    One last question, is there any other channel in mask1 and mask2 read inverted?
  • bounchfx
    Options
    Offline / Send Message
    bounchfx mod
    Baddcog wrote: »
    easy way to remember is white will give white highlights.

    this is how I remember it as well. Threw me off a ton at first and is probably an issue with my first couple of sets.

    I don't recall any other channel being inverted though.
  • Ifurzzar
    Options
    Offline / Send Message
    Ifurzzar null
    bounchfx wrote: »
    this is how I remember it as well. Threw me off a ton at first and is probably an issue with my first couple of sets.

    I don't recall any other channel being inverted though.

    This is why I am sometimes unhappy with valve, both this and the reverted green channel of the normal map are completely ignored in their guide doc, and it's years after the doc's release, not any update still. I have seen even expert workshop author fooled by the reverted green channel of normal map, let alone many more new joiners. I mean, many modelers are used to work under tools like maya and 3ds max, they don't know usually green channel is reverted in most game engines.
Sign In or Register to comment.