VMT
Материал это текстовый .vmt
файл содержащий описание двумерных текстур. Это описание содержит всю необходимую движку информация для визуализации, рендеринга, построения физики. VMT расшифровывается как "Valve Material Type" (Тип Материала Valve) .
В описание материала могут входит все или некоторые следующие данные:
- Texture names
- Physical surface types
- Shader-specific parameters
- Fallbacks
- Proxies
Простой пример
LightmappedGeneric { $basetexture coast\shingle_01 $surfaceprop gravel }
Это очень простой shingle beach материал.
- Этот
LightmappedGeneric
код использует шейдеры, и означает что он предназначен для использования на поверхностях с lightmaps (лайтмапы) то есть на brushes (брашами). - The { character opens a set of parameters
- The
$basetexture
parameter is given withcoast\shingle_01
(a texture). This is what will be drawn on the screen. $surfaceprop
gives 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. But some params only work with certain shaders - for instance, Phong effects are only available with VertexLitGeneric
. The good news is that you won't encounter any critical errors if a param isn't understood by the shader.

Finding materials
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.
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.
See also
- Creating a Material
- Notepad++ syntax highlighting for materials
- $basetexture
- $envmapmask (specular mask)
- $envmap (environment map)
- $phong (diffuse reflection)
- $selfillum