Another question about reflection masking:
Im having trouble understanding these directions:
Masking the reflection
Some materials will have varying amounts of shininess. For example, a metal texture would not be very shiny wherever it's rusty. A mask will allow you to determine the reflectivity of each pixel of your texture.
1. Start by making the mask in grayscale at the same resolution as your original texture. The brightness of the mask will be multiplied by the opacity of the envmap, on top of the envmaptint. In other words, black means no reflection and white means full reflection. The rest of the steps depend on whether your material has a normal map:
2a. Masking a material with a normal map
Save the mask into the alpha channel of your normal map. Now add this line to your VMF:
"$normalmapalphaenvmapmask" 1
2b. Masking a material without a normal map
Save the mask as a new TGA file (no alpha channel) with _mask at the end of the name. Convert it to a VTF and put it in the same directory as your texture. Add this line to your VMF:
"$envmapmask" "texture name"
and fill in the path and name of your mask.
Here's an example VMT for a material with a normal map. Since we already have a normal map, we'd just embed the mask into the alpha channel of the normal map, as described in step 2a.
"LightmappedGeneric"
{
"$basetexture" "walls/brickwall"
"$surfaceprop" "brick"
"$bumpmap" " walls/brickwall_normal"
"$envmap" "env_cubemap"
"$envmaptint" "[.5 .5 .5]"
"$normalmapalphaenvmapmask" 1
Its Step 2 I dont understand. Saving in the alpha channel? Does that mean save the texture in 32 bit format for the alpha and simply add the "$envmapmask" "texture name"? If I have a bumpmap already, Do I make another grayscale with the mask and somehow save it to the alpha channel? How does it work?
Thanks in advance