Fog volume: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
 Warning:This entity applies its effect based on its AABB instead of its brush model. [ Edit ]
Warning:This entity applies its effect based on its AABB instead of its brush model. [ Edit ]
 Tip:
Tip:
 Note:
Note:
		
	
| ThaiGrocer (talk | contribs) m (→See also) |  (Rewrite Template:Lang to Template:LanguageBar. This action was performed by a bot.) | ||
| (50 intermediate revisions by 23 users not shown) | |||
| Line 1: | Line 1: | ||
| {{ | {{LanguageBar}} | ||
| = | [[File:Csgo fog example 1.jpg|thumb|right|Fog in Counter-Strike: Global Offensive]][[File:Fogvolume.jpg|left]]{{CD|CFogVolume|file1=fogvolume.cpp}} | ||
| {{this is a|brush entity|name=fog_volume|since=Left 4 Dead}} It's also in {{bms|4}}, {{mapbase|4}}, and {{gmod|4}}. It controls fog and other visual cinematic elements within its volume. It is necessary to have at least one {{ent|fog_volume}} in order for (a master) {{ent|color_correction}} to take effect in the {{l4dseries|4.1}}. | |||
| {{AABBwarning}} | |||
| {{tip|{{clr}} | |||
| *{{ | * There is a Fog Panel in {{l4d2|4.1}} that allows in-game manipulation of fog parameters. It is loaded via console command <code>fogui</code>. This command exists in {{portal2|4.1}}, but will not work unless <code>resource/foguipanel.res</code> is copied from another game. | ||
| * Use <code>tools/toolsfog</code> texture for your fog volumes to distinguish them from triggers during level creation.}} | |||
| *{{ | {{note|{{clr}} | ||
| * {{as|4.1}} does not use the origin of a player to decide which fog volume they are in, but rather the camera position. Due to this, you must make sure that your fog volume is taller (height) than the highest point a marine's camera can reach, i.e: The distance from the camera in height from the marine. | |||
| *{{ | * Mods using {{src07|4.1}} or {{src13|4.1}} can create client-side fog-changing functionality in a multiplayer game using instead {{ent|trigger_multiple}}. Place at least 2 {{ent|env_fog_controller}} with different fog settings and one checked with Master flag. Use <code>OnStartTouch > !activator > SetFogController > [name of env_fog_controller entity]</code>.  The input will appear as red, but it still works. Use <code>OnEndTouch()</code> to change the fog back. | ||
| * In {{csgo}} (and perhaps other games), binding multiple brushes to fog_volume will produce the fog effect for the bounding box of the group of brushes i.e. if you have 2 blocks for fog_volume in an L-shaped hallway, standing in a room in the inside corner of that hallway will trigger the fog as well}} | |||
| __NOTOC__ | |||
| }} | == Keyvalues == | ||
| {{KV Targetname}} | |||
| {{KV|Fog Name|intn=FogName|target_destination|The name of the fog entity associated with this volume.}} | |||
| {{KV|Postprocess Name|intn=PostProcessName|target_destination|not={{bms}}|The name of the {{ent|postprocess_controller}} entity associated with this volume.}} | |||
| {{KV|ColorCorrection Name|intn=ColorCorrectionName|target_destination|The name of the color_correction entity associated with this volume.}} | |||
| }} | {{KV EnableDisable}} | ||
| }} | |||
| ==Inputs== | ==Inputs== | ||
| {{I EnableDisable}} | {{I EnableDisable}} | ||
| ==See also== | ==See also== | ||
| *[[color_correction|Color Correction]] | *[[color_correction|Color Correction]] | ||
| * | *{{ent|color_correction}} (entity) | ||
| * | *{{ent|env_fog_controller}} | ||
| * | *{{ent|postprocess_controller}} | ||
| ==External links== | ==External links== | ||
| [http://www.l4d.com/blog/post.php?id=1962 | *[http://www.l4d.com/blog/post.php?id=1962 L4D Art Direction, Part 1: Filmic Effects] - Valve blog post regarding film effects in Left 4 Dead. | ||
| *[http://forums.steampowered.com/forums/showthread.php?t=3065769  Changing fog in multiplayer game with Source 2007 ] - Steam forum. | |||
Latest revision as of 17:52, 18 July 2025
|  Class hierarchy | 
|---|
| CFogVolume | 
|  fogvolume.cpp | 
fog_volume  is a   brush entity  available in all  Source games since
 Source games since  Left 4 Dead. It's also in
 Left 4 Dead. It's also in  Black Mesa,
 Black Mesa,  Mapbase, and
 Mapbase, and  Garry's Mod. It controls fog and other visual cinematic elements within its volume. It is necessary to have at least one fog_volume in order for (a master) color_correction to take effect in the
 Garry's Mod. It controls fog and other visual cinematic elements within its volume. It is necessary to have at least one fog_volume in order for (a master) color_correction to take effect in the 
 Left 4 Dead series.
 Left 4 Dead series.
 Warning:This entity applies its effect based on its AABB instead of its brush model. [ Edit ]
Warning:This entity applies its effect based on its AABB instead of its brush model. [ Edit ] Tip:
Tip:
- There is a Fog Panel in  Left 4 Dead 2 that allows in-game manipulation of fog parameters. It is loaded via console command Left 4 Dead 2 that allows in-game manipulation of fog parameters. It is loaded via console commandfogui. This command exists in Portal 2, but will not work unless Portal 2, but will not work unlessresource/foguipanel.resis copied from another game.
- Use tools/toolsfogtexture for your fog volumes to distinguish them from triggers during level creation.
 Note:
Note:
 Alien Swarm does not use the origin of a player to decide which fog volume they are in, but rather the camera position. Due to this, you must make sure that your fog volume is taller (height) than the highest point a marine's camera can reach, i.e: The distance from the camera in height from the marine. Alien Swarm does not use the origin of a player to decide which fog volume they are in, but rather the camera position. Due to this, you must make sure that your fog volume is taller (height) than the highest point a marine's camera can reach, i.e: The distance from the camera in height from the marine.
- Mods using  Source 2007 or Source 2007 or Source 2013 can create client-side fog-changing functionality in a multiplayer game using instead trigger_multiple. Place at least 2 env_fog_controller with different fog settings and one checked with Master flag. Use Source 2013 can create client-side fog-changing functionality in a multiplayer game using instead trigger_multiple. Place at least 2 env_fog_controller with different fog settings and one checked with Master flag. UseOnStartTouch > !activator > SetFogController > [name of env_fog_controller entity]. The input will appear as red, but it still works. UseOnEndTouch()to change the fog back.
- In  (and perhaps other games), binding multiple brushes to fog_volume will produce the fog effect for the bounding box of the group of brushes i.e. if you have 2 blocks for fog_volume in an L-shaped hallway, standing in a room in the inside corner of that hallway will trigger the fog as well (and perhaps other games), binding multiple brushes to fog_volume will produce the fog effect for the bounding box of the group of brushes i.e. if you have 2 blocks for fog_volume in an L-shaped hallway, standing in a room in the inside corner of that hallway will trigger the fog as well
Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentnameortarget).
 Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- Fog Name (FogName) <targetname>
- The name of the fog entity associated with this volume.
- Postprocess Name (PostProcessName)  <targetname> (not in  ) )
- The name of the postprocess_controller entity associated with this volume.
- ColorCorrection Name (ColorCorrectionName) <targetname>
- The name of the color_correction entity associated with this volume.
- Start Disabled (StartDisabled) <boolean>
- Stay dormant until activated (with theEnableinput).
Inputs
EnableDisable:
- Enable / Disable
- Enable/disable this entity from performing its task. It might also disappear from view.
See also
External links
- L4D Art Direction, Part 1: Filmic Effects - Valve blog post regarding film effects in Left 4 Dead.
- Changing fog in multiplayer game with Source 2007 - Steam forum.




























