Env ambient light: Difference between revisions
Jump to navigation
Jump to search

Note:The ambient term is completely flat, making this entity a poor replacement for static light.
Bug:This entity works by setting the
Portal 2 and later, the cvars will not be reset when changing maps! This makes the entity only suitable for standalone mods, as using it in a singular map will cause the effects to carry over into every following map that the user plays until another map turns it back off or the game is restarted. [todo tested in ?]
(-added class hierarchy, cleanup) |
Robotboy655 (talk | contribs) |
||
| Line 9: | Line 9: | ||
== Keyvalues == | == Keyvalues == | ||
{{KV Targetname}} | {{KV Targetname}} | ||
{{KV|Color (R G B) | {{KV|Color (R G B)|intn=color|color255|Ambient light color.}} | ||
{{KV SpatialEntity}} | {{KV SpatialEntity}} | ||
Revision as of 11:11, 11 March 2025
| CEnvAmbientLight |
env_ambient_light is a point entity available in all
Source games since
Alien Swarm. This entity adds a constant color value to dark areas of the world without affecting brighter areas. It can be faded in and/or take effect only within a certain radius (meaning brightness will increase as the viewer draws closer to the entity, not that there will be a spatial effect).
mat_ambient_light_ cvars to the values specified in the entity. This doesn't cause any problems in Alien Swarm, but in
Workaround:To prevent your map from being affected by ambient light from a previous map, you can place a env_ambient_lightentity in your map set to 0 0 0 to clear any previous ambient light values.
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
- Color (R G B) (color) <color255>
- Ambient light color.
SpatialEntity:
- 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.
- 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.
- Maximum Weight (maxweight) <float>
- This is the maximum weight for this lookup.[Clarify]
- Lookup Fade In Duration (fadeInDuration) <float>
- When the entity becomes
Enabled, how long the effect takes to fade in.
- Lookup Fade out Duration (fadeOutDuration) <float>
- When the entity becomes
Disabled, how long the effect takes to fade out.
- Start Disabled (StartDisabled) <boolean>
- Stay dormant until activated (with the
Enableinput).
Inputs
- SetColor <color255>
- Sets the color.
SpatialEntity:
- SetFadeInDuration <float>
- Sets the Lookup Fade In Duration.
- SetFadeOutDuration <float>
- Sets the Lookup Fade out Duration.
EnableDisable:
- Enable / Disable
- Enable/disable this entity from performing its task. It might also disappear from view.