$envmap: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (This parameter is not limited to env_cubemap - other textures work as well.)
(Updated entire list according to Koders Code Search.)
Line 1: Line 1:
The $envmap [[VMT]] parameter defines the environment map of a material, normally reflecting the nearest [[env_cubemap]].
The $envmap [[VMT]] parameter defines the environment map of a material, normally reflecting the nearest [[env_cubemap]].


=== Basic VMT Syntax===
== Basic VMT Syntax==
  "$envmap" "texture"
  "$envmap" <texture>
* This is the texture to use as the environment map. Normally this is set to "env_cubemap".
* This is the texture to use as the environment map (envmap).
* Normally <nowiki><texture></nowiki> is set to ''"env_cubemap"''.




=== Additional Parameters ===
== Additional Parameters ==


==== Adjust overall reflection color & contrast ====


=====$envmapcontrast=====
=== Adjust overall reflection color & contrast ===
"$envmapcontrast" float
* Scales the dynamic range of the reflected env_cubmap.
* Use higher contrasts to diminish relatively darker areas, increase "hot spots".
* contrast 0 == normal 1 == color*color.


=====$envmapsaturation=====
====$envmapcontrast====
  "$envmapsaturation" float
  "$envmapcontrast" <float>
* Scales the colour intensity of the [[$envmap]].  
* Controls the contrast (i.e. dynamic range) of the map.
* saturation 0 == greyscale 1 == normal  
* The parameter accepts a value between ''0'' and ''1'', where ''0'' is the normal contrast, and ''1'' is the full squaring of the color (color*color).
* Use higher contrasts to diminish relatively darker areas and increase "hot spots".


=====$envmaptint=====
 
====$envmapsaturation====
"$envmapsaturation" <float>
* Controls the saturation of the map.
* The parameter accepts a value between ''0'' and ''1'', where ''0'' is 100% greyscale, and ''1'' is normal saturation.
 
 
====$envmaptint====
  "$envmaptint" "[float float float]"
  "$envmaptint" "[float float float]"
* Scales the red, green, and blue components of the [[$envmap]].  
* Controls the tint (red, green and blue components) of the map.
* The default is ''"[1 1 1]"''.




====Specular masking====
===Specular masking===


=====$envmapmask=====
====$envmapmask====
  "$envmapmask" "texture"
  "$envmapmask" <texture>
* Masks the [[$envmap]] according to the alpha channel of the named <code>"texture"</code>.
* Masks the map according to the alpha channel of the named <code><texture></code>.


=====$basealphaenvmapmask=====
"$basealphaenvmapmask" 1
* Masks the [[$envmap]] according to the alpha channel of the [[$basetexture]].


=====$normalmapalphaenvmapmask=====
====$basealphaenvmapmask====
  "$normalmapalphaenvmapmask" 1
  "$basealphaenvmapmask" <flag>
* Masks the [[$envmap]] according to the alpha channel of the [[$bumpmap]].
* The default value is ''1''.
* Masks the envmap according to the alpha channel of the [[$basetexture]] texture.  


=====$envmapmaskscale=====
"$envmapmaskscale" float
* Scales the [[$envmapmask]] by the <code>float</code> value.
* dx8


=====$envmaskframe=====
====$normalmapalphaenvmapmask====
  "$envmaskframe"  
  "$normalmapalphaenvmapmask" <flag>
* (to do ...)
* The default value is ''1''.
* Masks the envmap according to the alpha channel of the [[$bumpmap]] texture.


==== TO DO ... help required ====


=====$envmaptransform=====
====$envmapmasktransform====
  "$envmaptransform"  
  "$envmapmasktransform" <matrix>
* dx9
* ?
* The default is "center .5 .5 scale 1 1 rotate 0 translate 0 0".
* DirectX 9 or HDR required. (LightmappedGeneric, VertexlitGeneric, UnlitGeneric)
* Also see [[$envmapmaskscale]].


=====$envmapframe=====
"$envmapframe"
*


=====$envmapmode=====
====$envmapmaskscale====
  "$envmapmode" 1
  "$envmapmaskscale" <float>
*  
* Scales the [[$envmapmask]] by the <nowiki><float></nowiki> value.
* DirectX 8 required. (LightmappedGeneric, VertexlitGeneric, UnlitGeneric)
* Also see [[$envmapmasktransform]].


=====$envmapsphere=====
"$envmapsphere" 1
*


=====$basetexturenoenvmap=====
====$envmapmaskframe====
  "$basetexturenoenvmap"  
  "$envmapmaskframe" <integer>
* dx9
* ?
* see also [[$basetexture]]


=====$basetexture2noenvmap=====
"$basetexture2noenvmap"
* dx9
* see also [[$basetexture2]]


=== See Also ===
 
=== Other parameters ===
 
====$envmapframe====
"$envmapframe" <integer>
* ?
 
 
====$envmapmode====
"$envmapmode" <flag>
* Default is ''1''.
 
 
====$envmapsphere====
"$envmapsphere" <flag>
* Default is ''1''.
 
 
====$basetexturenoenvmap====
"$basetexturenoenvmap" <boolean>
* Default is ''0''.
* DirectX 9 required.
* See also [[$basetexture]].
 
 
====$basetexture2noenvmap====
"$basetexture2noenvmap" <boolean>
* Default is ''0''.
* DirectX 9 required.
* See also [[$basetexture2]].
 
 
 
== See Also ==
* [[DirectX Versions]]  
* [[DirectX Versions]]  
* Tutorial: [[Cubemap]]s in Level Design.
* Tutorial: [[Cubemap]]s in Level Design.
* Tutorial: [[Reflective Materials]]
* Tutorial: [[Reflective Materials]]


[[Category:List of Shader Parameters]]
[[Category:List of Shader Parameters]]
[[Category:VMT Reflections]]
[[Category:VMT Reflections]]
[[Category:Stubs]]
[[Category:Stubs]]

Revision as of 14:30, 22 January 2008

The $envmap VMT parameter defines the environment map of a material, normally reflecting the nearest env_cubemap.

Basic VMT Syntax

"$envmap" <texture>
  • This is the texture to use as the environment map (envmap).
  • Normally <texture> is set to "env_cubemap".


Additional Parameters

Adjust overall reflection color & contrast

$envmapcontrast

"$envmapcontrast" <float>
  • Controls the contrast (i.e. dynamic range) of the map.
  • The parameter accepts a value between 0 and 1, where 0 is the normal contrast, and 1 is the full squaring of the color (color*color).
  • Use higher contrasts to diminish relatively darker areas and increase "hot spots".


$envmapsaturation

"$envmapsaturation" <float>
  • Controls the saturation of the map.
  • The parameter accepts a value between 0 and 1, where 0 is 100% greyscale, and 1 is normal saturation.


$envmaptint

"$envmaptint" "[float float float]"
  • Controls the tint (red, green and blue components) of the map.
  • The default is "[1 1 1]".


Specular masking

$envmapmask

"$envmapmask" <texture>
  • Masks the map according to the alpha channel of the named <texture>.


$basealphaenvmapmask

"$basealphaenvmapmask" <flag>
  • The default value is 1.
  • Masks the envmap according to the alpha channel of the $basetexture texture.


$normalmapalphaenvmapmask

"$normalmapalphaenvmapmask" <flag>
  • The default value is 1.
  • Masks the envmap according to the alpha channel of the $bumpmap texture.


$envmapmasktransform

"$envmapmasktransform" <matrix>
  • ?
  • The default is "center .5 .5 scale 1 1 rotate 0 translate 0 0".
  • DirectX 9 or HDR required. (LightmappedGeneric, VertexlitGeneric, UnlitGeneric)
  • Also see $envmapmaskscale.


$envmapmaskscale

"$envmapmaskscale" <float>


$envmapmaskframe

"$envmapmaskframe" <integer>
  • ?


Other parameters

$envmapframe

"$envmapframe" <integer>
  • ?


$envmapmode

"$envmapmode" <flag>
  • Default is 1.


$envmapsphere

"$envmapsphere" <flag>
  • Default is 1.


$basetexturenoenvmap

"$basetexturenoenvmap" <boolean>


$basetexture2noenvmap

"$basetexture2noenvmap" <boolean>


See Also