VMT
A VMT ("Valve Material") file defines the material used by a two-dimensional surface. It contains all of the information needed for  Source to simulate the surface visually, aurally, and physically.
 Source to simulate the surface visually, aurally, and physically.
The contents of a material will fall into some or all of these categories:
A simple example
This is a very basic shingle beach material.
- The LightmappedGenericshader is used, which means that the material is for use on surfaces with lightmaps (i.e. brushes).
- The {character opens a set of parameters
- The $basetextureparameter is given withcoast\shingle_01, which is the location of a texture. This is what will be drawn on the screen.
- $surfacepropgives the material the physical properties of gravel.
- The }character closes a set of parameters
It's important to remember that this material can only be used on brushes. If it needed to be used on models, for instance, another version would need to be created using the  
VertexLitGeneric shader.
Most of the time switching materials from one shader to another is as simple as changing their first line, since a great number of parameters are shared between them. Some params only work with certain shaders, like Phong effects, which are only available with  
VertexLitGeneric, but unfortunately you won't encounter any critical errors if a param isn't understood by the shader. It just won't have any effect.
 Tip:If you ever need to use a space or tab character in a parameter value, you must wrap the whole value with "quote marks". You'll often see absolutely everything wrapped like this - save yourself some typing, as that's unnecessary.
Tip:If you ever need to use a space or tab character in a parameter value, you must wrap the whole value with "quote marks". You'll often see absolutely everything wrapped like this - save yourself some typing, as that's unnecessary.Finding materials
SteamPipe
When Valve updated some games to SteamPipe, the materials were moved from GCF into VPK files. VPK Files work with  GCFScape.
 GCFScape.
More info on SteamPipe here
Non-SteamPipe Games
in non SteamPipe source games, Materials are stored in the 
materials\ folder of your game or mod. The best way to browse them is from  Hammer's texture selection screen.
 Hammer's texture selection screen.
If you want to edit or view the code of Valve's material files you will first need to extract them from their GCF package with  GCFScape. They tend to be stored in GCFs with 'materials' in their name.
 GCFScape. They tend to be stored in GCFs with 'materials' in their name.
Creating materials with XBLAH's Modding Tool
 XBLAH's Modding Tool can be used to create some types of materials.
 XBLAH's Modding Tool can be used to create some types of materials.
Where to find it
This can be accessed within the tool through Materials > Material Editor.
How to use it
When you are creating the material, the tool will create all the necessary files after the user selects the desired source images, either from a local bitmap resource or from a mounted vtf.
Selecting the Shader
Currently, the following shaders are supported:
If the mod runs on Mapbase branch, when saving the material, it will automatically add sdk_ to the shader name.
Selecting textures
When creating a new material, you can use existing textures, or use directly image files, without any prior conversion. Once you save the material, the tool will automatically compile the materials to the required format. To load a texture, right click the image preview of the desired texture, and click Open Texture to select an existing texture, or Import to load an image file. You can also export the current texture to an image format by right clicking the image preview, and clicking Export.
Generating Normal Maps
If the base texture has a bland color and dark and bright spots represent bevels, you can use the Generate Normal Map button to automatically create a normal map. This works for most cases.


























