$basetexture: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 1: Line 1:
'''The $basetexture shader parameter specifies the [[VTF]] texture to use for the basic 'skin' or diffusemap of the material surface.'''
==Usage==
* '''$basetexture specifies the [[VTF]] texture to use for the basic 'skin' or diffusemap of the material surface.'''
* If the basetexture.vtf has an alpha channel (ie it's 32bit rather than 24bit) this can be used as luminositymap ($selfillum).


==VMT syntax and default values ==
==VMT syntax and default values ==
  "$basetexture" "path/to/vtf"
  "$basetexture" "path/to/vtf"
  "$basetexturetransform" "center .5 .5 scale 1 1 rotate 0 translate 0 0"
   "$selfillum" 0
   "$selfillum" 0
     "$selfillumtint" ?
     "$selfillumtint" ?
  "$basetexturetransform" "center .5 .5 scale 1 1 rotate 0 translate 0 0"
 


==Available values==
==Available values==
Line 14: Line 17:
* where '''<code>TextureA</code>''' is the filename; ie <code>TextureA.vtf</code>.  
* where '''<code>TextureA</code>''' is the filename; ie <code>TextureA.vtf</code>.  
* Notice the <code>.vtf</code> file extension is not used in VMT texture references.
* Notice the <code>.vtf</code> file extension is not used in VMT texture references.
=====$basetexturetransform=====
"$basetexturetransform" "center <float> <float> scale <float> <float> rotate <float> translate <float> <float>"
* The default position is: <code>"center .5 .5 scale 1 1 rotate 0 translate 0 0"</code>.
* "center" values are UV 0.1 coordinates.
* "scale" values are UV factors.
* "translate" values are UV 0.1 coordinates.
* "rotate" values are 0-360 degree UV angles.
* Note: You must include all variables.


=====$selfillum=====
=====$selfillum=====
Line 24: Line 36:
* Used to adjust the color of [[$selfillum]].  
* Used to adjust the color of [[$selfillum]].  


=====$basetexturetransform=====
==Multiple VTFs==
"$basetexturetransform" "center <float> <float> scale <float> <float> rotate <float> translate <float> <float>"
* The default position is: <code>"center .5 .5 scale 1 1 rotate 0 translate 0 0"</code>.
* "center" and "translate" are in UV 0.1 coordinates, "rotate" is in angles.
* Note: You must include all variables.


=====$basetexture2=====
=====$basetexture2=====

Revision as of 10:56, 10 November 2007

Usage

  • $basetexture specifies the VTF texture to use for the basic 'skin' or diffusemap of the material surface.
  • If the basetexture.vtf has an alpha channel (ie it's 32bit rather than 24bit) this can be used as luminositymap ($selfillum).

VMT syntax and default values

"$basetexture" "path/to/vtf"
  "$basetexturetransform" "center .5 .5 scale 1 1 rotate 0 translate 0 0"
  "$selfillum" 0
    "$selfillumtint" ?


Available values

$basetexture
"$basetexture" "Path/TextureA" 
  • where Path is the filepath relative to game_directory/materials folder.
  • where TextureA is the filename; ie TextureA.vtf.
  • Notice the .vtf file extension is not used in VMT texture references.
$basetexturetransform
"$basetexturetransform" "center <float> <float> scale <float> <float> rotate <float> translate <float> <float>"
  • The default position is: "center .5 .5 scale 1 1 rotate 0 translate 0 0".
  • "center" values are UV 0.1 coordinates.
  • "scale" values are UV factors.
  • "translate" values are UV 0.1 coordinates.
  • "rotate" values are 0-360 degree UV angles.
  • Note: You must include all variables.
$selfillum
"$selfillum" 1
  • Uses $basetexture's alpha channel to set minumum clamps on the lighting.


$selfillumtint
"$selfillumtint" ?

Multiple VTFs

$basetexture2
"$basetexture" "Path/TextureA" 
"$basetexture2" "Path/TextureB" 
  • Used by the WorldTwoTextureBlend shader to blend materials on Displacement surfaces (terrain).
  • The percentage blend of each of the two basetextures is defined by alpha painting in Hammer.
$basetexturetransform2
"$basetexture2" "Path/TextureB" 
"$basetexturetransform2" "center <float> <float> scale <float> <float> rotate <float> translate <float> <float>"
  • Used with $basetexture2 by the WorldTwoTextureBlend shader to blend materials on Displacement surfaces (terrain).
  • The default position is: "center .5 .5 scale 1 1 rotate 0 translate 0 0".
  • "center" and "translate" are in UV 0.1 coordinates, "rotate" is in angles.
  • Note: You must include all variables.
$texture2
"$basetexture" "Path/TextureA" 
"$texture2" "Path/TextureB" 


See Also