color_correction

From Valve Developer Community
Jump to navigation Jump to search
English (en)Hrvatski (hr)Русский (ru)中文 (zh)Translate (Translate)
C++ Class hierarchy
CColorCorrection
CBaseEntity
C++ colorcorrection.cpp
Color correction.png

color_correction is a point entity available in all Source Source games. It loads a color correction lookup table (.raw) and controls its strength. Correction is applied in a sphere surrounding the entity, with a configurable amount of falloff.

In Left 4 Dead Left 4 Dead and Left 4 Dead 2 Left 4 Dead 2, this entity requires at least one fog_volume brush entity textured with the fogvolume material, somewhere on the map.
The flags Master and Simulate client-side must be checked in the main color_correction entity. Additional color_correction entities should be triggered through fog_volume by changing the ColorCorrection Name setting to a color_correction of your choice.

Icon-Bug.pngBug:In Team Fortress 2, color_correction causes control point HUD icons to display improperly. (example).  (tested in: Team Fortress 2)


Flags

Master : [1] (in all games since Left 4 Dead)
Default color correction when used with L4D fog_volume
Simulate client-side : [2] (in all games since Left 4 Dead)
Must be set when used with L4D fog_volume

Keyvalues

Name (targetname) <string>
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
Lookup Falloff Start Distance  (minfalloff) <float>
Within this range to the entity, the effect will be at full strength. If this is larger than the End Distance, the effect will apply to the entire map.
Icon-Bug.pngBug:Does not work properly in Left 4 Dead 2. If set, the Color correction inside the fog_volume will not work at all!  [todo tested in ?]
Icon-Bug.pngBug:Value "-1" supposed to set color correction to apply everywhere, but this seems to cause color correction to not show up at all. Instead you can try set both value to "9999999" to apply color correction everywhere. This issue wasn't present or fixed on Orange Box branches (and later).  (tested in: Counter-Strike: Source (v34) on Source 2006 and latest Counter-Strike: Source on Team Fortress 2 branch)
Lookup Falloff End Distance  (maxfalloff) <float>
Maximum distance from the entity that the effect is applied. At this distance, the effect is barely apparent but will strengthen as the viewer approaches the Start Distance.
Icon-Bug.pngBug:Does not work properly in Left 4 Dead 2. If set, the Color correction inside the fog_volume will not work at all!  [todo tested in ?]
Icon-Bug.pngBug:Value "-1" supposed to set color correction to apply everywhere, but this seems to cause color correction to not show up at all. Instead you can try set both value to "9999999" to apply color correction everywhere. This issue wasn't present or fixed on Orange Box branches (and later).  (tested in: Counter-Strike: Source (v34) on Source 2006 and latest Counter-Strike: Source on Team Fortress 2 branch)
Maximum Weight  (maxweight) <float>
This is the maximum weight for this lookup.
Note.pngNote: This value sets the strength of the color correction. 0.00 to 1.00
Lookup Fade In Duration  (fadeInDuration) <float>
When the entity becomes Enabled, how long the effect takes to fade in. (In seconds)
Lookup Fade out Duration  (fadeOutDuration) <float>
When the entity becomes Disabled, how long the effect takes to fade out. (In seconds)
Lookup Table Filename  (filename) <file path>
Pathfile from the mod folder to the .raw to reference. For info on making a file, see color correction. Example path for a file in the hl2 materials folder: materials/colorcorrection.raw
Exclusive  (exclusive) <boolean> (in all games since Left 4 Dead)
An exclusive color_correction entity disables and fades out all other color corrections when it is enabled. There should only be one active exclusive color_correction ent at any time.
Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).

Inputs

SetFadeInDuration <floatRedirectInput/float>
Sets the Lookup Fade In Duration.
SetFadeOutDuration <floatRedirectInput/float>
Sets the Lookup Fade out Duration.

EnableDisable:

Enable / Disable <void>
Enable/disable this entity from performing its task. It might also disappear from view.

See also