Vertexlitgeneric shader reference sheet !

Got problems with your models? Struggling with textures? Get help with your custom assets.

Useful

Yes
2
67%
No
1
33%
Somewhat
0
No votes
 
Total votes : 3

Vertexlitgeneric shader reference sheet !

Postby cra0kalo on Fri Aug 03, 2012 11:41 pm

Ok took me a while to do this hope its useful for when creating new models or assets for your maps/mods/whatever.
Just through this into a blank .vmt file and work from there, comment out what you don't need.

Code: Select all
"VertexlitGeneric"
{
// VertexlitGeneric shader params Source2009 (OB) - L4D2

//    Base diffuse texture
   "$basetexture" "models/cra0kalo/basetexture"
   
//    Compression wrinklemap   
   "$compress"   "models/cra0kalo/basetexture"

//    Expansion wrinklemap
   "$stretch"   "models/cra0kalo/basetexture"
   
   // ------------------------------------
   // Bump Map and normal maps
   // ------------------------------------
   
//    Bump map
   "$bumpmap"   "models/cra0kalo/basetexture"   

// Bump map has the specular map in the alpha channel
   "$normalmapalphaenvmapmask" 1   
   
//   Compression bump map
   "$bumpcompress""models/cra0kalo/basetexture"   
   
//    Expansion bump map
   "$bumpstretch"   "models/cra0kalo/basetexture"
   
//   Frame number for $bumpmap
   "$bumpframe"   "0"   
   
//   Bumpmap texcoord transform   
   "$bumptransform"   "center .5 .5 scale 1 1 rotate 0 translate 0 0"   
   
   // ------------------------------------
   // Specular lighting and reflections
   // ------------------------------------
//   Reflection environment map
   "$envmap"   "env_cubemap"      
   
//    Reflection cubemap
   "$envmap"   "models/cra0kalo/basetexture"
   "$envmapframe"   "0"
   
// Specular map (note that this does NOT work when using a bumpmap, instead place in the alpha of bump)
   "$envmapmask"   "models/cra0kalo/basetexture"
   "$envmapmaskframe"   "0"
   
// Specular texcoord transform      
   "$envmapmasktransform"   "center .5 .5 scale 1 1 rotate 0 translate 0 0"
   
// Specular tint
   "$envmaptint" "[1 1 1]"

// Specular contrast
   "$envmapcontrast"   "0"
   
// Specular saturation   
   "$envmapsaturation"   "1"
   
// Degree to which Fresnel should be applied to env map
   "$envmapfresnel"   "0"
   
   // ------------------------------------
   // Phong
   // ------------------------------------   
// Phong enabled?
   "$phong" "1"
   
// Phong exponent for local specular lights   
   "$phongexponent" "1"
   
// Phong tint for local specular lights
   "$phongtint" "[1 1 1]"
   
// Apply tint by albedo (controlled by spec exponent texture)
   "$phongalbedotint"   "1"
   
// Warp the specular term
   "$phongwarptexture"   "models/cra0kalo/basetexture"   
   
// Parameters for remapping fresnel output
   "$phongfresnelranges" "[0 0.5 1]"
   
// Phong overbrightening factor (specular mask channel should be authored to account for this)   
   "$phongboost"   "1"
   
// Phong Exponent map
   "$phongexponenttexture" "models/cra0kalo/basetexture"
   
// Indicates that there is no normal map and that the phong mask is in base alpha   
   "$basemapalphaphongmask"   "0"
   
// Invert the phong mask (0=full phong, 1=no phong)
   "$invertphongmask"   "0"
   
   // ------------------------------------
   // Rim lighting
   // ------------------------------------      
// Rim enabled?
   "$rimlight" "1"   
   
// Exponent for rim lights   
   "$rimlightexponent" "4"

// Boost for rim lights
   "$rimlightboost" "1"
   
// Indicates whether or not to use alpha channel of exponent texture to mask the rim term
   "$rimmask" "1"
   
   // ------------------------------------
   // Detail map
   // ------------------------------------         
// Detail texture
   "$detail" "models/cra0kalo/basetexture"
   "$detailframe" "0"   

// Scale of the detail texture
   "$detailscale" "4"      
   
// Mode for combining detail texture with base. 0=normal, 1= additive, 2=alpha blend detail over base, 3=crossfade
   "$detailblendmode" "2"
   
// Blend amount for detail texture   
   "$detailblendfactor" "1"
   
// Detail texture tint
   "$detailtint" "[1 1 1]"

// $detail texcoord transform
   "$detailtexturetransform"   "center .5 .5 scale 1 1 rotate 0 translate 0 0"   

   // ------------------------------------
   // Self-illumination
   // ------------------------------------      
// Enabled?
   "$selfillum" "1"

// Self-illumination tint
   "$selfillumtint" "[1 1 1]"

// Defines that self illum value comes from env map mask alpha
   "$selfillum_envmapmask_alpha" "0"

// Self illum fresnel
   "$selfillumfresnel" "1"

// If we bind a texture here, it overrides base alpha (if any) for self illum
   "$selfillummask"   "models/cra0kalo/basetexture"   

   // ------------------------------------
   // Flesh Interior
   // ------------------------------------   

// Flesh (used in hl2 ep2 on Alyx)
   "$FleshInteriorEnabled"      "1" // Enable Flesh interior blend pass
   "$FleshInteriorTexture"      "models/cra0kalo/basetexture" // Flesh color texture (Mask in alpha)
   "$FleshNormalTexture"       "models/cra0kalo/basetexture_flesh_normal"   // Flesh normal texture
   "$FleshBorderTexture1D"      "models/cra0kalo/basetexture_flesh_border"   // Flesh border 1D texture
   "$FleshInteriorNoiseTexture" "Engine/noise-blur-256x256"   //Flesh noise texture
   "$FleshSubsurfaceTexture"    "models/cra0kalo/basetexture_flesh_subsurface"   // Flesh subsurface texture
   "$FleshSubsurfacetint"       "[1 1 1]"   // Subsurface Color
   "$FleshCubeTexture"          "env_cubemap"   // Flesh cubemap texture
   "$FleshDebugforcefleshon"    "0"   // Flesh Debug full flesh
   "$FleshBorderNoiseScale"     "3" // Flesh Noise UV scalar for border
   "$FleshBorderWidth"          "0.2" // Width of flesh border
   "$FleshBorderSoftness"       "0.5" // Border softness must be greater than 0.0 and up tp 0.5
   "$FleshBorderTint"          "[.2 .2 .4]" // Tint / brighten the border 1D texture
   "$FleshGlobalopacity"       "1.0"  // Flesh global opacity
   "$FleshGlossBrightness"       "1.0" // Change the brightness of the glossy layer
   "$FleshScrollSpeed"          "1.0" // Flesh scroll speed
   "$Time" "0.0"

   "$FleshEffectcentreradius1"      "[0 0 0 0.001]"      // Flesh effect center and radius
   "$FleshEffectcentreradius2"      "[0 0 0 0.001]"      // Flesh effect center and radius 2
   "$FleshEffectcentreradius3"      "[0 0 0 0.001]"      // Flesh effect center and radius 3
   "$FleshEffectcentreradius4"      "[0 0 0 0.001]"      // Flesh effect center and radius 4
   
   // ------------------------------------
   // Other misc
   // ------------------------------------      
   
// Ambient Occlusion   
   "$ambientocclusion" "1"   
   
// Halflambert   
   "$halflambert" "1"
   
// Lightwarp texture (1D ramp texture for tinting scalar diffuse term)
   "$lightwarptexture" "models/cra0kalo/slime/slime_illu"

// Ambient (Control drawing of non-ambient light)
   "$ambientonly"   "0"

// Flashlight pass sets N.L=1.0
   "$flashlightnolambert"   "0"
   
//    Alpha test reference -controls the 'fuzziness' of the transparency masking Using lower values like .01 will result in a more blurred and fuzzy edge
//Using lower values like .01 will result in a more blurred and fuzzy edge while a value of .99 will be extremely sharp.
   "$alphatestreference"   "0.0"
   
   
   
   
   // Model options
   "$model" 1
   "$nocull" 1
   "$nodecal" 1
   "$nolod" 1
   "$translucent" 1
   "$alphatest" 1   
   
   // ------------------------------
   // End of commands
}

Cra0kalo
CG Artist/3D Animator
http://cra0kalo.com

Lead of Operation Reaper
http://projectreaper.com

Lead of the "Dark Alley" Project
http://alleyproject.net
User avatar
cra0kalo
Regular
Regular
 
Joined: Thu Apr 28, 2011 2:35 am

Re: Vertexlitgeneric shader reference sheet !

Postby kraid on Sat Aug 04, 2012 8:21 am

Some nice ones in there i didn't even know they existed, e.g. envmapfresnel.
(that's not even documented on the wiki yet)

Not sure if all the commands will work on every engine version.
Goldeneye Source v4.2.3
get it now and play for FREE!!!
http://www.goldeneyesource.net
kraid
Been Here A While
Been Here A While
 
Joined: Thu Jan 22, 2009 12:09 pm

Return to Custom Asset Help

Who is online

Users browsing this forum: No registered users