Get SFM ↗
Home / SFM Materials & Textures
06 / MATERIALS

SFM Materials & Textures

Understand VTF, VMT and texture search paths.

Realistic metal, wood, stone and surface material samples

Learn how mesh material names, QC search directories, VMT shader definitions and VTF image assets work together in the original Source engine.

Know the two files

VTF stores image data while VMT describes how the material is used. A mesh material name typically resolves to a VMT, which in turn references texture resources.

Organize materials

Keep custom materials in a dedicated subfolder of the game materials directory. Use consistent names, avoid accidental duplicate folders, and keep source image files outside the runtime folder.

Create a basic material

For a simple model, a VertexLitGeneric material can reference the base texture by its path relative to the materials directory, normally without the VTF extension.

Diagnose missing materials

Check the QC material search path, the mesh material assignment and the VMT texture reference. Test a simple diffuse material before introducing normal maps or complex shader parameters.

Trace the complete material lookup

A source mesh contains a material name. During model preparation, ensure that name corresponds to the VMT you intend to use. The compiled model searches the material directories identified by its configuration. The VMT in turn points to the VTF texture. Each link must be correct, even when all files are individually valid.

For example, a mesh using lamp can resolve to lamp.vmt under materials/models/mywork/lamp/. The VMT can then refer to models/mywork/lamp/lamp_diffuse. The latter path is relative to materials and normally excludes the .vtf extension.

Convert texture sources with an appropriate tool

Keep editable PNG, TGA or other image sources separate from the compiled game assets. Use a VTF-capable utility or compatible workflow to convert images into a format supported by the target Source branch. Check dimensions, alpha channel behavior and compression with your chosen tool. Preserve uncompressed originals for future edits.

For a first test, use a simple diffuse image without transparency. Once the material works, add normal maps, transparency or other effects individually. Not every shader parameter supported by another Source game will behave identically in SFM.

Choose a shader for the asset type

VertexLitGeneric is a common starting point for model materials. World geometry often uses different shader conventions, such as LightmappedGeneric. Select a shader based on the asset type and target branch, not merely because a copied material looked correct in another game. Test under more than one light condition.

Fix visible texture failures systematically

Start with the material name exported by the mesh. Next inspect the QC material directory, then the actual VMT location, then the basetexture value inside that VMT. Check the VTF exists and can be opened with a compatible utility. Look for accidental duplicate materials folders, extensions in the wrong place or assets installed into a directory that SFM does not search.

If a simple diffuse material works but an advanced version fails, compare the two files. Remove unsupported or mistyped options one at a time. Do not change the entire model build to debug a texture parameter.

Package textures with the model

A reusable custom model needs all of its required materials and textures. Build a clean package with the expected models and materials folder hierarchy. Include only files you have permission to redistribute, and list any required external content. Verify the package on a clean compatible setup when possible.

Basic VMT example

"VertexLitGeneric"
{
    "$basetexture" "models/mywork/lamp/lamp_diffuse"
}
FileRole
lamp.vmtShader and material settings
lamp_diffuse.vtfImage data
lamp_ref.smdMesh material name
lamp.qcMaterial directory instructions

Frequently asked questions

Can a PNG replace a VTF directly?

Not in the ordinary Source 1 runtime material workflow; convert it appropriately.

Should I add .vtf in basetexture?

Normally no. Use the path relative to materials without the extension.

Why does a material work in one game but not SFM?

Shader capabilities, file versions and search paths may differ.

References and next steps

Material reference · Error guide.