Difference between revisions of "$envmap"

From Valve Developer Community
Jump to: navigation, search
m
(Console commands)
 
(22 intermediate revisions by 8 users not shown)
Line 2: Line 2:
 
|zh-cn=$envmap:zh-cn
 
|zh-cn=$envmap:zh-cn
 
}}
 
}}
[[File:Specular.jpg|thumb|250px|Specular reflections.]]
+
[[File:Specular.jpg|thumb|250px|Specular reflections at full intensity.]]
 +
{{For|the set of material parameters used to mask specular reflections via textures|[[$envmapmask]]}}
  
The '''<code>$envmap</code>''' [[VMT]] parameter creates [[wikipedia:specular reflection|specular reflection]]s, which are seen on smooth surfaces. It does this by defining an "environment map" (specifically a [[cubemap]]) to draw as a reflection; normally that of the nearest [[env_cubemap]] entity. The reflection is not dynamic.
+
{{Shaderparam|$envmap}} It creates [[wikipedia:specular reflection|specular reflection]]s, which are seen on smooth surfaces. It does this by defining an "environment map" (specifically a [[cubemap]]) to draw as a reflection; normally that of the nearest {{ent|env_cubemap}} entity. The reflection is not dynamic.
  
{{bug|The '''<code>$envmap</code>''' parameter doesn't work in the latest [[Source]] engine version (v24) of '''Half-Life Source''' if it uses an [[env_cubemap]]. This is probably the reason Valve used the same static reflective image for every reflective texture in the game.}}
+
{{note|<code>$envmap</code> actually works in the latest [[Source]] engine version (v24) of {{game link|Half-Life: Source}} if it uses an <code>env_cubemap</code>. The issue actually comes from the <code>buildcubemaps</code> command, since if the cubemaps are built in another game and then the BSP is added into HL:S, they will work fine. Is not clear if in older versions there were more issues but due such problems, Valve used static reflective images for every reflective texture in the game.}}
  
The other form of reflection supported by Source is the diffuse [[$phong|phong]] type.
+
The other form of reflection supported by Source is the diffuse [[$phong|Phong]] type.
  
 
== Syntax==
 
== Syntax==
Line 15: Line 16:
 
</pre>
 
</pre>
  
"env_cubemap" is normally used, as it tells [[VBSP]] to swap in the name of the nearest [[env_cubemap]] when the map compiles. However it is also possible to use a static cubemap image that has been manually created.
+
"env_cubemap" is normally used, as it tells [[VBSP]] to swap in the name of the nearest <code>env_cubemap</code> when the map compiles. However it is also possible to use a static cubemap image that has been manually created.
  
 +
{{note|If <code>$envmap</code> is used without specifying {{ent|$basetexture}}, the specular reflections will be force drawn regardless of anything.}}
 
{{note|Most Cubemap textures will have no reflectivity when used as overlays or decals. It is unclear why this is so{{clarify}}.}}
 
{{note|Most Cubemap textures will have no reflectivity when used as overlays or decals. It is unclear why this is so{{clarify}}.}}
  
Line 23: Line 25:
 
Creating a custom cubemap texture might be required for some circumstances and is used occasionally in some Valve models.
 
Creating a custom cubemap texture might be required for some circumstances and is used occasionally in some Valve models.
  
=== In VTFLib===
+
=== In [[VTFEdit]]===
  
 
For this to work you will need to have the 6 sides of the cubemap saved as individual textures in the correct orientation for it to appear correctly in the Source Engine. So some faces might need to be rotated either clockwise or counter clockwise. Each face will need to be mirrored horizontally before orientation.
 
For this to work you will need to have the 6 sides of the cubemap saved as individual textures in the correct orientation for it to appear correctly in the Source Engine. So some faces might need to be rotated either clockwise or counter clockwise. Each face will need to be mirrored horizontally before orientation.
{{note|Some games, including {{tf2}} [[Team Fortress 2]] and  {{l4d2}} [[Left 4 Dead 2]] require 7 faces for the cubemap to work. The seventh in this case is a round texture, used as a sphere map for the $envmapsphere command.}}
+
{{note|Pre-{{Game link|Alien Swarm}} games require 7 faces for the cubemap to work. The seventh in this case is a round texture, used as a sphere map for the <code>$envmapsphere</code> parameter.}}
  
 +
To the right hand side of this page you will find two guide images to aid in properly rotating each side of your environment render.<br>
 +
Save one or both of those guides on your computer and then import your environment render onto it or recreate it in a smaller scale, then rotate your sides as instructed by the images.<br>
 +
Save every side as a separate image file, their names should be the number found on that specific square. This will ensure that the environment texture will be built correctly, as the numbers also represent the import order in [[VTFEdit]].
  
 +
[[File:Cubemap T assembly guide.png|thumb|Orientation guide for T-assembled environments. Click to enlarge]]
 +
[[File:Cubemap Blender-Render assembly guide.png|thumb|Orientation guide for {{Blender}} render results. Click to enlarge]]
  
'''Here is a map of the orientation required'''
+
Once you have all the image sides ready you can just import them all into VTFEdit and select "Environment Map". [[Valve_Texture_Format#Image_data_format_table|Texture format]] is up to you, generally DXT5 will do.
 
 
{{BoxOut|float=right|width=22em|
 
1=<strong style="font-size:1.2em;color:#fff;">Explained</strong>
 
 
 
* FT=Front
 
* BK=Back
 
*RT=Right
 
* LF-Left
 
* UP=UP
 
* DN=Down
 
----
 
* CW = Clockwise
 
* CCW = Counter Clockwise
 
----
 
* 00_00_00 eg. (customcubemap_00_00_00.tga)
 
* 00_01_00 eg. (customcubemap_00_01_00.tga)
 
* 00_02_00 eg. (customcubemap_00_02_00.tga)
 
}}
 
[[File:Orientation_convention_source_cra0.png]]
 
 
 
Once you have all the image sides ready you can just import them all into VTFEdit and select "Environmental Map"
 
  
 
[[File:Cubemap_tut1_cra0.jpg]]
 
[[File:Cubemap_tut1_cra0.jpg]]
  
Then just save it all as a .vtf file and use it in your VMT like so
+
Then just save it all as a .vtf file and use it in your VMT like so:
  
 
<pre>
 
<pre>
"$Envmap"             "models/cra0kalo/ct_swat/eyeglint_cubemap"   // Reflection environment map static
+
"$Envmap" "effects/my_cubemap"
 
</pre>
 
</pre>
 
+
"effects" is the usual folder for environments/cubemaps You may put yours anywhere you like
 
=== In VTEX===
 
=== In VTEX===
  
Line 79: Line 65:
 
== Parameters and Effects ==
 
== Parameters and Effects ==
  
; <code>$envmapmask <texture></code>
+
{{MatParam|$envmapmask|texture|See {{ent|$envmapmask}}. A texture file that determines per-[[texel]] reflection intensity.}}
: See <code>[[$envmapmask]]</code>. A [[VTF]] file that determines per-[[texel]] reflection intensity.
+
{{MatParam|$envmaptint|RGB matrix|Controls the intensity of the reflection's [[RGB|red, green and blue]] color channels. Any positive number can be used. Default is <code>"[1 1 1]"</code>, which means 100% intensity. {{note|You ''must'' use quotemarks, as there are space characters within the value.}} {{tip|This command is often used to dim the brightness of a specular reflection without the overhead of an <code>$envmapmask</code>.}}}}
; <code>$envmaptint "[<red [[float]]> <green float> <blue float>]"</code>
+
{{MatParam|$envmapcontrast|normal|Controls the [[Wikipedia:Contrast (vision)|contrast]] of the reflection. 0 is natural contrast, while 1 is the full squaring of the color (i.e. color*color).
: Controls the intensity of the reflection's [[RGB|red, green and blue]] color channels. Any positive number can be used. Default is <code>"[1 1 1]"</code>, which means 100% intensity. {{note|You ''must'' use quotemarks, as there are space characters within the value.}} {{tip|This command is often used to dim the brightness of a specular reflection without the overhead of an <code>$envmapmask</code>.}}
+
: {{note|Will not work when Phong is enabled.}}
; <code>$envmapcontrast <[[normal]]></code>
+
: {{tip|Use higher contrasts to diminish relatively darker areas and increase "hot spots".}}}}
: Controls the [[Wikipedia:Contrast (vision)|contrast]] of the reflection. 0 is natural contrast, while 1 is the full squaring of the color (i.e. color*color).
+
{{MatParam|$envmapsaturation|normal|Controls the colour saturation of the reflection. 0 is greyscale, while 1 is natural saturation.
: {{note|Will not work when [[Phong]] is enabled.}}{{tip|Use higher contrasts to diminish relatively darker areas and increase "hot spots".}}
+
: {{note|Will not work when [[Phong]] is enabled on models.}}
; <code>$envmapsaturation <normal></code>
+
: {{bug|{{css}} Works only on models.}}}}
: Controls the colour saturation of the reflection. 0 is greyscale, while 1 is natural saturation.{{note|Will not work when [[Phong]] is enabled.}}{{bug|Works only on models.}}{{todo|Bug is present in {{CSS}}, confirm if that is true for all games}}
+
{{MatParam|$envmapframe|int|The frame to start an animated cubemap on.}}
; <code>$envmapframe <[[int]]></code>
+
{{MatParam|$envmapmode|int|Depreciated  MATERIAL_VAR_ENVMAPMODE  {{=}} (1 << 25), // OBSOLETE|deprecated=1}}
: The frame to start an animated cubemap on.
+
{{MatParam|$basetexturenoenvmap|and=$basetexture2noenvmap|bool|Used for materials with two [[albedo]]s, to make one or the other matte. See also {{ent|$basetexture}} and {{ent|$basetexture2}}.
; <code>$envmapmode <int?></code>
+
:{{note|Superseded in {{csgo}} by <code>[[$envmapmask#CS:GO_WorldVertexTransition_Parameters|$envmapmask2]].</code>}}|dx9=1|shaders=WorldVertexTransition|removed={{csgo}}}}
: Depreciated  MATERIAL_VAR_ENVMAPMODE  = (1 << 25), // OBSOLETE
+
{{MatParam|$envmapoptional|choices|Sets the oldest [[DirectX Versions|DirectX version]] that should draw the reflection. Choose from:
; <code>$basetexturenoenvmap <[[bool]]></code>
 
; <code>$basetexture2noenvmap <bool></code>
 
: Used for materials with two [[albedo]]s, to make one or the other matte. Require DirectX 9; see also <code>[[$basetexture]]</code> and <code>[[$basetexture2]]</code>.
 
;<code>$envmapoptional <choices></code>
 
: Sets the oldest DirectX version that should draw the reflection. Choose from:
 
 
:*<code>80</code> (DirectX 8)
 
:*<code>80</code> (DirectX 8)
:*<code>81</code> (DirectX 8.1)  
+
:*<code>81</code> (DirectX 8.1)
 
:*<code>90</code> (DirectX 9)
 
:*<code>90</code> (DirectX 9)
:*<code>95</code> (DirectX 9 with Shader Model 3)
+
:*<code>95</code> (DirectX 9 with Shader Model 3)|removed={{l4d}}}}
; <code>$envmapsphere <bool></code>
+
{{MatParam|$envmapsphere|bool|Determines whether the material's envmap should be a spheremap (deprecated) instead of a cubemap. Set this to 1 to use a spheremap.|deprecated=1|removed={{as}}}}
: Determines whether the material's envmap should be a spheremap (deprecated) instead of a cubemap. Set this to 1 to use a spheremap.
+
{{MatParam|$noenvmapmip|bool|Only use the top-level mipmap of the cubemap.|only={{csgo}}|shaders=LightmappedGeneric}}
; <code>$envmapfresnel <float></code> {{EP2 add}}
+
{{MatParam|$fresnelreflection|float|Adds a [http://www.3drender.com/glossary/fresneleffect.htm Fresnel effect] to the reflection. 0 is none, while 1 applies the full effect, similar to <code>[[Water_(shader)|Water]]</code>. The effect becomes multiplied with values higher than 1.|since={{src06}}|shaders=LightmappedGeneric, Lightmapped_4WayBlend, WorldVertexTransition}}
: Adds a Fresnel effect to the reflection. Effect becomes multiplied with values higher than 1.0. Only works on the VertexlitGeneric shader.
+
{{MatParam|$envmapfresnel|float|The same as <code>$fresnelreflection</code>, but for <code>VertexLitGeneric</code>. By default, this will use the fresnel ranges set by <code>$phongfresnelranges</code>.|since={{src07}}|dx9=1|shaders=VertexLitGeneric}}
; <code>$envmapfresnelminmaxexp <vector></code> {{EP2 add}}
+
{{MatParam|$envmapfresnelminmaxexp|vector|Sets fresnel ranges for <code>VertexLitGeneric</code> materials using <code>$envmapfresnel</code> without phong. By default <code>"[0 1 2]"</code>, making surfaces facing the viewer less reflective than surfaces facing sideways.
: Sets the ranges for the Fresnel effect. By default <code>"[0 1 2]"</code>, making surfaces facing the viewer less reflective than surfaces facing sideways. See [[Phong]] for usage.
+
: {{Note|The fresnel values for this parameter are '''not''' the same as those for <code>[[$phong|$phongfresnelranges.]]</code>Instead, the first value is the minimum amount of fresnel, the second value is the maximum, and the final value is exponent.}}
{{bug|Cannot be used with [[$bumpmap]]. [[$phong|$phongfresnelranges]] must be used instead.}}
+
: {{bug|Cannot be used with {{ent|$bumpmap}}. <code>$phongfresnelranges</code> must be used instead.}}|since={{l4d2}}|shaders=VertexLitGeneric}}
; <code>$fresnelreflection <float></code>  
+
{{MatParam|$envmaplightscale|float|How much the surface's lightmap tints the specular reflection. A value between 0 (off) and 1 (no reflection with completely black lightmap) determines how much the reflection is tinted; values above 1 are permitted but seem to actually start inverting the effect. For models in {{csgo}}, vertex lighting is used for the tinting instead of a lightmap.|since={{as}}|shaders=LightmappedGeneric, Lightmapped_4WayBlend ({{csgo}}), VertexLitGeneric ({{csgo}}), WorldVertexTransition ({{csgo}})}}
: Adds a Fresnel effect to the reflection. The value controls the Fresnel ranges {{todo| How?}}. 1.0 = mirror, 0.0 = water
+
{{MatParam|$envmaplightscaleminmax|vector2|Thresholds for the lightmap reflection tinting effect. Setting the minimum value higher increases the minimum light amount at which the reflection gets nerfed to nothing.|only={{csgo}}|shaders=LightmappedGeneric, Lightmapped_4WayBlend, VertexLitGeneric, WorldVertexTransition}}
{{todo|Confirm engine branches using fresnelreflection.}}
+
{{MatParam|$envmapanisotropy|bool|Enables warping of the reflection, "pushing" the top downward.|only={{csgo}}|shaders=LightmappedGeneric, Lightmapped_4WayBlend, WorldVertexTransition}}
; <code>$envmapanisotropy <bool></code> {{CSGO add}}
+
{{MatParam|$envmapanisotropyscale|normal|The amount the reflection should be warped by.|only={{csgo}}|shaders=LightmappedGeneric, Lightmapped_4WayBlend, WorldVertexTransition}}
; <code>$envmapanisotropyscale <float></code> {{CSGO add}}
 
: Warps the reflection, "pushing" the top downward.
 
; {{KV|<code>$envmaplightscale <float></code>|since=P2}}
 
: Allows the surface's lightmap to be used as an additional mask on the reflections. A value between 0 and 1 determines the degree to which it is masked; values above 1 are permitted but seem to start actually inverting the effect. This effect works on LightmappedGeneric in Portal 2, however it was extended to vertexlitGeneric in Counter-Strike: Global Offensive.
 
  
 
== Console commands ==
 
== Console commands ==
  
;<code>[[buildcubemaps]]</code>
+
{{IO|[[buildcubemaps]]|Generates cubemaps for use in materials. If this isn't run, objects will reflect the skybox (OB) or have an invalid reflection, white in Ep1 and pink checkerboards in MP.}}
:Generates cubemaps for use in materials. If this isn't run, objects will reflect the skybox (OB) or have an invalid reflection, white in Ep1 and pink checkerboards in MP.
+
{{IO|envmap|{{todo|Use currently unknown}}}}
;<code>r_showenvcubemap <[[bool]]></code>
+
{{IO|mat_fastspecular|param=bool|Quickly disable or enable specular rendering without reloading materials. This does not affect performance, only appearance. <code>mat_specular</code> must be used for proper performance testing.
: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.
+
: {{bug|Doesn't work in some games.}}}}
 +
: {{note|Despite common misconception, setting this to 0 does ''not'' enable a "fancy specular" mode, it simply disables specular rendering entirely.}}
 +
{{IO|mat_specular|param=bool|Disable or enable specular reflections, unloading or loading the specular materials from memory. Default 1.}}
 +
{{IO|r_showenvcubemap|param=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 ==
 
== See Also ==

Latest revision as of 13:24, 3 August 2021

简体中文
Specular reflections at full intensity.
For the set of material parameters used to mask specular reflections via textures, see $envmapmask.

$envmap is a material shader parameter available in all Source games. It creates specular reflections, which are seen on smooth surfaces. It does this by defining an "environment map" (specifically a cubemap) to draw as a reflection; normally that of the nearest env_cubemap entity. The reflection is not dynamic.

Note.png Note: $envmap actually works in the latest Source engine version (v24) of <Half-Life: Source> Half-Life: Source if it uses an env_cubemap. The issue actually comes from the buildcubemaps command, since if the cubemaps are built in another game and then the BSP is added into HL:S, they will work fine. Is not clear if in older versions there were more issues but due such problems, Valve used static reflective images for every reflective texture in the game.

The other form of reflection supported by Source is the diffuse Phong type.

Syntax

$envmap env_cubemap

"env_cubemap" is normally used, as it tells VBSP to swap in the name of the nearest env_cubemap when the map compiles. However it is also possible to use a static cubemap image that has been manually created.

Note.png Note: If $envmap is used without specifying $basetexture, the specular reflections will be force drawn regardless of anything.
Note.png Note: Most Cubemap textures will have no reflectivity when used as overlays or decals. It is unclear why this is so[Clarify].

Creating a custom static cubemap texture

Creating a custom cubemap texture might be required for some circumstances and is used occasionally in some Valve models.

In VTFEdit

For this to work you will need to have the 6 sides of the cubemap saved as individual textures in the correct orientation for it to appear correctly in the Source Engine. So some faces might need to be rotated either clockwise or counter clockwise. Each face will need to be mirrored horizontally before orientation.

Note.png Note: Pre-<Alien Swarm> Alien Swarm games require 7 faces for the cubemap to work. The seventh in this case is a round texture, used as a sphere map for the $envmapsphere parameter.

To the right hand side of this page you will find two guide images to aid in properly rotating each side of your environment render.
Save one or both of those guides on your computer and then import your environment render onto it or recreate it in a smaller scale, then rotate your sides as instructed by the images.
Save every side as a separate image file, their names should be the number found on that specific square. This will ensure that the environment texture will be built correctly, as the numbers also represent the import order in VTFEdit.

Orientation guide for T-assembled environments. Click to enlarge
Orientation guide for render results. Click to enlarge

Once you have all the image sides ready you can just import them all into VTFEdit and select "Environment Map". Texture format is up to you, generally DXT5 will do.

Cubemap tut1 cra0.jpg

Then just save it all as a .vtf file and use it in your VMT like so:

"$Envmap" "effects/my_cubemap"

"effects" is the usual folder for environments/cubemaps You may put yours anywhere you like

In VTEX

VTEX will automatically mirror and orient your faces, you need only to provide correctly named textures. Name each file something like envmap001a*.tga, where * is put BK, FT, LF, RT, UP, or DN. If you took a cubemap screenshot in-game, this step will already by done, but to make them work properly with Vtex.exe you must use HDRShop (but before you need to change textures format to BMP, because HDRShop can only work with that kind of format) and then covert them to PFM files format.

To do: What axis does each direction relate to?

Cubemap axis reference 1.jpg

Create a text file the same name as your textures (e.g. envmap001a.txt). If building for HDR write in the following, otherwise leave it blank:

pfm 1
pfmscale 1
nocompress 1

Put these files into materialsrc and then just drag-n-drop .txt file into vtex.exe and you should end up with a working cubemap! HDR envmaps will be named like envmap001a.hdr.vtf, and only need to exist to work.

Parameters and Effects

$envmapmask <texture>
See $envmapmask. A texture file that determines per-texel reflection intensity.
$envmaptint <RGB matrix>
Controls the intensity of the reflection's red, green and blue color channels. Any positive number can be used. Default is "[1 1 1]", which means 100% intensity.
Note.png Note: You must use quotemarks, as there are space characters within the value.
Tip.png Tip: This command is often used to dim the brightness of a specular reflection without the overhead of an $envmapmask.
$envmapcontrast <normal>
Controls the contrast of the reflection. 0 is natural contrast, while 1 is the full squaring of the color (i.e. color*color).
Note.png Note: Will not work when Phong is enabled.
Tip.png 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 natural saturation.
Note.png Note: Will not work when Phong is enabled on models.
Bug.png Bug: <Counter-Strike: Source> Works only on models.
$envmapframe <integer>
The frame to start an animated cubemap on.
$envmapmode <integer>  <Obsolete>
Deprecated.  Depreciated MATERIAL_VAR_ENVMAPMODE = (1 << 25), // OBSOLETE
$basetexturenoenvmap and $basetexture2noenvmap <boolean>  (removed since Counter-Strike: Global Offensive)  (DX9+)
Used for materials with two albedos, to make one or the other matte. See also $basetexture and $basetexture2.
Note.png Note: Superseded in Counter-Strike: Global Offensive by $envmapmask2.
Shaders: WorldVertexTransition
$envmapoptional <choices>  (removed since <Left 4 Dead>)
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)
$envmapsphere <boolean>  (removed since <Alien Swarm>)  <Obsolete>
Deprecated.  Determines whether the material's envmap should be a spheremap (deprecated) instead of a cubemap. Set this to 1 to use a spheremap.
$noenvmapmip <boolean> (only in Counter-Strike: Global Offensive)
Only use the top-level mipmap of the cubemap.
Shaders: LightmappedGeneric
$fresnelreflection <float> (in all games since <Source><Source>)
Adds a Fresnel effect to the reflection. 0 is none, while 1 applies the full effect, similar to Water. The effect becomes multiplied with values higher than 1.
Shaders: LightmappedGeneric, Lightmapped_4WayBlend, WorldVertexTransition
$envmapfresnel <float> (in all games since <Source><Source>)  (DX9+)
The same as $fresnelreflection, but for VertexLitGeneric. By default, this will use the fresnel ranges set by $phongfresnelranges.
Shaders: VertexLitGeneric
$envmapfresnelminmaxexp <vector> (in all games since <Left 4 Dead 2>)
Sets fresnel ranges for VertexLitGeneric materials using $envmapfresnel without phong. By default "[0 1 2]", making surfaces facing the viewer less reflective than surfaces facing sideways.
Note.png Note: The fresnel values for this parameter are not the same as those for $phongfresnelranges.Instead, the first value is the minimum amount of fresnel, the second value is the maximum, and the final value is exponent.
Bug.png Bug: Cannot be used with $bumpmap. $phongfresnelranges must be used instead.
Shaders: VertexLitGeneric
$envmaplightscale <float> (in all games since <Alien Swarm>)
How much the surface's lightmap tints the specular reflection. A value between 0 (off) and 1 (no reflection with completely black lightmap) determines how much the reflection is tinted; values above 1 are permitted but seem to actually start inverting the effect. For models in Counter-Strike: Global Offensive, vertex lighting is used for the tinting instead of a lightmap.
Shaders: LightmappedGeneric, Lightmapped_4WayBlend (Counter-Strike: Global Offensive), VertexLitGeneric (Counter-Strike: Global Offensive), WorldVertexTransition (Counter-Strike: Global Offensive)
$envmaplightscaleminmax <vector2> (only in Counter-Strike: Global Offensive)
Thresholds for the lightmap reflection tinting effect. Setting the minimum value higher increases the minimum light amount at which the reflection gets nerfed to nothing.
Shaders: LightmappedGeneric, Lightmapped_4WayBlend, VertexLitGeneric, WorldVertexTransition
$envmapanisotropy <boolean> (only in Counter-Strike: Global Offensive)
Enables warping of the reflection, "pushing" the top downward.
Shaders: LightmappedGeneric, Lightmapped_4WayBlend, WorldVertexTransition
$envmapanisotropyscale <normal> (only in Counter-Strike: Global Offensive)
The amount the reflection should be warped by.
Shaders: LightmappedGeneric, Lightmapped_4WayBlend, WorldVertexTransition

Console commands

buildcubemaps
Generates cubemaps for use in materials. If this isn't run, objects will reflect the skybox (OB) or have an invalid reflection, white in Ep1 and pink checkerboards in MP.
envmap
To do: Use currently unknown
mat_fastspecular <boolean>
Quickly disable or enable specular rendering without reloading materials. This does not affect performance, only appearance. mat_specular must be used for proper performance testing.
Bug.png Bug: Doesn't work in some games.
Note.png Note: Despite common misconception, setting this to 0 does not enable a "fancy specular" mode, it simply disables specular rendering entirely.
mat_specular <boolean>
Disable or enable specular reflections, unloading or loading the specular materials from memory. Default 1.
r_showenvcubemap <boolean>
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