Repository navigation
Sample Proxies
Proxies are .vmt code that allows manipulating the properties of a material.
ColorSlot1 is the proxy used, in this case, Slot 1.
name is the string to be displayed ingame.
fcolor the internal default vector color used on this material.
resultVar is where the vector color will be used, most cases used to set $color2, but can also be used with $phongtint to tint phong or even $envmaptint to control the envmap reflections.
Each .vmt can have its own proxy from 1 to 7: There are 7 total proxies included with this tool.
- ColorSlot1
- ColorSlot2
- ColorSlot3
- ColorSlot4
- ColorSlot5
- ColorSlot6
- ColorSlot7
Treat each one like a "slot". You can have two or more of the same proxy on one model, but the name argument will be overridden by the last loaded one.
You may also have two or more proxies in one vmt. Example: ColorSlot1 sets $color2 and ColorSlot2 sets $envmaptint:
Proxies
{
"ColorSlot1" // use the 1st color slot
{
name "Color" // ID Name (displayed in the proxy color swep)
fcolor "0.111 0.512 0.337" // default color vector (RGB)
resultVar $color2 // tint $color2 parameter
}
"ColorSlot2" // use the 2nd color slot
{
name "Reflection Color" // ID Name (displayed in the proxy color swep)
fcolor "0.1 0.1 0.1" // default color vector (RGB)
resultVar $envmaptint // set $envmaptint parameter
}
}Most common is set each slot as a separated .vmt, as example a .vmt that change a car bumper color using Slot 1:
Proxies
{
"ColorSlot1"
{
name "Bumper"
fcolor "1.0 1.0 1.0"
resultVar $color2
}
}On the same model, a different .vmt that changes the rims colors using Slot 2:
Proxies
{
"ColorSlot2"
{
name "Rims"
fcolor "0.7 0.7 0.7"
resultVar $color2
}
}On the same model, into a single .vmt Color (Albedo) on Slot 5, Phong using Slot 6 and Reflections (EnvMap) at Slot 7:
"VextexLitGeneric" {
$model "1" // this texture is made for models, and not menu
$nodecal "0" // allow decals by default
$nocull "0" // render just the face frontside, set 1 to also render the "inside" of the mesh
$halflambert "0" // halflambert shading
$phongdisablehalflambert "1" // force disable halflambert, use with $halflambert 0
$blendtintcoloroverbase "1" // where to tint. 0 is under $basetexture. 1 is over the $basetexture (float 0 to 1)
$rimlight "0" // rimlight disabled
$surfaceprop "metal" // control the decal and sound on hit
$color2 " [ 1 1 1 ] " // Default diffuse color vector used when the addon is missing
$basetexture "shared/generic_base"
$bumpmap "shared/generic_normal"
$phongboost "10"
$phongexponent "3"
$phongtint " [ 1 1 1 ] " // Default phong color vector (fallback)
$phongfresnelranges " [ .1 1.8 2 ] " // works as XYZ intensity vectors
$envmap "env_cubemap" // Uses the map generated cubemaps
$envmaptint " [ .1 .1 .1 ] " // Default "reflection" color vector (fallback)
$envmapfresnel ".91" // optional, overrides "$phongfresnelranges" for reflection fresnel
Proxies
{
"ColorSlot5"
{
name "Albedo Color" // tint the $basetexture
fcolor "1 1 1" // Source Default color is White
resultVar $color2
}
"ColorSlot6"
{
name "Phong Color" // Tint Phong
fcolor "0.325490196 0.333333337 0.478431373"
resultVar $phongtint
}
"ColorSlot7"
{
name "EnvMap Color" // Reflections
fcolor "0.1 0.1 0.1"
resultVar $envmaptint
}
}
}As result you can get some pearly, iridescent, or even non-photorealistic effects:
![]() |
![]() |
|---|

