Color correction volume

From Valve Developer Community
Revision as of 18:42, 27 July 2023 by Braindawg (talk | contribs) (added maxweight bug info)
Jump to navigation Jump to search
English (en)Hrvatski (hr)中文 (zh)Translate (Translate)
C++ Class hierarchy
CColorCorrectionVolume
CBaseTrigger
CBaseToggle
CBaseEntity
C++ colorcorrectionvolume.cpp

Template:Entity A color correction lookup table is faded in or out when a player enters or leaves its volume. Fade time is configurable.

Icon-Bug.pngBug:This entity does not work in Counter-Strike: Global Offensive Counter-Strike: Global Offensive
PlacementTip.pngWorkaround:Use trigger_multiple brushes to output commands that disable an active color_correction entity and enable a separate color_correction entity in its place; upon touch.
Note.pngNote:If a color_correction entity has a value of -1 in both lookup falloff start and end distance, and is active as soon as you spawn, then enable that entity's "Master" flag. All other color_correction entities must be set to "StartDisabled" as seen in their keyvalues for this to work correctly.
  [todo tested in ?]
Warning.pngWarning:This entity affects all players connected in multiplayer, even if only one entity comes in contact with it.
Todo: Test in Left 4 Dead 2, which has more support for custom color correction
C++ In code, it is represented by theCColorCorrectionVolumeclass, defined in thecolorcorrectionvolume.cppfile.

Keyvalues

Lookup Fade Duration (fadeDuration) <float>
How fast the effect fades in or out when the viewer enters or exits.
Maximum Weight (maxweight) <float>
This is the maximum weight for this lookup.
Icon-Bug.pngBug:Does nothing when using StartTouch inputs to enable, lookup will always appear with maximum weight/strength  [todo tested in ?]
Lookup Table Filename (filename) <string>
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
Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).
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

Inputs

EnableDisable:

Enable / Disable
Enable/disable this entity from performing its task. It might also disappear from view.
BaseTrigger
Toggle
Toggles this trigger between enabled and disabled states.
Enable
Enable trigger
Disable
Disable trigger
TouchTest  (in all games since Source 2007)
Triggers either the OnTouching or OnNotTouching outputs for whether anything is touching this entity.
Icon-Bug.pngBug:Sleeping prop_physics will never fire "OnTouching". Also applies to entities using prop_physics as base.  (tested in: Half-Life 2)
StartTouch  (in all games since Source 2007) !FGD
Behave as if the !caller entity had just entered the trigger volume. Accepts non-physical entities.
EndTouch  (in all games since Source 2007) !FGD
Behave as if !caller had just exited the trigger volume.
DisableAndEndTouch  (only in Source 2013 MultiplayerTeam Fortress 2 branch)
Disables this trigger and calls EndTouch on all currently-touching entities.

See Also