$envmap: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
TomEdwards (talk | contribs) No edit summary |
||
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]]. | ||
This creates 'specular' reflections, for use on smooth surfaces. | |||
== Basic VMT Syntax== | == Basic VMT Syntax== | ||
$envmap <texture or "env_cubemap"> | |||
env_cubemap is normally used, as it tells [[Vbsp|VBSP]] to substitute it for the name of the nearest [[env_cubemap]] entity when the map compiles. However, it is also possible to enter the name of a texture directly. | |||
== Additional Parameters == | == Additional Parameters == | ||
; <code>$envmapcontrast <[[normal]]></code> | |||
: Controls the [[Wikipedia:Contrast (vision)|contrast]] of the reflection. | |||
: 0 is the normal contrast, while 1 is the full squaring of the color (i.e. color*color). | |||
: {{tip|Use higher contrasts to diminish relatively darker areas and increase "hot spots".}} | |||
; <code>$envmapsaturation <normal></code> | |||
: Controls the colour saturation of the reflection. | |||
: 0 is greyscale, while 1 is normal saturation. | |||
; <code>$envmapmask <texture></code> | |||
: See [[$envmapmask]]. | |||
; <code>$envmaptint "[<red float> <green float> <blue float>]"</code> | |||
: Controls the colour tint (red, green and blue channels) of the reflection. Any positive number can be used. | |||
: Default value is <code>"[1 1 1]"</code>. You must use quotemarks. | |||
: {{tip|This command is useful for controlling the brightness of a specular reflection without an <code>[[$envmapmask]]</code>.}} | |||
; <code>$envmapframe <[[integer]]></code> | |||
: The frame of an animated texture to use for reflections. | |||
; <code>$envmapmode <[[int]]?></code> | |||
: {{todo|?}} | |||
; <code>$envmapsphere <[[bool]]></code> | |||
: {{todo|Probably related to using spheremaps instead of cubemaps. How is this useful?}} | |||
; <code>$basetexturenoenvmap <bool></code> | |||
; <code>$basetexture2noenvmap <bool></code> | |||
: {{todo|What do they do?}} | |||
: Require DirectX 9. | |||
: See also [[$basetexture]] and [[$basetexture2]]. | |||
;<code>$envmapoptional <choices></code> | |||
: Sets the oldest DirectX version that should draw the reflection. Choose from: | |||
:*<code>80</code> (DirectX 8) | |||
:*<code>81</code> (DirectX 8.1) | |||
:*<code>90</code> (DirectX 9) | |||
:*<code>95</code> (DirectX 9 with Shader Model 3) | |||
:*<code>98</code> (DirectX 9 with DirectX 10 hardware) | |||
* | |||
== See Also == | == See Also == | ||
Line 76: | Line 47: | ||
* 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:VMT Lighting]] | [[Category:VMT Lighting]] |
Revision as of 05:22, 9 July 2008
The $envmap VMT parameter defines the 'environment map' of a material, normally reflecting the nearest env_cubemap.
This creates 'specular' reflections, for use on smooth surfaces.
Basic VMT Syntax
$envmap <texture or "env_cubemap">
env_cubemap is normally used, as it tells VBSP to substitute it for the name of the nearest env_cubemap entity when the map compiles. However, it is also possible to enter the name of a texture directly.
Additional Parameters
$envmapcontrast <normal>
- Controls the contrast of the reflection.
- 0 is the normal contrast, while 1 is the full squaring of the color (i.e. color*color).
Tip:Use higher contrasts to diminish relatively darker areas and increase "hot spots".
$envmapsaturation <normal>
- Controls the colour saturation of the reflection.
- 0 is greyscale, while 1 is normal saturation.
$envmapmask <texture>
- See $envmapmask.
$envmaptint "[<red float> <green float> <blue float>]"
- Controls the colour tint (red, green and blue channels) of the reflection. Any positive number can be used.
- Default value is
"[1 1 1]"
. You must use quotemarks. Tip:This command is useful for controlling the brightness of a specular reflection without an
$envmapmask
.$envmapframe <integer>
- The frame of an animated texture to use for reflections.
$envmapmode <int?>
- Todo: ?
$envmapsphere <bool>
- Todo: Probably related to using spheremaps instead of cubemaps. How is this useful?
$basetexturenoenvmap <bool>
$basetexture2noenvmap <bool>
- Todo: What do they do?
- Require DirectX 9.
- See also $basetexture and $basetexture2.
$envmapoptional <choices>
- Sets the oldest DirectX version that should draw the reflection. Choose from:
80
(DirectX 8)81
(DirectX 8.1)90
(DirectX 9)95
(DirectX 9 with Shader Model 3)98
(DirectX 9 with DirectX 10 hardware)
See Also
- DirectX Versions
- Tutorial: Cubemaps in Level Design.
- Tutorial: Reflective Materials