light_environment Last edited 1 week ago2024-07-14 19:51:26 UTC

light_environment - Point Entity

This entity makes the map's sky (specifically, User posted image sky-textured brushes) emit light. The only practical way of lighting outdoor maps.


ZHLT/VHLT-specific keyvalues:

Positioning logic

Use Pitch to shift the sun (or moon) vertically (similar to daytime/hours) and Yaw to shift it horizontally (cardinal direction or obliquity)
Pitch Result
Sun at the horizon (like in sunrise/sunset) - huge shadows on floor if at least a minimal amount of -pitch were given
-45° Sun between horizon and top (like 9 AM or 3 PM)
-90° Sun directly overhead (like 12 Noon) - only parallel shadows on floor
Yaw Result
facing RT side of the skybox
90° facing BK side of the skybox
180° facing LF side of the skybox
270° facing FT side of the skybox


_spread(integer) : "Spread Angle" : 0 : "Spread angle for soft shadows."
_diffuse_light(color255) : "Diffuse Light" : "255 255 128 50" : "Diffuse light color. Delete if diffuse light is normal."
Balancing Brightness, Ambient Color, and Sun Spread
User posted image
Here's a very rough guide on how to balance the three values:
  • On overcast skies, the ambient light should contribute more light than sunlight.
  • The sun's shadow gets more diffused the more overcast the sky is
This all depends on the choice of skybox that you use. Most of them are set on a clear sky which rules out any pressing need to set the sun spread value.

Also worth mentioning the lightmap resolution is the hard limit on how sharp shadows can be.

Example maps


You must log in to post a comment. You can login or register a new account.