This article's documentation is for anything that uses the Source engine. Click here for more information.

Env fog controller: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (minoro)
 
(100 intermediate revisions by 38 users not shown)
Line 1: Line 1:
{{wrongtitle|title=env_fog_controller}}
{{LanguageBar}}
{{base_point}}
{{TabsBar|main=Env_fog}}
{{CD|CFogController|file1=fogcontroller.cpp}}
{{preserved entity}}
{{This is a|logical entity|name=env_fog_controller|sprite=fog_controller.png}}
This entity determines the properties of aerial fog for the whole map.


== Entity description ==
{{tip|In multiplayer games, fog may be changed per-client by sending the {{ent|player}} entity (probably best accessed through {{ent|!activator}}) a <code>SetFogController</code> input. (Also applies to single player sessions, like in {{Portal2}})}}
[[Image:Fog controller.png|left]]The '''env_fog_controller''' entity determines the density of aerial fog for the whole map.  


{{map_properties}} Only the first instance of the env_fog_controller entity in a level will be used. It is pointless to place multiple env_fog_controller entities in a map!.
In {{l4ds}}, multiple <code>env_fog_controller</code>s may be used in conjunction with {{ent|fog_volume}}s to create different fog effects where needed. In addition, an <code>env_fog_controller</code> can be set as the ''Master'' fog controller under flags, in cases where a <code>fog_volume</code> is not tied to any specific <code>env_fog_controller</code>, or if no <code>fog_volume</code> is used in a region.


{{note|The [[3D Skybox]] fog levels set by the [[sky_camera]] parameters should correspond to your [[env_fog_controller]] settings.}}
{{tip|By adding fog to a level, you can hide a '''FarZ''' Clip Plane, and reduce the amount of rendered geometry, improving game performance.}}


Adding fog (to represent haze, mist, diffuse smoke or dust) to the atmosphere has important implications for 'realistic' [[Lighting]]. Light is scattered and absorbed as it passes through fog. The denser the fog, the greater the effect.
Adding fog to a map can cause/require changes to the [[lighting]] for realism. Light is scattered and absorbed as it passes through fog. The denser the fog, the greater the effect:
* [[Falloff]] - (or attenuation) is the rate at which light intensity decreases over distance. Falloff distance decreases as fog gets thicker.
*[[Falloff]] - (or attenuation) is the rate at which light intensity decreases over distance. Falloff distance decreases as fog gets thicker.
* [[Lighting#Tyndall effects|Tyndall effects]] - can be seen when the fog particles reflect light toward the viewer. Halos and Lightbeams become more visible as fog gets thicker.
*[[Lighting#Tyndall_Effects|Tyndall effects]] - can be seen when the fog particles reflect light toward the viewer. Halos and light beams become more visible as fog gets thicker.
* Diffused Lighting - the boundary-line between light and shadow becomes more blurred (diffuse) as fog gets thicker. See [[Lightmap#Lightmap Scale|Lightmap Scale]] and [[shadow_control]]'s "distance" parameter.
*Diffused Lighting - the boundary-line between light and shadow becomes more blurred (diffuse) as fog gets thicker. See [[Lightmap#Lightmap Scale|Lightmap Scale]] and {{ent|shadow_control}}'s "distance" parameter.


== Keyvalues ==
{{note|The [[3D Skybox]] fog levels set by the {{ent|sky_camera}} parameters should correspond to your <code>env_fog_controller</code> settings.}}
;* fogenable {{boolean}}
: Enable fog on map load.


;* fogstart <float>
== Radial fog ==
: How far from the viewer the fog should start.
Older Source games (all {{src04}}-{{src13}} games) render fog as a plane a certain distance away from the camera. This method is bad, as rotating the camera will strengthen or weaken the apparent amount of fog in a particular spot, even though the viewer hasn't moved at all. If both {{code|sky_camera}} and {{code|env_fog_controller}} distance don't match its value, also makes objects like trees, grass looks like they're slightly glowing when looking at a different angle.


;* fogend <float>
In {{l4d|2}} onward, as well as {{hl2|2}} (since 20th Anniversary Update), {{portal|2}} (May 20, 2025), all {{tf2branch|2}} games, and {{mapbase|2}}, this is fixed by implementing a new radial method which is independent from the viewing angle. However, in the {{tf2branch|1}}, {{portal|1}} and {{hl2|1}}, radial fog must be manually enabled by changing the "'''Use Radial Fog?''' ({{code|fogRadial}})" [[keyvalue]]. A console command called {{code|[[r_radialfog_force]]}} (no cheats required) is available, to switch between radial fog and planar-based fog in-game, without recompiling the map. You can also use {{code|fog_radial}} and {{code|fog_radial_skybox}} (requires {{code|fog_override 1}} and {{code|[[sv_cheats]] 1}}).
: How far from the viewer the scene should be completely fogged.


;* fogmaxdensity <float>
{{Note|Radial fog are [https://github.com/ValveSoftware/source-sdk-2013/commit/c496173cf3efd6b41c1071b538968c5468b47aad enabled by default] on all official {{Tf2|1}} maps, even if "Use Radial Fog?" is set to "No".}}
: Fog Max Density [0..1]


;* farz <integer>
<div style="text-align:center;margin:auto;width:780px;background:F9F9F9;border:1px solid #CCCCCC;padding:.3em;">
: Far Z Clip Plane
<div>[[File:Radial_fog_-_Off.jpg|360px|Radial fog disabled (using planar-based fog).]] [[File:Radial_fog_-_On.jpg|360px|Radial fog enabled.]]</div>
: This setting is used for optimizing your map. Anything beyond this distance (in world units) will not be rendered. It is recommended to keep this number higher then your ''fogend'' value and ensure fogmaxdensity is set to 1.
<div style="font-size:.85em;">Comparison between planar-based fog and radial fog. Screenshot from {{css|1}} on {{tf2branch|1}}.</div>
</div>


;* fogcolor {{color}}
==Flags==
: Primary Fog Color.
{{fl|1|Master|If multiple <code>env_fog_controller</code>s are active, this one will always take priority. There must be at least one {{ent|fog_volume}} in the map to work!}}


;* fogblend {{boolean}}
==Keyvalues==
: This will enable blending between ''fogcolor'' and ''fogcolor2'', based on the direction the player is looking. If the player's viewpoint is equal to the ''fogdir'' vector, the fog will be drawn with ''fogcolor2'' (red); if facing in the opposite direction, the fog will be drawn with ''fogcolor'' (blue). If facing perpendicular to the fogblend axis, the fog will be a 50/50 blend of ''fogcolor'' and ''fogcolor2'' (purple).
{{KV|Fog Enable |intn=fogenable|boolean|Make fog start active.}}
: This can be used to approximate the effect of light diffusing through the fog, but since the fogblend effect is applied for the entire rendered scene, it is best to keep the two colors relatively close to make the blending less obvious.
{{KV|Fog Start |intn=fogstart|float|How far away from the viewer the fog should start.}}
: For example, sunlight with a Yaw of 45 degrees and a Pitch of -45 degrees could be enhanced using a ''fogdir'' of "-1 -1 1", a ''fogcolor'' of "120 110 100" and a ''fogcolor2'' of "80 70 60".  
{{KV|Fog End |intn=fogend|float|How far away from the viewer the fog reaches '''Fog Max Density'''.}}
{{KV|Fog Max Density |intn=fogmaxdensity|float|Maximum density the fog may reach. Expressed as a decimal percent, so for 45% put 0.45.}}
{{KV|Far Z Clip Plane|intn=farz|integer|Anything beyond this distance in world units will not be rendered. This should be higher than '''Fog End'''. If this value is -1 (default), the game will use a distance of 28377.9204312 units. If this is used, '''Fog Max Density''' should be set to <code>1</code> otherwise the [[void]] may be visible.
:{{warning|See the r_farz warning at {{cmd|sv_cheats}}}}
:{{note|This value is used as vis radius by [[VVIS]]}}}}
{{KV|Primary Fog Color |intn=fogcolor|color255|Primary Fog Color.}}
{{KV|Secondary Fog Color |intn=fogcolor2|color255|Secondary Fog Color. If '''Fog Blend''' is disabled, this color will never appear.}}
{{KV|Primary Fog Color (HDR Override) |only={{hl2}} 20th|intn=fogcolor_hdr|color255|Override Primary Fog Color for HDR.}}
{{KV|Secondary Fog Color (HDR Override) |only={{hl2}} 20th|intn=fogcolor2_hdr|color255|Override Secondary Fog Color for HDR. If '''Fog Blend''' is disabled, this color will never appear.}}
{{KV|Fog Blend |intn=fogblend|boolean|Enables color blending between '''Primary Fog Color''' and '''Secondary Fog Color'''. When the viewer looks in the '''Primary Fog Direction''', fog will appear as the ''Primary'' color. When looking away from the specified direction, fog appears as the ''Secondary'' color. If the camera is not pointed directly at or away from the direction, a blend of the two colors will result. Sunlight with a '''Yaw''' of 45 degrees and a '''Pitch''' of -45 degrees could be enhanced using a '''Primary Fog Direction''' of "-1 -1 1", a '''Primary Fog Color''' of "120 110 100" and a '''Secondary Fog Color''' of "80 70 60".}}
{{KV|Primary Fog Direction |intn=fogdir|vector|A vector (given by three space-separated numbers X Y Z) which the viewer camera is checked against to figure out the blend between the primary and secondary fog colors.}}
{{KV|Use Angles for Fog Dir |intn=use_angles|boolean|Use '''Pitch Yaw Roll''' for the '''Fog Blend''' direction instead of '''Primary Fog Direction'''. There isn't much use for this unless you want the direction to rotate.}}
{{KV|Use Radial Fog?|only={{hl2}} 20th, {{hls}}, {{tf2branch}}|intn=fogRadial|boolean|Use radial fog instead of planar-based fog. Only in {{hl2|1}} 20th Anniversary Update, {{hls|1}} (which runs on top of HL2 20th Anniversary base), aswell as all games on {{tf2branch|1}} (since Feb 18, 2025 update).</br>Radial fog is always used on {{l4d|1}} onward.}}
{{KV|Interpolate time |intn=foglerptime|float|Fade time for the <code>StartFogTransition</code> input.}}
{{KV|HDR Color Scale|intn=HDRColorScale|since=L4D|float|Multiplier for fog color when in [[HDR]] mode.}}
{{KV|Zoom Fog Scale|intn=ZoomFogScale|since=CSGO|float|Scalar for fog start and end distances when the player is looking through a gun's scope (e.g. AWP).}}


;* fogcolor2 {{color}}
==Inputs==
: Secondary Fog Color.
{{I|TurnOn|Turns the fog on.}}
{{I|TurnOff|Turns the fog off.}}
{{I|SetAngles|param=angles|Sets the angles to use for the '''Primary Fog Direction'''.}}
{{I|SetStartDist|param=float|Sets the '''Fog Start''' distance.}}
{{I|SetEndDist|param=float|Sets the '''Fog End''' distance.}}
{{I|SetColor|param=color255|Sets the '''Primary Fog Color'''.}}
{{I|SetColorSecondary|param=color255|Sets the '''Secondary Fog Color'''.}}
{{I|SetColorHDR|param=color255|Override '''Primary Fog Color''' for [[HDR]].|only={{hl2}} 20th}}
{{I|SetColorSecondaryHDR|param=color255|Override '''Secondary Fog Color''' for [[HDR]].|only={{hl2}} 20th}}
{{I|SetRadial|param=boolean|Set the fog to be radial or not (planar). 0 {{=}} Planar, 1 {{=}} Radial.|only={{hl2}} 20th, {{hls}}}}
{{I|SetFarZ|param=integer|Sets the '''Far Z Clip Plane''' distance.}}
{{I|SetMaxDensity|param=float|Sets the '''Fog Max Density'''.|nofgd=1}}
:{{note|This input may not be in most FGD files but works in {{css}}. Does it work in others games ? {{confirm}} }}
{{I|Set2DSkyboxFogFactor|param=float|since=l4d2|Set the current amount of fog to blend into the 2D skybox. Expressed as a decimal percent, so for 45% put 0.45. {{l4d2}} only.}}
{{I|SetZoomFogScale|param=float|since=CSGO|Sets the '''Zoom Fog Scale'''.}}
{{I|SetColorLerpTo|param=color255|since={{src06}}|Stores a value for '''Primary Fog Color''' that is set once the <code>StartFogTransition</code> input fires.}}
{{I|SetColorSecondaryLerpTo|param=color255|since={{src06}}|Stores a value for '''Secondary Fog Color''' that is set once the <code>StartFogTransition</code> input fires.}}
{{I|SetStartDistLerpTo|param=float|since={{src06}}|Stores a value for '''Fog Start''' that is set once the <code>StartFogTransition</code> input fires.}}
{{I|SetEndDistLerpTo|param=float|since={{src06}}|Stores a value for '''Fog End''' that is set once the <code>StartFogTransition</code> input fires.}}
{{I|SetMaxDensityLerpTo|param=float|since=L4D|Stores a value for '''Fog Max Density''' that is set once the <code>StartFogTransition</code> input fires. }}
:{{note|This one does ''not'' have any non-"LerpTo" counterpart. {{confirm}} '''Is this still true ?''' See <code>SetMaxDensity</code> input. }}
{{I|Set2DSkyboxFogFactorLerpTo|param=float|since=l4d2|Set the current amount of fog to blend into the 2D skybox. Expressed as a decimal percent, so for 45% put 0.45. This will only change once the <code>StartFogTransition</code> input fires. {{l4d2}} only.}}
{{I|StartFogTransition|since={{src06}}|When fired, the fog fades to any new values sent through the "<code>LerpTo</code>" inputs. Fade time is determined by the '''Interpolate time''' keyvalue.}}


;* fogdir <[[vector]]>
:{{bug|Does not work correctly in some games. The fog will transition to nothing and then abruptly change to the new values at the end of the interpolation time in {{l4d2}}{{csgo}}.}}
: Primary Fog Direction
:{{Todo|What other games have this bug? (Works perfectly in {{ep2}} for example)}}
: A vector (given by three space-separated numbers X Y Z) which points from the secondary ''fogcolor2'' towards the primary ''fogcolor''.
{{I|ActivateAllPlayers|only={{P2CE}}|Turns this fog on for all connected players}}


;* use_angles {{boolean}}
==See also==
: Use Angles for Fog Dir
*{{ent|fog_volume}}
: Use ''angles'' instead of ''fogdir'' for the fogblend-axis.
*[[Fog tutorial]]
*[[Fog Basics]]
*[[Dust, Fog, & Smoke]]


* {{kv angles}}
[[Category:Fog]]
 
;* {{ep1 add|foglerptime}} <float>
: Interpolate time
 
* {{kv dxlevelchoice}}
* {{kv targetname}}
 
== Flags ==
* 1 : Master (Has priority if multiple env_fog_controllers exist)
 
== Inputs ==
;* SetStartDist <float>
: Set the fog start distance.
 
;* SetEndDist <float>
: Set the fog end distance.
 
;* TurnOn
: Turn the fog on.
 
;* TurnOff
: Turn the fog off.
 
;* SetColor {{color}}
: Set the primary fog color.
 
;* SetColorSecondary {{color}}
: Set the secondary fog color.
 
;* SetFarZ <integer>
: Set the far clip plane distance.
 
;* SetAngles <[[QAngle|angles]]>
: Set the angles to use for the secondary fog direction.
 
;* {{ep1 add|SetColorLerpTo <color255>}}
: Set the primary fog color.
 
;* {{ep1 add|SetColorSecondaryLerpTo <color255>}}
: Set the secondary fog color.
 
;* {{ep1 add|SetStartDistLerpTo <float>}}
: Set the fog start distance.
 
;* {{ep1 add|SetEndDistLerpTo <float>}}
: Set the fog end distance.
 
;* {{ep1 add|StartFogTransition}}
: Start fog transition.
 
* {{i targetname}}
 
== Outputs ==
* {{o targetname}}
 
== See also ==
* [[Fog tutorial]]
* [[Fog Basics]]
* [[Dust, Fog, & Smoke]]

Latest revision as of 22:55, 7 June 2025

English (en)Hrvatski (hr)中文 (zh)Translate (Translate)
edit
C++ Class hierarchy
CFogController
CBaseEntity
C++ fogcontroller.cpp
Recycle-warning.png
This is a preserved entity in Counter-Strike: SourceHalf-Life 2: DeathmatchDay of Defeat: SourceTeam Fortress 2Left 4 DeadLeft 4 Dead 2Portal 2Counter-Strike: Global Offensive
If the game has round restart mechanics this entity may not behave as expected.
Fog controller.png

env_fog_controller is a logical entity available in all Source Source games.

This entity determines the properties of aerial fog for the whole map.

Tip.pngTip:In multiplayer games, fog may be changed per-client by sending the player entity (probably best accessed through !activator) a SetFogController input. (Also applies to single player sessions, like in Portal 2)

In Left 4 Dead seriesLeft 4 Dead series, multiple env_fog_controllers may be used in conjunction with fog_volumes to create different fog effects where needed. In addition, an env_fog_controller can be set as the Master fog controller under flags, in cases where a fog_volume is not tied to any specific env_fog_controller, or if no fog_volume is used in a region.


Adding fog to a map can cause/require changes to the lighting for realism. Light is scattered and absorbed as it passes through fog. The denser the fog, the greater the effect:

  • Falloff - (or attenuation) is the rate at which light intensity decreases over distance. Falloff distance decreases as fog gets thicker.
  • Tyndall effects - can be seen when the fog particles reflect light toward the viewer. Halos and light beams become more visible as fog gets thicker.
  • Diffused Lighting - the boundary-line between light and shadow becomes more blurred (diffuse) as fog gets thicker. See Lightmap Scale and shadow_control's "distance" parameter.
Note.pngNote:The 3D Skybox fog levels set by the sky_camera parameters should correspond to your env_fog_controller settings.

Radial fog

Older Source games (all Source 2004-Source 2013 games) render fog as a plane a certain distance away from the camera. This method is bad, as rotating the camera will strengthen or weaken the apparent amount of fog in a particular spot, even though the viewer hasn't moved at all. If both sky_camera and env_fog_controller distance don't match its value, also makes objects like trees, grass looks like they're slightly glowing when looking at a different angle.

In Left 4 Dead Left 4 Dead onward, as well as Half-Life 2 Half-Life 2 (since 20th Anniversary Update), Portal Portal (May 20, 2025), all Team Fortress 2 branch Team Fortress 2 branch games, and Mapbase Mapbase, this is fixed by implementing a new radial method which is independent from the viewing angle. However, in the Team Fortress 2 branch, Portal and Half-Life 2, radial fog must be manually enabled by changing the "Use Radial Fog? (fogRadial)" keyvalue. A console command called r_radialfog_force (no cheats required) is available, to switch between radial fog and planar-based fog in-game, without recompiling the map. You can also use fog_radial and fog_radial_skybox (requires fog_override 1 and sv_cheats 1).

Note.pngNote:Radial fog are enabled by default on all official Team Fortress 2 maps, even if "Use Radial Fog?" is set to "No".
Radial fog disabled (using planar-based fog). Radial fog enabled.
Comparison between planar-based fog and radial fog. Screenshot from Counter-Strike: Source on Team Fortress 2 branch.

Flags

Master : [1]
If multiple env_fog_controllers are active, this one will always take priority. There must be at least one fog_volume in the map to work!

Keyvalues

Fog Enable (fogenable) <boolean>
Make fog start active.
Fog Start (fogstart) <float>
How far away from the viewer the fog should start.
Fog End (fogend) <float>
How far away from the viewer the fog reaches Fog Max Density.
Fog Max Density (fogmaxdensity) <float>
Maximum density the fog may reach. Expressed as a decimal percent, so for 45% put 0.45.
Far Z Clip Plane (farz) <integer>
Anything beyond this distance in world units will not be rendered. This should be higher than Fog End. If this value is -1 (default), the game will use a distance of 28377.9204312 units. If this is used, Fog Max Density should be set to 1 otherwise the void may be visible.
Warning.pngWarning:See the r_farz warning at sv_cheats
Note.pngNote:This value is used as vis radius by VVIS
Primary Fog Color (fogcolor) <color255>
Primary Fog Color.
Secondary Fog Color (fogcolor2) <color255>
Secondary Fog Color. If Fog Blend is disabled, this color will never appear.
Primary Fog Color (HDR Override) (fogcolor_hdr) <color255> (only in Half-Life 2 20th)
Override Primary Fog Color for HDR.
Secondary Fog Color (HDR Override) (fogcolor2_hdr) <color255> (only in Half-Life 2 20th)
Override Secondary Fog Color for HDR. If Fog Blend is disabled, this color will never appear.
Fog Blend (fogblend) <boolean>
Enables color blending between Primary Fog Color and Secondary Fog Color. When the viewer looks in the Primary Fog Direction, fog will appear as the Primary color. When looking away from the specified direction, fog appears as the Secondary color. If the camera is not pointed directly at or away from the direction, a blend of the two colors will result. Sunlight with a Yaw of 45 degrees and a Pitch of -45 degrees could be enhanced using a Primary Fog Direction of "-1 -1 1", a Primary Fog Color of "120 110 100" and a Secondary Fog Color of "80 70 60".
Primary Fog Direction (fogdir) <vector>
A vector (given by three space-separated numbers X Y Z) which the viewer camera is checked against to figure out the blend between the primary and secondary fog colors.
Use Angles for Fog Dir (use_angles) <boolean>
Use Pitch Yaw Roll for the Fog Blend direction instead of Primary Fog Direction. There isn't much use for this unless you want the direction to rotate.
Use Radial Fog? (fogRadial) <boolean> (only in Half-Life 2 20th, Half-Life: Source, Team Fortress 2 branch)
Use radial fog instead of planar-based fog. Only in Half-Life 2 20th Anniversary Update, Half-Life: Source (which runs on top of HL2 20th Anniversary base), aswell as all games on Team Fortress 2 branch (since Feb 18, 2025 update).
Radial fog is always used on Left 4 Dead onward.
Interpolate time (foglerptime) <float>
Fade time for the StartFogTransition input.
HDR Color Scale (HDRColorScale) <float> (in all games since Left 4 Dead)
Multiplier for fog color when in HDR mode.
Zoom Fog Scale (ZoomFogScale) <float> (in all games since Counter-Strike: Global Offensive)
Scalar for fog start and end distances when the player is looking through a gun's scope (e.g. AWP).

Inputs

TurnOn
Turns the fog on.
TurnOff
Turns the fog off.
SetAngles <anglesRedirectInput/Vector>
Sets the angles to use for the Primary Fog Direction.
SetStartDist <floatRedirectInput/float>
Sets the Fog Start distance.
SetEndDist <floatRedirectInput/float>
Sets the Fog End distance.
SetColor <color255RedirectInput/color32>
Sets the Primary Fog Color.
SetColorSecondary <color255RedirectInput/color32>
Sets the Secondary Fog Color.
SetColorHDR <color255RedirectInput/color32> (only in Half-Life 2 20th)
Override Primary Fog Color for HDR.
SetColorSecondaryHDR <color255RedirectInput/color32> (only in Half-Life 2 20th)
Override Secondary Fog Color for HDR.
SetRadial <booleanRedirectInput/boolean> (only in Half-Life 2 20th, Half-Life: Source)
Set the fog to be radial or not (planar). 0 = Planar, 1 = Radial.
SetFarZ <integerRedirectInput/integer>
Sets the Far Z Clip Plane distance.
SetMaxDensity <floatRedirectInput/float> !FGD
Sets the Fog Max Density.
Note.pngNote:This input may not be in most FGD files but works in Counter-Strike: Source. Does it work in others games ? [confirm]
Set2DSkyboxFogFactor <floatRedirectInput/float> (in all games since Left 4 Dead 2)
Set the current amount of fog to blend into the 2D skybox. Expressed as a decimal percent, so for 45% put 0.45. Left 4 Dead 2 only.
SetZoomFogScale <floatRedirectInput/float> (in all games since Counter-Strike: Global Offensive)
Sets the Zoom Fog Scale.
SetColorLerpTo <color255RedirectInput/color32> (in all games since Source 2006)
Stores a value for Primary Fog Color that is set once the StartFogTransition input fires.
SetColorSecondaryLerpTo <color255RedirectInput/color32> (in all games since Source 2006)
Stores a value for Secondary Fog Color that is set once the StartFogTransition input fires.
SetStartDistLerpTo <floatRedirectInput/float> (in all games since Source 2006)
Stores a value for Fog Start that is set once the StartFogTransition input fires.
SetEndDistLerpTo <floatRedirectInput/float> (in all games since Source 2006)
Stores a value for Fog End that is set once the StartFogTransition input fires.
SetMaxDensityLerpTo <floatRedirectInput/float> (in all games since Left 4 Dead)
Stores a value for Fog Max Density that is set once the StartFogTransition input fires.
Note.pngNote:This one does not have any non-"LerpTo" counterpart. [confirm] Is this still true ? See SetMaxDensity input.
Set2DSkyboxFogFactorLerpTo <floatRedirectInput/float> (in all games since Left 4 Dead 2)
Set the current amount of fog to blend into the 2D skybox. Expressed as a decimal percent, so for 45% put 0.45. This will only change once the StartFogTransition input fires. Left 4 Dead 2 only.
StartFogTransition  (in all games since Source 2006)
When fired, the fog fades to any new values sent through the "LerpTo" inputs. Fade time is determined by the Interpolate time keyvalue.
Icon-Bug.pngBug:Does not work correctly in some games. The fog will transition to nothing and then abruptly change to the new values at the end of the interpolation time in Left 4 Dead 2Counter-Strike: Global Offensive.  [todo tested in ?]
Todo: What other games have this bug? (Works perfectly in Half-Life 2: Episode Two for example)
ActivateAllPlayers  (only in Portal 2: Community Edition)
Turns this fog on for all connected players

See also