This is where things diverge, depending on what we do.
- If you just want a normal map, it will be saved as a separate VTF file. The usual naming conventions are yourtexturename_bump, but it doesn’t matter what you call it. You need to reference it in the .vmt file so Source knows it exists.
- If you want a specular map, you can store a texture in the alpha channel (provided it is not already used for transparency). Due to an error, you must invert this so that it can be read correctly. Save the diffuse texture as a normal compressed texture with alpha and use $basealphaenvmapmask 1 in vmt to specify where it is.
- If you want to have both a normal map and a specular map, you must save the specular map in the alpha channel of the normal map. The source will not read it otherwise. Save this as yourtexture_bumpspec (naming conventions don’t matter, we only find it helpful to mention in the name of the texture whether the normal map also gets a specular map) with the normal map with alpha preset. In the $normalmapalphaenvmapmask, use 1 to specify that you use the alpha channel of the normal map as the envmapmask.
Since Specular Maps are grayscale, it is best to save them as an alpha mask rather than as a separate, standalone texture. When saved as a standalone program, it is saved in RGB format with three channels, while as an alpha channel for another texture, it only captures one, which reduces the file size.
Note: Due to errors with the Photoshop VTF plugin, note these two things: Once you have used the Normalmap or Normal with Alpha preset, the Exporter will be “glued” to this preset and always saves in this format (especially with the flags “Normalmap” and “Trilinear”), regardless of how you set them until you re-state Photoshop. It’s a handicap and can really do damage if it’s something other than a normal map. Fortunately, you can disable these two flags in VTFEdit. The plugin does not save alpha channels unless you have smoothed the image before.
A good way to check if your source knows about the specular texture is to use Hammer. If you set the 3D view to “Textured”, you will see that the texture is visibly “glossy”. The $envmapmask is not loaded, so you would have to use some debugging methods in the game to check it.