This article's documentation is for the "GoldSrc" engine. Click here for more information.

light_environment

From Valve Developer Community
Jump to navigation Jump to search
English (en)Translate (Translate)

light_environment is a point entity available in all GoldSrc GoldSrc games.

Description

Creates the sunlight emitted from sky brushes. There needs to be one per PVS if using the default compile tools. Only one is needed per map if using the ZHLT compile tools.

Key values

Todo: Document _diffuse_light and _spread, added with ZHLT, and _diffuse_light2, added with VHLT.
Pitch <angle>
Overrides the pitch value in Angles, even if left at 0, so it needs to be specified. Contrary to Angles, the rotation of this pitch is measured counter-clockwise from the horizontal, so that 90 is straight up, while -90 is straight down. (It's simply the negative of a normal pitch value.)
Brightness <color255 + int>
Color and brightness of direct Sunlight.

Targetname:

Name (targetname) <string>
The targetname that other entities refer to this entity by.
Pitch Yaw Roll (Y Z X) (angles) <angle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.

ZHLT light source:

ZHLT Fade <float>
ZHLT Falloff <integer>
  • 0 : Default
  • 1 : Inverse Linear
  • 2 : Inverse Square
Texlight (VHLT+) (_tex) <texture>
HLCSG will rename this entity to light_surface, using the specified texture as the emissive texture.
Ambient (ZHLT+) (_diffuse_light) <color255 + int>
Ambient 2 (ZHLT+) (_diffuse_light2) <color255 + int>
Sun spread angle (_spread) <integer>
Model lighting only (VHLT v16+) (_fake) <boolean>
Treat this entity as an info_sunlight, causing it to not affect lightmaps.