Now that the base texture (otherwise known as the colour map) has been completed. The next stage is to create the normal and specular map for it. The normal and specular map's handle reflection's and shading effects. What you may have noticed is that if you use your texture in it's current state, it will look very unrealistically flat. This tutorial aim's to teach you how to create the normal and specular map's as well as editing the VMF file.
Before we start, you will need to download the nVidia Normal Map Filter if using photoshop, or CrazyBump if you don't have photoshop, or want another option.
This is my texture I will be using to create the normal and speuclar map. I assume you have already read my previous tutorial, Texture Creation 101
Creating The Normal Map
Using the nVidia Photoshop Plug-in
To use the nVidia plug-in, simply open you're texture in photoshop and then save it under a different filename, I normally save it with a _normal suffix, to remind me what it is and for easy organisation. The first step is to do a slight edit to the texture. By using different shades of grey, you can determine how 'bumpy' the surface will be. In my example, I'll be using a mid grey for the main wall, and lighter colours for the paint. Do this on a new layer. (Remember to flatten the image first)
Now, change the opacity of this layer to 70%-75%, to allow a little detail to come through. Flatten the image.
Next click on Filter -> nVidia Tools -> NormalMapFIlter... Then simply change the settings to get what you want, there is also a preview button as well. The scale should be the only thing you need to edit for now, I'll be using a scale of 4.
Save this image as a DXT1 file in the same folder as your colour map.
Something you skinners may have noticed is that there is no alpha layer here. There is no need for one, as an alpha layer in the Normal map act's as the specular map, which will be an independant file in this tutorial.
Using CrazyBump
After installing the program, open it, open your colourmap.
It will generate the normal automatically, save it as a JPEG or PSD, then use Photoshop or VTFEdit to convert this image to a VTF. Save it as a DXT1 file.
Creating The Specular Map
Open the colourmap in Photoshop, or your prefered image editor and save it with a _spec suffix, again useful for organisation. Flatten the image. Then go to image -> adjustments -> desaturate.
Add a new layer and make fill it with black. Turn the opacity down to 60%. The source engine needs good definition of contrast, as opposed to other engine like Unreal3, which needs a very subtle specular map. You may want to play about with the brightness and contrast setting's as well.
Save it as a DXT1, or as a I8 format in the same location as your colour map. I still havn't experimented with this format yet, but it should give a smaller file size.
Editing the VMT
Now that you have your Specular and Normal map, the VMF needs to be edited to tell the engine to use them. Open the VMT in VTFEdit or notepad. Then add the following lines to the already existing ones:
The envmaptint numbers can be varied, but I am still unsure what exactly they do, most changes to the actual visual rendering of the image will come from changing the normal, specular and colour maps.
Once everything is done and finshed, you must recompile your map. So if you used the colour map only to use in your map then just added the spec and normal maps without recompiling your map, it will not work correctly.
Conclusions
Well, that's it, use the texture in a map, compile it and see what the result is ingame. make sure to include cubemap's and compile them in the game engine to see it correctly. Note how the wall reflects the light and the wall actually looks like there are chips and knocks in it.
Hopefully, these past two tutorials should show you how to make the majority of textures you will need for a custom map. Enjoy.