Category:Material System
Jump to navigation
Jump to search
Introduction
In Source, the Material System defines how the visible surfaces of an object are rendered on the Player's screen.
- Each Valve Texture Format (VTF) file, is basically a raster image file or pixel-map. Most material surfaces will layer several VTFs together, each containing a different type of surface information; for example, in addition to the colormap, a material may also use a normalmap, specularmap, opacitymap, luminositymap, etc. All the separate frames of an Animated Texture can be stored in single VTF file.
- A VTF must be decompiled before it can be edited with an image editor.
- Each Valve Material Type (VMT) file specifies which VTF Textures to use to 'paint the polygons', which Shader (and Shader Parameters) to use for rendering those Textures, and a few surface collision effects such as the sounds and decals to use when bullet hits the surface. A Material file needs to specify at least two things: a Texture and a Shader.
- A VMT file is an uncompiled script that can be tweaked and edited with any text editor.
- Each Shader is a specific routine in the the Rendering Engine used to translate all the texture and lighting (etc) information into screen pixels. In Source, Per-Object Shaders are applied to Material Surfaces (eg Lightmappedgeneric, Vertexlitgeneric, Water) and Post Process Shaders are applied to the Player's Viewport (eg Bloom, Sepia, Fog). The Material System is only concerned with Per-Object Shaders.
- Editing Shaders is a bit of a dark art.
- Each object's UV map takes the name of one or more VMT files, and maps pixels from all the Texture layers specified for that Material to the appropriate polygons.
- A UV map is part of an object's Geometry, see UV mapping for more info on editing UV maps.
Generally a Brush Material refers to a VMT designed for use with World Brushes (stored in game_dir/materials/
), and a Skin is a VMT designed to be mapped onto a particular Model (stored in game_dir/materials/models
). A Texture is a VTF file, used by either a Brush Material or a Skin - but rarely both. VTFs are usually stored in the same folder as the VMTs that use them.

Basics
- Creating a Texture using VTFEdit - The basics of VTF creation.
- Materials for Models - These are slightly different to Brush Materials.
- Materials for Brush Displacements - These are slightly different to ordinary Brush Materials.
- Materials for Sprites - Slightly different again.
- Decals - How to make decal and overlay materials.
- Skybox (2D) - How to use and make the cubemap textures used by the toolsskybox material.
- Animated Textures.
- Special Tool texture materials for invisble walls, etc.
Advanced topics
- Material Proxies - Advanced materials that can vary based on changing data.
- Water Shader - Description of the special water shader.
- Half-Life 2 Shader Fallbacks - Fallback settings of Half-Life 2 shaders on different platforms.
- DirectX Versions - How shaders are rendered on different versions of DirectX.
Useful applications
Subcategories
This category has the following 5 subcategories, out of 5 total.
Pages in category "Material System"
The following 133 pages are in this category, out of 133 total.
3
A
C
- Character Textures and Materials
- Clip texture
- Color Correction
- CompileBlockLOS
- CompileClip
- CompileDetail
- CompileFog
- CompileLadder
- CompileNoDraw
- CompileNoLight
- CompileNPCClip
- CompileSkip
- CompileSlime
- CompileTeam
- CompileTrigger
- CompileWater
- Creating a Material
- Creating a Waterfall Material
- Creating Animated Clouds
- Custom Testchamber Signs