$envmap: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(+image)
Line 1: Line 1:
[[Image:Specular.jpg|thumb|right|Specular reflections.]]
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]].



Revision as of 06:52, 9 July 2008

Specular reflections.

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.pngTip: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.pngTip: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