Valve Materail type (open with text pad)
super_vmt.vmt - commands below in one vmt file
Use simple templates:
simple_bsp_vmt.vmt - for bsps ("LightmappedGeneric")
simple_model_vmt.vmt - for models (”VertexLitGeneric")
-----------------------------------------
SHADER
-----------------------------------------
This article is written for the follow shaders, you MUST select only ONE
"LightmappedGeneric"
// use this ONLY for BSP brush surfaces
// this shader references the BSP brush lightmap points for light valves and builds gradient shades between each point as a lighting solution
”VertexLitGeneric"
// use this ONLY for models imported as props into source
// this shader calculates each vertice’s light valve and builds gradients shade between each point as a lighting solution
"UnlitGeneric"
// this material does not render lighting properties
// its surface will not be shaded or effect nearby materials
-----------------------------------------
MAIN PROPERTIES
-----------------------------------------
"$basetexture" " folder\texture "
// defines the base texture path from the \Materials folder eg “folder\texture"
"$surfaceprop" "concrete"
// defines the physics, sound effects and audio distortion of the material, see Scipts\surfaceproperties.txt
"%keywords" "texture_search"
// use to search and find keywords in the material browser
-----------------------------------------
NORMAL MAP PROPERTIES
-----------------------------------------
Normal maps tells the engine how to display the light hitting the polygons
3 color channels - Red – left to right, Green – up to down and Blue – depth
"$bumpmap" "folder\texture_normal"
defines the normal map texture path from the \Materials folder eg “folder\texture"
"$bumpscale" "1.0"
// use to scale the normal map texture
-----------------------------------------
REFLECTIVE PROPERTIES
-----------------------------------------
Materials like glass, metal, plastics, liquids and glossy surfaces like tiles or varnished wood
"$envmap" "env_cubemap"
// uses cubemaps for reflective textures, you can create you own, see below
"$envmaptint" "[.7 .7 .7]"
// RGB changes the hue of the reflection (the gradation of color within the visible spectrum)
// eg. a red material would tint the cubemaps red
$envmapcontrast" 0.5
// set the reflections contrast (the difference in visual properties\shade that makes an texture)
"$envmapsaturation" 0.3
// set the reflections saturation (the purity/intensity of the specific hue)
If you want have a reflection mask, choose ONE of the follow target paths
"$envmapmask" "folder/texture"
// use this if you want to target a separate texture to define the opacity mask (don’t use the alpha channel)
"$basealphaenvmapmask" 1
// use this if you want to target the basetexture's alpha channel to define the opacity mask
"$normalmapalphaenvmapmask" 1
// use this if you want to target the normal map texture’s alpha channel to define the opacity mask
// if you have a normal map you must put the reflective mask on its alpha channel
-----------------------------------------
TRANSPARENT PROPERTIES
-----------------------------------------
Materials like glass, plastics or liquids as well as fences or surfaces with gaps across it
"$translucent"1
// use the alpha channel of the $basetexture as transparency
//if the base texture's alpha channel is being used, you must change it so you can use this effect
"$alphatest" 1
// use to make the mask to run a hit test, so you can shoot through it
"$alpha" 0.5
// set the overall base texture's opacity, don’t use $translucency
"$additive" 1
// use to render the base texture additively (like a Photoshop effect)
-----------------------------------------
ILLUMINATION PROPERTIES
-----------------------------------------
This is used make a section or all of the material seem bright. Eg, a light bulb/sign that is on or LED lights on a computer prop (these objects should not be shaded). This does not cast light, it just blocks the section from being shaded so it appears brighter or renders in a dark place
"$selfillum" 1
//use the base texture's alpha channel to define the illumination across the surface
//if the base texture's alpha channel is being used, you must change it so you can use this effect
-----------------------------------------
OTHER PROPERTIES
-----------------------------------------
"$color" "[100 100 100]"
// use to scale the red, green, and blue channels of the material
"$nocull" 1
// use to make the texture render on the front and back sides
"$decal" 1
// use for textures that need be rendered as a decal
"$nodecal" 1
// use to apply no decals on the texture, like a fence or transparent material
"$decalscale" .25
// use .25 scale so the texture resolution matches hammer’s texture scale