light_environment
- Counter-Strike 2
- Half-Life: Alyx
- Steam VR

Point Entity
Sets the color and angle of the light from the sun and sky.
Typical setup:
- Create an env_sky entity to use as your skybox
- Create a light_environment entity and set Sky IBL Source to the name of the env_sky entity
- Right-click on your light_environment entity and select 'Selected environment light -> Estimate lighting from HDR skybox'
- Adjust angle and brightness of the sunlight as you see fit
Keyvalues
-
Indirect Light Multiplier (
bouncescale
) <Float
> -
Enabled (
enabled
) <Boolean
> -
Color (
color
) <Color255
> -
Brightness (
brightness
) <Float
> -
Range (
range
) <Float
>
Distance range for light. 0=infinite -
Cast Shadows (
castshadows
) <Choices
>
Whether this light casts shadow- Dynamic & Baked
- Baked
- None
-
Shadow Priority (
shadowpriority
) <Choices
>
Priority for the lights shadowmap- Highest
- High
- Medium
- Low
- Default
-
Render to Cubemaps (
rendertocubemaps
) <Boolean
>
If disabled, direct lighting will not render into cubemaps. Not that this only works when Direct Lighting Type is set to Stationary or Dynamic. -
Appearance (
style
) <Choices
>- Normal
- Fluorescent flicker
- Slow, strong pulse
- Slow pulse, noblack
- Gentle pulse
- Flicker A
- Flicker B
- Candle A
- Candle B
- Candle C
- Fast strobe
- Slow strobe
-
Custom Appearance (
pattern
) <String
>
Set a custom pattern of light brightness for this light. Pattern format is a string of characters, where 'a' is total darkness, 'z' fully bright. i.e. 'aaggnnttzz' would be a steppy fade in from dark to light. -
Simple Sky Color (
skycolor
) <Color255
>
Uses a flat color for the sky lighting. Can be a good starting point but you can get much higher quality lighting by using an IBL/env_sky. -
Simple Sky Intensity (
skyintensity
) <Float
>
Scales the intensity of the Simple Sky Color. -
IBL Sky Source (
skytexture
) <TargetDestination
>
Here you can assign any env_sky entity for sky lighting. env_sky supports HDR/EXR high dynamic range lat-long/h-cross/v-cross skybox images is recommended for sky lighting for the best quality results. If you want to use a custom env_sky that is explicitly for sky lighting, you can use an env_sky with 'Start Disabled'. -
IBL Sky Scale (
skytexturescale
) <Float
>
Scale value for IBL intensity fine-tuning -
Sky Indirect Light Multiplier (
skybouncescale
) <Float
> -
Sky Ground Albedo (
skyambientbounce
) <Color255Alpha
>
This is the color of the virtual ground plane used for skybox IBL / color ambient lighting -
Brightness Scale (
brightnessscale
) <Float
>
Scale brightness by this amount, used for scripting direct light behaviour. NOTE: Only works on lights with Direct Lighting type set to Dynamic or Stationary. -
Shadow Softness / Sun Spread Angle (
angulardiameter
) <Float
>
Defines the shadow softness. Higher numbers produce more diffuse/softer shadows. 1 is a good starting value. -
Create Client-Only Entity (
clientSideEntity
) <Choices
>- No
- Yes
-
Direct Lighting Type (
directlight
) <Choices
>
How direct lighting should be represented- None
- Baked
- Stationary
- None
- Baked
- Dynamic
- Stationary
-
Stationary Light Shadows (
baked_light_indexing
) <Boolean
>
Allows mixed dynamic cascade shadow maps with Baked shadows. -
Allow SST Generation (
allow_sst_generation
) <Boolean
>
Allows SST generation for this (sun) light. -
Specular Softness (
minroughness
) <Float
>
USE WITH CAUTION: Artificially softens direct specular (not cubemaps) to simulate cheap, soft area lights. Note: Direct Lighting must be set to Stationary or Dynamic for this to have an effect. -
Custom AO Proxies (
ambient_occlusion_proxy_override
) <Boolean
> -
Custom AO Proxy Position 0 (
ambient_occlusion_proxy_position_0
) <TargetDestination
>
Relative to origin of the light_environment. -
Custom AO Proxy Position 1 (
ambient_occlusion_proxy_position_1
) <TargetDestination
>
Relative to origin of the light_environment. -
Custom AO Proxy Position 2 (
ambient_occlusion_proxy_position_2
) <TargetDestination
>
Relative to origin of the light_environment. -
Custom AO Proxy Position 3 (
ambient_occlusion_proxy_position_3
) <TargetDestination
>
Relative to origin of the light_environment. -
Custom AO Proxy Cone Softness 0 (
ambient_occlusion_proxy_cone_angle_0
) <Float
>
Softness of Imaginary Shadowing Light. -
Custom AO Proxy Cone Softness 1 (
ambient_occlusion_proxy_cone_angle_1
) <Float
>
Softness of Imaginary Shadowing Light. -
Custom AO Proxy Cone Softness 2 (
ambient_occlusion_proxy_cone_angle_2
) <Float
>
Softness of Imaginary Shadowing Light. -
Custom AO Proxy Cone Softness 3 (
ambient_occlusion_proxy_cone_angle_3
) <Float
>
Softness of Imaginary Shadowing Light. -
Custom AO Proxy Cone Strength 0 (
ambient_occlusion_proxy_strength_0
) <Float
>
Relative Strength of Imaginary Shadowing Light. -
Custom AO Proxy Cone Strength 1 (
ambient_occlusion_proxy_strength_1
) <Float
>
Relative Strength of Imaginary Shadowing Light. -
Custom AO Proxy Cone Strength 2 (
ambient_occlusion_proxy_strength_2
) <Float
>
Relative Strength of Imaginary Shadowing Light. -
Custom AO Proxy Cone Strength 3 (
ambient_occlusion_proxy_strength_3
) <Float
>
Relative Strength of Imaginary Shadowing Light. -
AO Proxy Ambient Strength (
ambient_occlusion_proxy_ambient_strength
) <Float
>
Relative Strength of Ambient/Unshadowed term. Lower values make darker shadows.
Inputs
-
SetParent <
String
>
Changes the entity's parent in the movement hierarchy. -
SetParentAttachment <
String
>
Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. -
SetParentAttachmentMaintainOffset <
String
>
Change this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. The entity will maintain it's position relative to the parent at the time it is attached. -
ClearParent <
Void
>
Removes this entity from the the movement hierarchy, leaving it free to move independently. -
Kill <
Void
>
Removes this entity from the world. -
KillHierarchy <
Void
>
Removes this entity and all its children from the world. -
AddOutput <
String
>
Adds an entity I/O connection to this entity. Parameter format: outputname>targetname>inputname>parameter>delay>max times to fire (-1 == infinite). Very dangerous, use with care. -
FireUser1 <
Void
>
Causes this entity's OnUser1 output to be fired. -
FireUser2 <
Void
>
Causes this entity's OnUser2 output to be fired. -
FireUser3 <
Void
>
Causes this entity's OnUser3 output to be fired. -
FireUser4 <
Void
>
Causes this entity's OnUser4 output to be fired. -
SetLightEnabled <
Void
>
Sets whether the light is enabled (takes parameter of 0 or 1) -
TurnOn <
Void
>
Turn the light on. -
TurnOff <
Void
>
Turn the light off. -
Toggle <
Void
>
Toggle the light on/off. -
SetLightColor <
Vector
>
Set light color -
SetLightBrightness <
Float
>
Set light brightness -
SetAppearance <
Integer
>
Set appearance 0=Normal 1=Flicker A, 2=Slow, strong pulse 3=Candle A ... -
SetCustomAppearance <
String
>
Set a custom pattern of light brightness for this light. Pattern format is a string of characters, where 'a' is total darkness, 'z' fully bright. i.e. 'aaggnnttzz' would be a steppy fade in from dark to light.
Outputs
-
OnUser1 <
Void
>
Fired in response to FireUser1 input. -
OnUser2 <
Void
>
Fired in response to FireUser2 input. -
OnUser3 <
Void
>
Fired in response to FireUser3 input. -
OnUser4 <
Void
>
Fired in response to FireUser4 input. -
OnKilled <
Void
>
Fired when the entity is killed and removed from the game.
Point Entity
Sets the color and angle of the light from the sun and sky.
Typical setup:
- Create an env_sky entity to use as your skybox
- Create a light_environment entity and set Sky IBL Source to the name of the env_sky entity
- Right-click on your light_environment entity and select 'Selected environment light -> Estimate lighting from HDR skybox'
- Adjust angle and brightness of the sunlight as you see fit
Keyvalues
-
Indirect Light Multiplier (
bouncescale
) <Float
> -
Render Diffuse (
renderdiffuse
) <Boolean
> -
Render Specular (
renderspecular
) <Choices
>- Off
- On
- Bake into cubemaps
-
Render Transmissive (
rendertransmissive
) <Choices
>- Off
- On
-
Indirect Lighting (
indirectlight
) <Choices
>
How indirect lighting should be represented- None
- Baked
-
Enabled (
enabled
) <Boolean
> -
Color (
color
) <Color255
> -
Brightness (
brightness
) <Float
> -
Range (
range
) <Float
>
Distance range for light. 0=infinite -
Cast Shadows (
castshadows
) <Choices
>
Whether this light casts shadow- No
- Yes
- Baked Only
-
Shadow Near Clip Plane (
nearclipplane
) <Float
>
Distance for near clip plane for shadow map -
Appearance (
style
) <Choices
>- Normal
- Fluorescent flicker
- Slow, strong pulse
- Slow pulse, noblack
- Gentle pulse
- Flicker A
- Flicker B
- Candle A
- Candle B
- Candle C
- Fast strobe
- Slow strobe
-
Custom Appearance (
pattern
) <String
>
Set a custom pattern of light brightness for this light. Pattern format is a string of characters, where 'a' is total darkness, 'z' fully bright. i.e. 'aaggnnttzz' would be a steppy fade in from dark to light. -
Start Fade Dist (
fademindist
) <Float
>
Distance at which the light starts to fade (<0 = use fademaxdist). -
End Fade Dist (
fademaxdist
) <Float
>
Maximum distance at which the light is visible (0 = don't fade out). -
Render to Cubemaps (
rendertocubemaps
) <Boolean
>
If true, this geometry renders into baked cube maps -
Priority (
priority
) <Integer
>
When the number of visible lights exceeds the rendering budget, higher priority lights are chosen for rendering first. -
Light Group (
lightgroup
) <String
>
Semicolon-delimited list of light groups to affect -
SunSpreadAngle (
angulardiameter
) <Float
>
The angular extent of the sun for casting soft shadows. Higher numbers are more diffuse. 1 is a good starting value. -
Cascade Count (
numcascades
) <Integer
>
Number of shadow cascades to use. -
Cascade Distance 0 (
shadowcascadedistance0
) <Float
> -
Cascade Distance 1 (
shadowcascadedistance1
) <Float
> -
Cascade Distance 2 (
shadowcascadedistance2
) <Float
> -
Cascade Resolution 0 (
shadowcascaderesolution0
) <Integer
> -
Cascade Resolution 1 (
shadowcascaderesolution1
) <Integer
> -
Cascade Resolution 2 (
shadowcascaderesolution2
) <Integer
> -
Sky Color (
skycolor
) <Color255
> -
Sky Intensity (
skyintensity
) <Float
> -
Lower Hemisphere Is Black (
lower_hemisphere_is_black
) <Boolean
> -
Sky IBL Source (
skytexture
) <TargetDestination
>
env_sky entity, lat-long/h-cross/v-cross skybox image, or sky material to use for sky IBL -
Sky IBL Scale (
skytexturescale
) <Float
>
Scale value for IBL intensity fine-tuning -
Sky Ambient Bounce (
skyambientbounce
) <Color255
> -
Sun Light Minimum Brightness Threshold (
sunlightminbrightness
) <Float
>
Brightness beyond which pixels in the Sky IBL Source are considered to be coming from the sun -
Ambient Occlusion (
ambient_occlusion
) <Boolean
> -
Ambient Occlusion Max Distance (
max_occlusion_distance
) <Float
> -
Ambient Occlusion Fully Occluded Fraction (
fully_occluded_fraction
) <Float
> -
Ambient Occlusion Exponent (
occlusion_exponent
) <Float
> -
Ambient Lighting (
ambient_color
) <Color255
> -
Direct Lighting (
directlight
) <Choices
>
How direct lighting should be represented- None
- Baked
- Per-Pixel
- None
- Baked
- Per-Pixel
-
Fog contribution strength (
fogcontributionstrength
) <Float
>
Overrides how much the light affects the fog (if enabled) -
Volumetric Fogging (
fog_lighting
) <Choices
>
How should light interact with volumetric fogging- None
- Baked
- Dynamic
- Baked - no shadows
- Dynamic - no shadows
-
Baked Light Indexing (
baked_light_indexing
) <Boolean
>
Allows direct light to be indexed if baked. Indexed lights have per-pixel quality specular lighting and normal map response
Inputs
-
SetParent <
String
>
Changes the entity's parent in the movement hierarchy. -
SetParentAttachment <
String
>
Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. -
SetParentAttachmentMaintainOffset <
String
>
Change this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. The entity will maintain it's position relative to the parent at the time it is attached. -
ClearParent <
Void
>
Removes this entity from the the movement hierarchy, leaving it free to move independently. -
Kill <
Void
>
Removes this entity from the world. -
KillHierarchy <
Void
>
Removes this entity and all its children from the world. -
AddOutput <
String
>
Adds an entity I/O connection to this entity. Parameter format: outputname>targetname>inputname>parameter>delay>max times to fire (-1 == infinite). Very dangerous, use with care. -
FireUser1 <
Void
>
Causes this entity's OnUser1 output to be fired. -
FireUser2 <
Void
>
Causes this entity's OnUser2 output to be fired. -
FireUser3 <
Void
>
Causes this entity's OnUser3 output to be fired. -
FireUser4 <
Void
>
Causes this entity's OnUser4 output to be fired. -
SetLightEnabled <
Void
>
Sets whether the light is enabled (takes parameter of 0 or 1) -
TurnOn <
Void
>
Turn the light on. -
TurnOff <
Void
>
Turn the light off. -
Toggle <
Void
>
Toggle the light on/off. -
SetLightColor <
Vector
>
Set light color -
SetLightBrightness <
Float
>
Set light brightness -
SetAppearance <
Integer
>
Set appearance 0=Normal 1=Flicker A, 2=Slow, strong pulse 3=Candle A ... -
SetCustomAppearance <
String
>
Set a custom pattern of light brightness for this light. Pattern format is a string of characters, where 'a' is total darkness, 'z' fully bright. i.e. 'aaggnnttzz' would be a steppy fade in from dark to light.
Outputs
-
OnUser1 <
Void
>
Fired in response to FireUser1 input. -
OnUser2 <
Void
>
Fired in response to FireUser2 input. -
OnUser3 <
Void
>
Fired in response to FireUser3 input. -
OnUser4 <
Void
>
Fired in response to FireUser4 input. -
OnKilled <
Void
>
Fired when the entity is killed and removed from the game.
Point Entity
Sets the color and angle of the light from the sun and sky.
Typical setup:
- Create an env_sky entity to use as your skybox
- Create a light_environment entity and set Sky IBL Source to the name of the env_sky entity
- Right-click on your light_environment entity and select 'Selected environment light -> Estimate lighting from HDR skybox'
- Adjust angle and brightness of the sunlight as you see fit
Keyvalues
-
Indirect Light Multiplier (
bouncescale
) <Float
> -
Render Diffuse (
renderdiffuse
) <Boolean
> -
Render Specular (
renderspecular
) <Choices
>- Off
- On
- Bake into cubemaps
-
Direct Lighting (
directlight
) <Choices
>
How direct lighting should be represented- None
- Baked
- Per-Pixel
-
Indirect Lighting (
indirectlight
) <Choices
>
How indirect lighting should be represented- None
- Baked
-
Enabled (
enabled
) <Boolean
> -
Color (
color
) <Color255
> -
Brightness (
brightness
) <Float
> -
Range (
range
) <Float
>
Distance range for light. 0=infinite -
Cast Shadows (
castshadows
) <Choices
>
Whether this light casts shadow- No
- Yes
- Baked Only
-
Shadow Near Clip Plane (
nearclipplane
) <Float
>
Distance for near clip plane for shadow map -
Appearance (
style
) <Choices
>- Normal
- Fluorescent flicker
- Slow, strong pulse
- Slow pulse, noblack
- Gentle pulse
- Flicker A
- Flicker B
- Candle A
- Candle B
- Candle C
- Fast strobe
- Slow strobe
-
Custom Appearance (
pattern
) <String
>
Set a custom pattern of light brightness for this light. Pattern format is a string of characters, where 'a' is total darkness, 'z' fully bright. i.e. 'aaggnnttzz' would be a steppy fade in from dark to light. -
Start Fade Dist (
fademindist
) <Float
>
Distance at which the light starts to fade (<0 = use fademaxdist). -
End Fade Dist (
fademaxdist
) <Float
>
Maximum distance at which the light is visible (0 = don't fade out). -
Render to Cubemaps (
rendertocubemaps
) <Boolean
>
If true, this geometry renders into baked cube maps -
Priority (
priority
) <Integer
>
When the number of visible lights exceeds the rendering budget, higher priority lights are chosen for rendering first. -
SunSpreadAngle (
angulardiameter
) <Float
>
The angular extent of the sun for casting soft shadows. Higher numbers are more diffuse. 1 is a good starting value. -
Cascade Count (
numcascades
) <Integer
>
Number of shadow cascades to use. -
Cascade Distance 0 (
shadowcascadedistance0
) <Float
> -
Cascade Distance 1 (
shadowcascadedistance1
) <Float
> -
Cascade Distance 2 (
shadowcascadedistance2
) <Float
> -
Cascade Resolution 0 (
shadowcascaderesolution0
) <Integer
> -
Cascade Resolution 1 (
shadowcascaderesolution1
) <Integer
> -
Cascade Resolution 2 (
shadowcascaderesolution2
) <Integer
> -
Sky Color (
skycolor
) <Color255
> -
Sky Intensity (
skyintensity
) <Float
> -
Lower Hemisphere Is Black (
lower_hemisphere_is_black
) <Boolean
> -
Sky IBL Source (
skytexture
) <TargetDestination
>
env_sky entity, lat-long/h-cross/v-cross skybox image, or sky material to use for sky IBL -
Sky IBL Scale (
skytexturescale
) <Float
>
Scale value for IBL intensity fine-tuning -
Sky Ambient Bounce (
skyambientbounce
) <Color255
> -
Sun Light Minimum Brightness Threshold (
sunlightminbrightness
) <Float
>
Brightness beyond which pixels in the Sky IBL Source are considered to be coming from the sun -
Ambient Occlusion (
ambient_occlusion
) <Boolean
> -
Ambient Occlusion Max Distance (
max_occlusion_distance
) <Float
> -
Ambient Occlusion Fully Occluded Fraction (
fully_occluded_fraction
) <Float
> -
Ambient Occlusion Exponent (
occlusion_exponent
) <Float
> -
Ambient Lighting (
ambient_color
) <Color255
>
Inputs
-
SetParent <
String
>
Changes the entity's parent in the movement hierarchy. -
SetParentAttachment <
String
>
Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. -
SetParentAttachmentMaintainOffset <
String
>
Change this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. The entity will maintain it's position relative to the parent at the time it is attached. -
ClearParent <
Void
>
Removes this entity from the the movement hierarchy, leaving it free to move independently. -
Kill <
Void
>
Removes this entity from the world. -
KillHierarchy <
Void
>
Removes this entity and all its children from the world. -
AddOutput <
String
>
Adds an entity I/O connection to this entity. Parameter format: outputname>targetname>inputname>parameter>delay>max times to fire (-1 == infinite). Very dangerous, use with care. -
FireUser1 <
Void
>
Causes this entity's OnUser1 output to be fired. -
FireUser2 <
Void
>
Causes this entity's OnUser2 output to be fired. -
FireUser3 <
Void
>
Causes this entity's OnUser3 output to be fired. -
FireUser4 <
Void
>
Causes this entity's OnUser4 output to be fired. -
SetLightEnabled <
Void
>
Sets whether the light is enabled (takes parameter of 0 or 1) -
TurnOn <
Void
>
Turn the light on. -
TurnOff <
Void
>
Turn the light off. -
Toggle <
Void
>
Toggle the light on/off. -
SetLightColor <
Vector
>
Set light color -
SetLightBrightness <
Float
>
Set light brightness -
SetAppearance <
Integer
>
Set appearance 0=Normal 1=Flicker A, 2=Slow, strong pulse 3=Candle A ... -
SetCustomAppearance <
String
>
Set a custom pattern of light brightness for this light. Pattern format is a string of characters, where 'a' is total darkness, 'z' fully bright. i.e. 'aaggnnttzz' would be a steppy fade in from dark to light.
Outputs
-
OnUser1 <
Void
>
Fired in response to FireUser1 input. -
OnUser2 <
Void
>
Fired in response to FireUser2 input. -
OnUser3 <
Void
>
Fired in response to FireUser3 input. -
OnUser4 <
Void
>
Fired in response to FireUser4 input. -
OnKilled <
Void
>
Fired when the entity is killed and removed from the game.