Skip to main content

light_environment

light_environment icon
Point entity

A light_environment is the sun, which the map compiler uses to light every face that sees the sky. Its color, its brightness and its angle also light the models in the game.

Attributes​

The entity also has these common keys:

KeyDescriptionDefault
Nametargetname

Triggering the entity switches the sunlight on or off, and the map compiler gives a sun with a name its own light style. See Common keys.

Pitchpitch

Sets the up and down angle of the sun, where a negative number points the sun down, and -90 points straight down.

If you leave this key empty, it is the pitch of Pitch Yaw Roll, and 0 puts the sun level with the horizon.

Default -90
Brightness_light

Sets the color of the sun, as R G B, and its brightness. It also sets the light of the models in the game, the engine setting sv_skycolor, which the map sets from this key and which stays on when a sun with a name is dark.

Default 255 255 128 200
Sun Spread Angle_spread

Sets the angle in degrees over which the map compiler spreads the sunlight for soft sun shadows, where 0 gives hard shadows. ZHLT doesn't read it.

Default 0
Ambient Color_diffuse_light

Sets the color and the brightness the map compiler gives the light of the sky around the sun.

If you leave this key empty, it is the light of the sun.

Sun Diffuse_diffuse_light2

Sets the color and the brightness of the light from the part of the sky opposite the sun. The map compiler blends the sky light from Ambient Color near the sun into this color on the other side. ZHLT doesn't read it.

If you leave this key empty, it is Ambient Color.

Only Dynamic_fake

Sets whether the map compiler lets the sun light the faces of the map. ZHLT doesn't read it.

  • No (empty)
  • Yes (1) - The sun only sets the light of the models
  • No (empty) - The sun lights the faces and the models
Default No (empty)
Appearancestyle

Picks the pattern the brightness of the sunlight follows, because the map compiler puts the light in that light style and the game plays the pattern. A sun with a Name ignores it.

The 12 choices
  • Normal (0)
  • Fluorescent flicker (10)
  • Slow, strong pulse (2)
  • Slow pulse, noblack (11)
  • Gentle pulse (5)
  • Flicker A (1)
  • Flicker B (6)
  • Candle A (3)
  • Candle B (7)
  • Candle C (8)
  • Fast strobe (4)
  • Slow strobe (9)
Default Normal (0)
Custom Appearancepattern

For a sun with a Name, sets its own pattern of brightness, as letters from a for dark through m for normal up to z for the brightest, played at 10 letters a second, up to 63 letters. It replaces Appearance.

Flags​

1Initially dark

The sun starts off and turns on when you trigger it. It only works on a sun with a Name

See also​