VMT: Difference between revisions
TomEdwards (talk | contribs) mNo edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{mergeto|VMT}} | |||
A '''material''' is a <code>.VMT</code> text file in a mod's <code>materials/</code> folder that defines the appearance and behaviour of a surface. Its chief component is usually a [[Valve Texture Format]] image file, but it also includes information about how the surface reacts when walked on, shot, or applied to a physical object, what [[shader]](s) will draw it, what type of reflections to use, and potentially many, many other properties. | A '''material''' is a <code>.VMT</code> text file in a mod's <code>materials/</code> folder that defines the appearance and behaviour of a surface. Its chief component is usually a [[Valve Texture Format]] image file, but it also includes information about how the surface reacts when walked on, shot, or applied to a physical object, what [[shader]](s) will draw it, what type of reflections to use, and potentially many, many other properties. | ||
Revision as of 15:28, 4 April 2008
A material is a .VMT
text file in a mod's materials/
folder that defines the appearance and behaviour of a surface. Its chief component is usually a Valve Texture Format image file, but it also includes information about how the surface reacts when walked on, shot, or applied to a physical object, what shader(s) will draw it, what type of reflections to use, and potentially many, many other properties.
A simple example
LightmappedGeneric { $basetexture coast/shingle_01 $surfaceprop gravel }
This is an example of a material for use on brushes.
- It is drawn by the
LightmappedGeneric
shader - It displays
materials/coast/shingle_01.vtf
- It has the physical and reactive properties of gravel
A material for use on models would be identical except for the shader, which would be VertexLitGeneric
. Valve's stock shaders generally support the same set of parameters (commands starting with $
), allowing you to easily switch from one to another.
See Shader Types and Parameters for a full list of Valve's shaders, or Shader Authoring if you are interested in creating your own.