light_dynamic
Jump to navigation
Jump to search
Code classes:
CDynamicLight
CBaseEntity
(all ents)
light_dynamic
is a point entity present in all Source games. It's a light that's computed and rendered in realtime. It can move and change its properties at any moment.
Note: The Pitch keyvalue doesn't actually affect the entity ingame. All it does is set the pitch of Hammer's lightcone helper. To see where light will cast, set Pitch to the first number in Pitch Yaw Roll and flip the + or - sign.
Note: env_projectedtexture
is generally agreed upon as a better entity for dynamic lighting for its more realistic results and less unintuitive setup. light_dynamic
does have some advantages, though; more than one can be on at once, and it can emit in all directions.
Flags[edit | edit source]
- 1: Do not light brushes
- 2: Do not light models
- 4:
Add Displacement Alpha- Doesn't work.
- 8:
Subtract Displacement Alpha- Doesn't work.
Keyvalues[edit | edit source]
- Entity to point at
(target)
<target_destination>
- An entity that the light will point at (even if either entity moves).
- Note: In some situations this will look extremely bad because the light recomputes the angle every tick with no interpolation, resulting in choppy "motion".
- Light color
(_light)
<color255>
- Color of the light. The 4th value does nothing.
- Light brightness
(brightness)
<integer>
- A value representing the light's intensity. 10 is probably much more than one will ever want. To fine tune the brightness, one can adjust the Light color to be darker.
Inner (bright) angle(_inner_cone)
<float>
- Affects nothing.[Confirmed]
- Outer (fading) angle
(_cone)
<float>
- How wide the light casts (on models). Set this to 0 to have the light cast in all directions (for models and brushes).
- Pitch
(pitch)
<integer>
- Pitch value used by Hammer's lightcone visualization. Doesn't affect the actual lighting at all.
- Maximum distance
(distance)
<float>
- How far away from the entity light can cast, in world units. Represented by a yellow sphere in Hammer.
- Spotlight end radius
(spotlight_radius)
<float>
- How big of a circle to illuminate when light hits brushes. The light will always be in a circle shape.
- Appearance
(style)
<choices>
- Modulates the light's brightness. See here for preset info.
Inputs[edit | edit source]
- Color
<color255>
- Sets Light color.
- brightness
<integer>
- Sets Light brightness.
- distance
<float>
- Sets Maximum distance.
_inner_cone<float>
- Sets Inner (bright) angle.
- _cone
<float>
- Sets Outer (fading) angle.
- spotlight_radius
<float>
- Sets Spotlight end radius.
- style
<integer>
- Sets Appearance.
- TurnOn
- Turns the light on.
- TurnOff
- Turns the light off.
- Toggle
- If on, turn off. If off, turn on.