G'day all, can MOH recognize TGA mask alpha channel values other than 0 & 255?
I have made a few windows for maps before, with and without sign writing on them, but that's basic 0 and 255 opacity values in the mask alpha channel.
I have painted a dirty industrial type window with 50 glass panels for this map and I want the transparency of the panels to differ from one to the next one so I have staggered the mask values at 0, 16, 32, 64, 128, 192 for each glass panel and of course 255 for the frame.
Anything under 128 is all clear glass in the game where as anything over is not transparent in the slightest. Not the results I'm after.
I know this method works for glass tinting in other games, even primitive ones such as Need For Speed, which didn't require shader files at all.
My shader for this window is...
Changing the lines "qer_trans .6" to "qer_trans .1" and "alphagen const .2" to "alphagen const .05" didn't do anything.textures/rome/industrial_windowz
{
qer_editorimage textures/rome/industrial_windowz
qer_keyword glass
qer_keyword window
qer_trans .6
surfaceparm glass
// cull none
{
map textures/mohcommon/envnormndy_day.tga
tcgen environment
alphagen const .2
blendFunc blend
}
{
map textures/rome/industrial_windowz.tga
depthWrite
rgbGen identity
alphaFunc GE128
nextbundle
map $lightmap
}
}
Without the line "map textures/mohcommon/envnormndy_day.tga" (used for the glass reflection, which I don't really want) my texture doesn't show at all in the game.
When I edit the line "alphaFunc GE128" to any other value other than 128 the glass texture it not transparent at all.
I realize there aren't many mappers around these days but perhaps someone knows of a map with dirty looking, or tinted semi transparent windows and I could checkout how it was achieved.
Cheers