$basetexture2: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (minoro)
Line 1: Line 1:
==Usage==
== Usage ==
 
* '''A second basetexture is used in combination with [[$basetexture]] for blending two materials on a brush displacement surface. '''
* '''A second basetexture is used in combination with [[$basetexture]] for blending two materials on a brush displacement surface. '''
* Used by the [[WorldVertexTransition]] shader to blend materials on [[Displacement]] surfaces (terrain).
* Used by the [[WorldVertexTransition]] shader to blend materials on [[Displacement]] surfaces (terrain).
Line 6: Line 5:
* See [[Displacement]] for further information.
* See [[Displacement]] for further information.


==VMT syntax and default values==
== VMT syntax and default values ==
  "[[WorldVertexTransition]]"
  "[[WorldVertexTransition]]"
  {
  {
Line 14: Line 13:
  }
  }


==Available values==
== Available values ==
 
=== $basetexture2 ===
===$basetexture2===
  "$basetexture" "Path/TextureA"  
  "$basetexture" "Path/TextureA"  
  "$basetexture2" "Path/TextureB"  
  "$basetexture2" "Path/TextureB"  
Line 23: Line 21:
* where '''<code>TextureB</code>''' is the 2nd basetexture filename; ie <code>TextureB.vtf</code>.  
* where '''<code>TextureB</code>''' is the 2nd basetexture filename; ie <code>TextureB.vtf</code>.  
   
   
 
=== $basetexturetransform2 ===
===$basetexturetransform2===
  "$basetexturetransform2" "center <float> <float> scale <float> <float> rotate <float> translate <float> <float>"
  "$basetexturetransform2" "center <float> <float> scale <float> <float> rotate <float> translate <float> <float>"
* Used with [[$basetexture2]] by the [[WorldVertexTransition]] shader to blend materials on [[Displacement]] surfaces (terrain).
* Used with [[$basetexture2]] by the [[WorldVertexTransition]] shader to blend materials on [[Displacement]] surfaces (terrain).
Line 32: Line 29:
* "translate" values are UV 0.1 coordinates.
* "translate" values are UV 0.1 coordinates.
* "rotate" values are 0-360 degree UV angles.  
* "rotate" values are 0-360 degree UV angles.  
* Note: You must include all variables.  
{{note|You must include all variables.}}


===$bumpbasetexture2withbumpmap===
=== $bumpbasetexture2withbumpmap ===
  $bumpbasetexture2withbumpmap <>
  $bumpbasetexture2withbumpmap <>
* {{todo|specify bumpmap to apply?}}
* {{todo|specify bumpmap to apply?}}


 
=== $texture2 ===
===$texture2===
  "$basetexture" "Path/TextureA"  
  "$basetexture" "Path/TextureA"  
  "$texture2" "Path/TextureB"  
  "$texture2" "Path/TextureB"  
* Used for the [[UnlitTwoTexture]] shader.
* Used for the [[UnlitTwoTexture]] shader.


==See Also==
== See also ==
* Tutorial [[Multiple Skins for a Single Model]]
* Tutorial [[Multiple Skins for a Single Model]]


[[Category:List of Shader Parameters]]
[[Category:List of Shader Parameters]]
[[Category:VMT Texture Reference]]
[[Category:VMT Texture Reference]]

Revision as of 01:47, 7 April 2008

Usage

  • A second basetexture is used in combination with $basetexture for blending two materials on a brush displacement surface.
  • Used by the WorldVertexTransition shader to blend materials on Displacement surfaces (terrain).
  • The percentage blend of each of the two basetextures is defined by alpha painting in Hammer.
  • See Displacement for further information.

VMT syntax and default values

"WorldVertexTransition"
{
   "$basetexture" "Path/TextureA" 
   "$basetexture2" "Path/TextureB" 
     "$basetexturetransform2" "center .5 .5 scale 1 1 rotate 0 translate 0 0"
}

Available values

$basetexture2

"$basetexture" "Path/TextureA" 
"$basetexture2" "Path/TextureB" 
  • where Path is the filepath relative to game_directory/materials folder.
  • where TextureA is the 1st basetexture filename; ie TextureA.vtf.
  • where TextureB is the 2nd basetexture filename; ie TextureB.vtf.

$basetexturetransform2

"$basetexturetransform2" "center <float> <float> scale <float> <float> rotate <float> translate <float> <float>"
  • Used with $basetexture2 by the WorldVertexTransition shader to blend materials on Displacement surfaces (terrain).
  • 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.pngNote:You must include all variables.

$bumpbasetexture2withbumpmap

$bumpbasetexture2withbumpmap <>
  • Todo: specify bumpmap to apply?

$texture2

"$basetexture" "Path/TextureA" 
"$texture2" "Path/TextureB" 

See also