NewLights_settings
NewLights_settings
is a point entity available in Black Mesa. This entity dynamically changes some lighting settings for newLight_Spot and newLight_Point if triggered by the input.
Represented by class CNewLightsSettings
.

Keyvalues
- Name (targetname) <string>
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- TargetNewLightEntity_Name (TargetNewLightEntity) <string>
- Here you enter name of new light source for which you want to apply changes. Works with multiple lights if they have the same name.
- TransitionTime (TransitionTime) <integer>
- Transition time in seconds (0 for instant) to transition into new settings. Its a lerp operation A + (B-A) * TimeFactor.
- LightType (LightType) <choices>
- Type of light source for which you want to apply settings. Entity will not apply settings for spot lights if selected
Point Light
and will not apply settings for point lights if selectedSpot Light
.
- 0: Point Light
- 1: Spot Light
- Light Color (LightColor) <color255>
- The RGB color of the light. Colors must be between 0 and 255.
- Light Intensity (Intensity) <float>
- Intensity/brightness of the light. It's RGB * intensity.
Note:With 0 it will make the light disabled, including the effects. Doesn't affect shadows.
- Range (Range) <float>
- Range of the light, or how far the light source can illuminate. Measured in Hammer Units.
Warning:This is one of the parameters that affects performance in the game. Smaller values allow you to process less geometry and save performance.
Note:Shadows from objects that are at a great distance look noticeably worse than shadows from objects that are near to the light source.
Important:Range is limited, the limit depends on intensity value. Do not use values bigger than the intensity value allows.
Examples
- Enabled (Enabled) <choices>
- Sets light state on spawn, enabled or disabled.
- 0: Enabled
- 1: Disabled
- Appearance (style) <integer choices>
- Appearance presets.
Lightstyle presets (epilepsy warning) Literal Value Description Sequence Preview 0 Normal m 10 Fluorescent flicker mmamammmmammamamaaamammma 2 Slow, strong pulse abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba 11 Slow pulse, noblack abcdefghijklmnopqrrqponmlkjihgfedcba 5 Gentle pulse jklmnopqrstuvwxyzyxwvutsrqponmlkj 1 Flicker A mmnmmommommnonmmonqnmmo 6 Flicker B nmonqnmomnmomomno 3 Candle A mmmmmaaaaammmmmaaaaaabcdefgabcdefg 7 Candle B mmmaaaabcdefgmmmmaaaammmaamm 8 Candle C mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa 4 Fast strobe mamamamamama 9 Slow strobe aaaaaaaazzzzzzzz 12 Underwater light mutation mmnnmmnnnmmnn
Tip:Use new lights instead for lights with custom appearance, because static lightmapped lights reduces performance with this feature (especially near displacements).
Confirm:Is it possible to have your own light styles (the property are using integer values) ?
- Light Ambient Color (LightColorAmbient) <color255>
- The RGB color of the shadows. Colors must be between 0 and 255.
Examples
- SpecularMultiplier (SpecMultiplier) <float>
- Specular multiplier. Sets intensity of new specular shader from this light source. It's RGB * Intensity * SpecularMultiplier. 0 means disabled.
Examples
falloffConstant (falloffConstant) <integer>!FGD- Deprecated.
Constant value (can work only if old falloff is enabled). falloffLinear (falloffLinear) <integer>!FGD- Deprecated.
Linear value (can work only if old falloff is enabled). falloffQuadratic (falloffQuadratic) <integer>!FGD- Deprecated.
Quadratic value (can work only if old falloff is enabled). - OuterAngle (phi) <float>
- Outer angle for spot light.
Warning:This affect shadow quality, less is better.
Important:Don't use values 180 and higher, this will make shadows and lighting broken.
- InnerAngle (theta) <float>
- Inner angle value for spot light.
Warning:Using values higher than in OuterAngle will not make ShadowFOV value higher. This will result in broken shadows.
- AngularFallOff (angularFallOff) <float>
- Angular falloff value.
Examples
Inputs
- InputApplySettings <void>
- Triggers the entity to apply the settings.
Bugs/Limitations
Range increasing doesn't increase BBOX
This results in the lighting disappearing before the player has completely moved their viewing angle away from the light source. This affects all light types, including Dynamic type.
OuterAngle increasing/decreasing doesn't change ShadowFOV
Static shadowmaps will be broken after increasing outer angle value for newLight_Spot (fixes after save reload). For Static light type, you will not have notable issues with decreasing, but shadows will not look better. Stationary light type will be broken after decreasing as well.
AngularFallOff may broke shadows for Stationary light type
Sometimes, for some reason, changing AngularFallOff value for Stationary light type will make your shadows look broken.
Range increasing/decreasing will make static shadowmaps broken
Range increasing/decreasing doesn't updatw static shadowmaps, this leaves old static shadowmaps that cannot be properly overlaid with the changed range value.
This is how it looks with increasing.
This is how it looks with decreasing.
See also
- newLight_Dir - directional sun light with godrays only.
- NewLights_Spawner - spawner of deferred point lights.
- env_lensflare - cinematic dynamic lens flare.
- newLight_Spot - spot deferred light entity.
- newLight_Point - point deferred light entity.
- godrays_settings - entity that changes godrays settings.
- env_cascade_light - deferred cascade sun light entity.
- New Lights Editor - in game deferred lights editor.
- Effect flags - effects flags, some of them are dynamic light effects.
- BlackMesa XenEngine: Part 4 – Lighting & Shadows - page from Chetan (lead programmer for Black Mesa) about new lights.
- BlackMesa XenEngine: Part2 – How a Frame is Rendered - page from Chetan (lead programmer for Black Mesa) about how a frame is rendered.
- BlackMesa XenEngine: Part1 – Heavily Modified Source Engine page from Chetan (lead programmer for Black Mesa) about
Xengine.