newLight_Dir

newLight_Dir
is an e0 available in Black Mesa. It is one of the many new lighting entities available. Black Mesa incorporates a new lighting system which utilizes
Deferred lighting to create a hyper realistic interpretation of light. This entity draw in skybox post processing effect called GodRays, also include disk to imitate sun.
Keyvalues
- Name (targetname) <string>
- The name that other entities refer to this entity by.
- Parent (parentname) <targetname>
- The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent.
- 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.
- LightEnvEnabled (LightEnvEnabled) <choices>
- Grab direction and color values from light_env ?
Determines is the entity use Light_environment direction or its own (just like env_sun).
- 0: Enabled : Fetch Angles from Light_Env
- 1: Disabled : Use Manual Angles
- PushbackDist (PushbackDist) <float>
- PushbackDist.
Determines distance from GodRays to player in skybox.
|
- EnableGodRays (EnableGodRays) <choices>
- Enable GodRays.
Determines whether godrays are enabled or not.
- 0: Disabled
- 1: Enabled
- Density (Density) <float>
- Density Controls the length of rays/volumetric shadows. 1.0 should work in 99% cases. Good values to start from: 0.5 to 1.5.
|
- Weight (Weight) <float>
- Weight Controls the intensity of volumetric shadow. Blocking of rays by geometry. Good values to start from: 0.1 - 10.0.
|
- Decay (Decay) <float>
- Decay NOT being used.
- Exposure (Exposure) <float>
- Exposure Controls the intensity of Rays during blending pass with main scene. 2.0 is a good start. Good values are 1.0 - 10.0.
|
- DistFactor (DistFactor) <float>
- DistFactor Controls the falloff of rays / length. 1.0f is a good starting value increase or decrease in the increments of 0.1. 0.0 will make the rays dissappear only disk will be rendererd.
|
- DiskRadius (DiskRadius) <float>
- Radius of Disk/circle of sun in texturespace. 1.0 will be full screen 0.5 is half screen etc.
|

- ColorInner (ColorInner) <color255>
- This is the color of the inner circle.
|

- ColorRays (ColorRays) <color255>
- This is the color of the rays.
|

- DiskInnerSizePercent (DiskInnerSizePercent) <float>
- Used only in Fancy Gaphics Mode. Disk inner circle radius = DiskRadius * DiskInnerSizePercent.
|

- ColorOuter (ColorOuter) <color255>
- Used only in Fancy Mode. This is the color of the outer circle.
|

- UseToneMapDisk (m_bUseToneMapDisk) <choices>
- 0: Enabled
- 1: Disabled
Inputs
- TurnOnGodRays
- Turn the Godrays on.
- TurnOffGodRays
- Turn the Godrays off.
Outputs
Issues
Engine limit
Level can't have more than one newLight_Dir, otherwise game will crash with this error message. However - you still can spawn new with point_template and kill old if you need to change Godrays position, change color, etc.
Incorrect work with $translucent
Godrays (also disk) all time fully rendering through textures with material shader parameter $translucent, because of this you will see unexpected results like in the picture. Disable Godrays when you need or use $alphatest if it'll give resualts similar to $translucent. You also can try use some other tricks to escape this problem.
Godrays incorrect work with point_viewcontrol
Godrays change position in sky when player move, this affects to what show point_viewcontrol when it's enabled. If you want to see in your background level Godrays - place player on needed position. If your point_viewcontrol moves - attach player to it.
File:PointViewControlFlareBug.gif Showcase of problem in background level of Black Mesa: Black Ops - Restored |
Godrays render through 3D Skybox objects
Unlike env_sun Godrays (also disk) render through any object pasted in 3D Skybox environment. Keep in mind this before you will create 3D Skybox.
![]() Clear example (the missiles is 3D Skybox objects) |
![]() In bs_c3m2b level from Black Mesa: Blue Shift |
See Also
- newLight_Point
- env_lensflare
- light_environment
- env_cascade_light
- Advanced Lighting
- Effect flags (dynamic light effects)
- BlackMesa XenEngine: Part 4 – Lighting & Shadows (page from Black Mesa developer about new lights)