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

Fog volume: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(-fogvolume texture icon)
m (Updated old entity format to {{this is a}}. This action was perfomed by a bot.)
Line 1: Line 1:
{{lang|title=fog_volume}}
<!-- When this page is updated to {{langsp}} or {{language subpage}} instead of {{lang}}, please move {{this is a}} to the base page, as it is automatically translated. -->{{lang}}[[File:Csgo fog example 1.jpg|thumb|right|Fog in Counter-Strike: Global Offensive]][[File:Fogvolume.jpg|left]]{{CD|CFogVolume|file1=fogvolume.cpp}}
[[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|e2|name=fog_volume|since=Left 4 Dead}} It controls fog and other visual cinematic elements within its volume. It is necessary to have at least one <code>fog_volume</code> in order for (a master) [[color_correction]] to take effect in Left 4 Dead and Left 4 Dead 2.
{{entity|fog_volume|type=e2|since=Left 4 Dead}} It controls fog and other visual cinematic elements within its volume. It is necessary to have at least one <code>fog_volume</code> in order for (a master) [[color_correction]] to take effect in Left 4 Dead and Left 4 Dead 2.
{{Warning|Affects players based on its [[AABB]] instead of the actual brush model (tested in {{l4d2}})}}
{{Warning|Affects players based on its [[AABB]] instead of the actual brush model (tested in {{l4d2}})}}



Revision as of 10:20, 4 January 2024

English (en)中文 (zh)Translate (Translate)
Fog in Counter-Strike: Global Offensive
Fogvolume.jpg
C++ Class hierarchy
CFogVolume
CServerOnlyEntity
CBaseEntity
C++ fogvolume.cpp

fog_volume is an e2 available in all Source Source games since Left 4 Dead Left 4 Dead. 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 Left 4 Dead and Left 4 Dead 2.

Warning.pngWarning:Affects players based on its AABB instead of the actual brush model (tested in Left 4 Dead 2)
Tip.pngTip:There is a Fog Panel in Left 4 Dead 2 Left 4 Dead 2 that allows in-game manipulation of fog parameters. It is loaded via console command fogui. This command exists in Portal 2Portal 2, but will not work unless resource/foguipanel.res is copied from another game.
Note.pngNote:Alien Swarm Alien Swarm does not use the origin of a player to decide which fog volume they are in, but rather camera position. Due to this, you must make sure that your fog volume is taller (height) then the highest point a marines camera can reach, i.e: The distance from the camera in height from the marine.
Note.pngNote:In mods using Source 2007 and Source 2013 you can create client-side fog changing functionality in a multiplayer game using instead trigger_multiple. Have at least 2 env_fog_controller with different fog settings and one checked with Master flag. Use OnStartTouch > !activator > SetFogController > [name of env_fog_controller entity]. The input will appear as red, but it still works. Use OnEndTouch() to change the fog back.
Note.pngNote:In Counter-Strike: Global Offensive (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

Fog Name (FogName) <targetname>
The name of the fog entity associated with this volume.
Postprocess Name (PostProcessName) <targetname>
The name of the postprocess entity associated with this volume.
ColorCorrection Name (ColorCorrectionName) <targetname>
The name of the color_correction entity associated with this volume.
Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

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