Repository navigation
Export Nodes SourceIOVertexLitGenericVMTNode
Builds a VertexLitGeneric material (VMT) for a model: texture inputs, surface flags, phong/rim light, environment map, UV transforms and raw parameters. This is the main material node for props and characters.

| Input | VMT parameter | Group | Purpose |
|---|---|---|---|
| Base texture | $basetexture |
Textures | Diffuse/albedo colour. Alpha is used by $translucent, $alphatest and, unless a mask is linked, by $selfillum. |
| Detail texture | $detail |
Textures | Secondary texture tiled over the base. Blended according to Detail blend mode, Detail blend factor and Detail scale. |
| Normal texture | $bumpmap |
Normal | Tangent-space normal map. Alpha can carry a specular/phong or envmap mask (see the PBR to Phong node). |
| Phong exponent texture | $phongexponenttexture |
Phong | Per-texel phong data (R = exponent, G = albedo-tint mask, A = rim-light mask). When linked, $phongexponent is not written. |
| Ambient occlusion texture | $ambientocclusiontexture |
Phong | Baked ambient-occlusion map used by the shader. |
| Environment mask | $envmapmask |
Environment / Mask | Mask that controls where the $envmap reflection is visible. |
| Self-illumination mask | $selfillummask |
Surface / Alpha | Mask for $selfillum glow. Without it the engine uses the base texture alpha. |
All inputs are VTF sockets (single link each, not multi-input) and are optional: an unconnected input simply omits its VMT parameter. Each one accepts the output of a VTF Output node. You can also drag a Texture socket straight onto one of these inputs; SourceIO then inserts a VTF Output node for you, named <vmt path without .vmt>_<suffix>.vtf (albedo for $basetexture, otherwise the parameter name without $) with Normal map (linear) enabled for $bumpmap/$normalmap. Any other link type is removed. At export, a linked input that does not resolve to a VTF recipe raises " must resolve to a VTF Output recipe".
| Output | Type | Description |
|---|---|---|
| Material | Material | The rendered VMT text plus every VTF it references. Connect it to the Materials multi-input of a Source 1 model output (many materials allowed), or to its Skin families input (SourceIO then inserts a Skin family node that lists this VMT's name). |
| Control | Meaning |
|---|---|
Blender material (mat) |
The Blender Material this VMT replaces. Required: the node raises "VMT requires a Blender Material binding" without it. Mesh slots that use this Blender Material are exported under this VMT's file name; a mesh slot whose Blender Material has no linked VMT node stops the export with "No linked VMT bound to ... slot". |
VMT path under materials (vmt_path) |
Output path of the .vmt, relative to the game's materials/ folder (default models/props/material.vmt). A leading materials/ and the .vmt extension are normalised; absolute paths, .., : and quotes are rejected. The file stem becomes the material name in the QC, and the folder is added to $cdmaterials automatically. |
| Sync VMT to disk (button) | Writes only this node's .vmt to the game root of every Source 1 model output the node feeds, without encoding textures (VTF paths are still referenced). Errors if the node is not connected to a model output. |
Each group below is a collapsible box in the node. Textures, Surface / Alpha, Normal and Shader-specific start expanded, the rest start collapsed. Collapsing a group also hides that group's unlinked texture inputs, so open the group to see and connect them; linked inputs always stay visible.
Shows the link state of the texture inputs plus the detail controls:
| Control | Meaning |
|---|---|
$detailblendfactor |
Detail blend factor (default 1). Written only when it is not 1. |
$detailscale |
Detail texture scale (default 1). Written only when it is not 1. |
$detailblendmode |
Integer detail blend mode (default 0, the engine default). Written only when it is not 0; the meaning of each mode is defined by the Source engine. |
| Control | Meaning |
|---|---|
$model |
Written as "$model" "1" when enabled (default on). Required for materials used on models. |
$translucent |
Written as 1 when enabled. Alpha-blended transparency from the base texture alpha, so the base VTF needs an alpha-capable format (DXT5, RGBA8888, ...). |
$alphatest |
Written as 1 when enabled; pixels are cut out by alpha. |
$alphatestreference |
Only shown while $alphatest is on (0-1, default 0.5). Alpha cut-off, written as $alphatestreference. |
$nocull |
Written as 1 when enabled: draw both faces of every polygon. |
$selfillum |
Written as 1 when enabled: the surface glows independent of lighting. Uses the Self-illumination mask if linked, otherwise the base alpha (engine behaviour). |
$color2 |
RGB tint (0-1). Written as $color2 [r g b] only when it differs from white. |
$halflambert |
Written as 1 when enabled: softer wrap-around diffuse lighting. |
Shows the link state of the normal-related texture inputs; it has no value controls.
Also lists the link state of Phong exponent texture and Ambient occlusion texture.
| Control | Meaning |
|---|---|
$phong |
Master switch, written as 1. The other controls of this group are only shown, and only written, while it is on. |
$phongboost |
Specular intensity multiplier (default 1). Written whenever $phong is on. |
$phongexponent |
Constant shininess exponent (default 5). Written whenever $phong is on, unless a Phong exponent texture is linked (then it is omitted because it would override the per-texel exponent; the node shows a label saying so). |
$phongtint |
RGB specular tint (default white). Written as $phongtint [r g b] only when it differs from white. |
$phongalbedotint |
Shown only while the Phong exponent texture is linked. Tints phong by the base texture, masked by the exponent texture's G channel. Written as 1 only in that case. |
$phongfresnelranges |
Enables the Phong Fresnel ranges row below. |
| Phong Fresnel ranges | Three values (default 0, 0.5, 1) written as $phongfresnelranges [a b c] when the toggle above is on. |
$rimlight |
Written as 1 when enabled; reveals the two rows below. |
$rimlightboost |
Rim-light intensity (default 1), written together with $rimlight. |
$rimlightexponent |
Rim-light falloff exponent (default 4), written together with $rimlight. |
One toggle per texture slot; when a toggle is on, scale, rotation and translation appear and the transform is written as center .5 .5 scale <sx> <sy> rotate <rotation> translate <tx> <ty> (the rotation value is written unchanged; VMT rotation is in degrees). Defaults: scale (1, 1), rotation 0, translation (0, 0).
| Toggle | Applies to |
|---|---|
$basetexturetransform |
Base texture |
$bumptransform |
Normal map |
$detailtexturetransform |
Detail texture |
Also lists the link state of Environment mask.
| Control | Meaning |
|---|---|
$envmap |
Environment map name (for example env_cubemap or a cubemap VTF path). Empty by default; nothing in this group is written while empty. |
$envmaptint |
RGB tint of the reflection (default white). Written only with a non-empty $envmap and when not white. |
$envmapcontrast |
Reflection contrast (default 0). Written only when $envmap is set and the value is not 0. |
$envmapsaturation |
Reflection saturation (default 1). Written only when $envmap is set and the value is not 1. |
$normalmapalphaenvmapmask |
Use the normal map alpha as the envmap mask. Written as 1 only when $envmap is set. Needs a linked Normal texture and cannot be combined with a linked Environment mask (export error otherwise). |
| Control | Meaning |
|---|---|
Ordered raw VMT KV entries (raw_parameters) |
A Blender Text datablock whose content is KeyValues entries copied into the shader block verbatim and in order (duplicates and nested blocks are kept). Use it for any VMT parameter the node has no control for, e.g. "$surfaceprop" "metal". Parse errors abort the export; an entry that repeats a generated parameter (including a texture key of a linked input) is rejected as a conflict. |
Proxy KV entries (proxy_parameters) |
A Blender Text datablock holding entries for the Proxies block. Each entry must itself be a named KeyValues block (for example AnimatedTexture { ... }), otherwise the export fails with "Each Proxies entry must be a named KeyValues block". |
When a Source 1 model output builds the graph, this node produces one VMT: a "<shader>" block holding, in order, the texture parameters of linked inputs, then $model, $translucent, $alphatest, $nocull, $selfillum, $phong (those that are enabled), $alphatestreference, phong values, $envmap, $color2, the other typed parameters (detail, tint, UV transforms, shader-specific values), your raw entries and finally a Proxies block. The shader name is written in lower case. Parameters equal to their default are skipped so the file stays minimal. Every linked VTF is encoded by its VTF Output node and written to materials/<vtf path>.vtf next to the VMT under the model output's game root; two textures that map to the same path with different bytes, or two materials with the same VMT path and different text, abort the export.
Shader behaviour. VertexLitGeneric is the standard Source 1 shader for models and props: it is lit by the engine (ambient cube, dynamic lights, optional half-Lambert), and supports normal mapping, phong specular, rim light, environment-map reflections and self-illumination. It is the right choice for almost every prop, character or weapon material.
Texture and colour-space behaviour. The node does not convert colour. Colour textures (base, detail) are exported by their VTF Output node: with the default Linear space option the pixels are written unchanged and the VTF gets no sRGB flag (matching what vtex produces), which is what the engine expects for ordinary gamma-encoded 8-bit images. The Normal texture must come from a VTF Output with Normal map (linear) enabled (done automatically for auto-inserted outputs); the phong exponent, AO and mask textures are data and should keep Linear space on.
- Add an Image Source for your albedo, connect its Texture output to Base texture. SourceIO inserts a VTF Output named
<vmt>_albedo.vtf; open it and choose a format (DXT1 for opaque, DXT5 when you need alpha). - Connect a normal-map Image Source to Normal texture. The inserted VTF Output has Normal map (linear) ticked. If the map was authored for Blender (OpenGL, green up), pass it through Normal Map Ops with Flip Green first, because Source expects DirectX-style normals.
- For PBR-style sources, feed roughness/metalness and the normal map into PBR to Phong; connect its Phong exponent output (through a VTF Output) to Phong exponent texture and its Normal output (alpha = specular mask) to Normal texture. Open the Phong group and enable
$phong(and$phongalbedotintif you want metals tinted by the albedo). - Pick the Blender material that the mesh uses and set VMT path under materials, e.g.
models/props/crate/crate.vmt. - Connect Material to the Materials input of the Source 1 model output and click Export Materials (or Export/Compile); use Sync VMT to disk on the node to rewrite only the VMT while you iterate on parameters.
-
$phongonVertexLitGenericnormally needs a normal map or a phong mask to look right; without a Normal texture the mask has nothing to read from. -
$phongexponentis deliberately not written when Phong exponent texture is linked. -
$normalmapalphaenvmapmaskand a linked Environment mask are mutually exclusive, and the flag needs a linked Normal texture; violating either aborts the export. - Rim light, Fresnel ranges and albedo tint are only written while
$phongis enabled, even if their own toggles are left on. - Collapsed groups hide unlinked sockets but do not discard values: hidden parameters (for example in Phong or Environment) are still written if enabled.
- Anything not covered by a control can be added through Raw / Proxies, but a raw entry may not repeat a key the node already generates.