$envmap: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
TomEdwards (talk | contribs)  (→Additional Parameters:  something to do with DX6 -> deleted)  | 
				Russian box (talk | contribs)  m (→See Also:  more links)  | 
				||
| Line 54: | Line 54: | ||
* Tutorial: [[Cubemap]]s in Level Design.  | * Tutorial: [[Cubemap]]s in Level Design.  | ||
* Tutorial: [[Reflective Materials]]  | * Tutorial: [[Reflective Materials]]  | ||
* [[$basetexture]]  | |||
* [[$envmapmask]] (specular mask)  | |||
* [[$phong]] (diffuse reflection)  | |||
* [[$selfillum]]  | |||
[[Category:List of Shader Parameters|E]]  | [[Category:List of Shader Parameters|E]]  | ||
[[Category:VMT Reflections]]  | [[Category:VMT Reflections]]  | ||
Revision as of 20:32, 12 July 2008
The $envmap VMT parameter defines the 'environment map' of a material, normally reflecting the nearest env_cubemap.
This creates 'specular' reflections (seen on smooth surfaces).
VMT syntax
$envmap 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>- Texture which determines reflection intensity. 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: ?
 $basetexturenoenvmap <bool>$basetexture2noenvmap <bool>- Probably used for materials with two albedos, to make one or the other matte.
 - Require DirectX 9; see also 
$basetextureand$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)
 
Console commands
buildcubemaps- Generates cubemaps for use in materials. If this isn't run, objects will reflect the skybox (OB) or have an invalid, white reflection (Ep1).
 - Click for more details and further commands.
 r_showenvcubemap <bool>- Debug command to display cubemaps on all dynamic objects at full intensity. It was used to create the image at the start of this article.
 
See Also
- DirectX Versions
 - Tutorial: Cubemaps in Level Design.
 - Tutorial: Reflective Materials
 - $basetexture
 - $envmapmask (specular mask)
 - $phong (diffuse reflection)
 - $selfillum