NewLight Point: Difference between revisions
Jump to navigation
Jump to search

Note:You can have only 512 point light entities placed in the map editor.
Warning:This is one of the most expensive features, use wisely.
Warning:You can have only 40 point lights with godrays enabled simultaneously, otherwise the game will crash with this error message.
Note:You can't use black colors for ColorOuter, ColorInner and ColorRays.
Confirm:Does it affect anything else ?
MyGamepedia (talk | contribs) |
MyGamepedia (talk | contribs) |
||
| (17 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{TabsBar|main=Black Mesa Deferred Lights}} | |||
{{this is a|point entity|name=newLight_Point|game=Black Mesa|sprite=NewLight Point.png}} It creates an invisible [[Deferred lighting|deferred light]] source that shines in all directions, includes godrays and lightcookies. | {{this is a|point entity|name=newLight_Point|game=Black Mesa|sprite=NewLight Point.png}} It creates an invisible [[Deferred lighting|deferred light]] source that shines in all directions, includes godrays and lightcookies. | ||
{{CDA|CNewLightPoint|CBaseEntity|}} | {{CDA|CNewLightPoint|CBaseEntity|}} | ||
[[File:NewLight_PointMain.jpg|720px||thumb|right|NewLight_Point in {{code|End Game}} chapter (used for the portal).]] | [[File:NewLight_PointMain.jpg|720px||thumb|right|NewLight_Point in {{code|End Game}} chapter (used for the portal).]] | ||
{{Note|You can have only 512 point light entities placed in the map editor.}} | {{Note|You can have only 512 point light entities placed in the map editor.}} | ||
==Keyvalues== | ==Keyvalues== | ||
| Line 34: | Line 34: | ||
{{I|TurnOff|param=void|Turn the light off.}} | {{I|TurnOff|param=void|Turn the light off.}} | ||
{{I|Toggle|param=void|Toggle the light's current state.}} | {{I|Toggle|param=void|Toggle the light's current state.}} | ||
Latest revision as of 07:57, 5 November 2025

newLight_Point is a point entity available in
Black Mesa. It creates an invisible deferred light source that shines in all directions, includes godrays and lightcookies.
| CNewLightPoint |
Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentnameortarget).
Also displayed in Hammer's 2D views and Entity Report. - See also: Generic Keyvalues, Inputs and Outputs available to all entities
- Pitch Yaw Roll (Y Z X) (angles) <angle> !FGD
- 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.
Note:There is almost no differences if you're using point light with no texture. Things changes if you're using textures.
Use old Falloff ? (bUseOldFallOff) <choices>!FGD
- Deprecated.
Sets old falloff state, disabled or enabled. This feature is disabled in the code, so you can't use old falloff (although it is still used for the flashlight).- 0: Disabled
- 1: Enabled
- 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.
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).
Note:Custom light styles are not possible.
- 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).
- Light Type (LightType) <choices>
- Type of the light. This affects the behavior of the light source with parent, enable/disable dynamic models in shadowmaps, enable/disable static shadowmaps.
- 0: Static - used only static shadowmaps, this means that shadows are cast only by static objects (prop_static, geometry, etc). Cannot move with parent.
Important:Brush entities and bmodels are also included in static shadowmaps and they never update (including func_physbox).
Note:Static shadowmaps will update after save reload (only once).
- 1: Stationary - the same as Static, but with dynamic shadows for dynamic models.
- 2: Dynamic - lighting don't use static shadowmaps at all. It uses dynamic shadows for static objects and dynamic models. This type also can move with parent. This type is expensive, usually used for moving lights, but also can be used if you're getting issues due to static shadowmaps.
Examples
Note:Note that shadow from metal box and grate box are flying on first and second pictures, that's because both was placed in air on map spawn. Doesn't happen on third picture, because the light updated shadow for both.
- HasShadow (HasShadow) <choices>
- Sets shadows state for the light, enabled or disabled. Remember that the default choices is No.
- 0: No
- 1: Yes
Examples
- ShadowMapLOD (ShadowLod) <choices>
- Resolution of shadowmap used by this light. This affects the quality of the shadows.
- 0: 256
- 1: 512
- 2: 1024
Examples
Important:You cannot use any value from here an unlimited number of times. More information below.
- ShadowRadius (ShadowRadius) <float>
- Radius of shadow edges for soft shadows. If its value is negative, code will auto assign a value depending on ShadowLod. These code based values can be adjusted via convars
nr_shadow_rad_High,nr_shadow_rad_Medandnr_shadow_rad_Low.
Examples
Tip:Don't use very low values, because the shadows will look like stairs. Also don't use very high values, because the noise will spoil them a lot, or you'll see only noise.
- NearZ (NearZ) <float>
- NearZ used by shadowmap camera for this light. This is the distance at which the light source will start cast shadows.
- ShadowFaceX (ShadowFaceX) <choices>
- Sets shadow state (enabled or disabled) for X face.
- 0: Enabled
- 1: Disabled
- ShadowFaceX_Minus (ShadowFaceX_Minus) <choices>
- Sets shadow state (enabled or disabled) for -X face.
- 0: Enabled
- 1: Disabled
- ShadowFaceY (ShadowFaceY) <choices>
- Sets shadow state (enabled or disabled) for Y face.
- 0: Enabled
- 1: Disabled
- ShadowFaceY_Minus (ShadowFaceY_Minus) <choices>
- Sets shadow state (enabled or disabled) for -Y face.
- 0: Enabled
- 1: Disabled
- ShadowFaceZ (ShadowFaceZ) <choices>
- Sets shadow state (enabled or disabled) for Z face.
- 0: Enabled
- 1: Disabled
- ShadowFaceZ_Minus (ShadowFaceZ_Minus) <choices>
- Sets shadow state (enabled or disabled) for -Z face.
- 0: Enabled
- 1: Disabled
- DepthBias (DepthBias) <float>
- DepthBias is offset added to depth values in shadowmaps.
Examples
- SlopeDepthBias (SlopeDepthBias) <float>
- Slope Depth Bias used for surfaces having aliasing due to steep angles with light.
Examples
- NormalBias (NormalBias) <float>
- While rendering objects into shadowmaps, each vertex will be moved along -ve Normal direction, giving it an appearance of shrinking while rendering to shadowmaps. This property determines the amount of Units to be moved. Helps with shadow aliasing.
Examples
Note:You will not see any changes if your material doesn't not provide bumpmap.
Important:Increasing this value will make shadows between different surfaces less accurate, greate example is third picture in examples, there you can see "two" shadows from railing.
Bug:Numbers lower than 0.8 can cause huge graphics issues. Example.
Tip:Increase this value if you are getting aliasing issues like this.
- Enable Texture Light (bTexLight) <choices>
- Sets lightcookie (texture lights) state, enabled or disabled.
- 0: Disabled
- 1: Enabled
Examples
- Texture name for TexLight (texName) <string>
- Determines which texture will use the light source. Lightcookies are using .vtf (not .vmt) texture from files (just like env_projectedtexture).
.Enable Prop Only Mode (bNegLight) <choices>
- Deprecated.
Sets prop only mode, which supposed to disable shadows for world geometry. Doesn't work. The same effect can be achieved with shadow pass settings.- 0: Disabled
- 1: Enabled
- LightnGodRayMode (LightnGodRayMode) <choices>
- This determines what effects will be available to use for the light source. Keep in mind that the default choice is Light.
- 0: Light - light only.
- 1: Godrays - godrays only.
- 2: Both Light and GodRays - both light and godrays.
Bug:Even if godrays is turned off, the game will still think that the godrays is used if choice is GodraysorBoth Light and GodRays.
- EnableGodRays (EnableGodRays) <choices>
- Sets godrays state on spawn, enabled or disabled.
- 0: Disabled
- 1: Enabled
- Density (Density) <float>
- Density controls the length of rays/volumetric shadows. 1.0 should work in 99% cases. Good values are 0.5-1.5.
Examples
- Weight (Weight) <float>
- Weight controls the intensity of volumetric shadow. Blocking of rays by geometry. Good values are 0.1-10.
Examples
Decay (Decay) <float>
- Deprecated.
Decay controls luminance fall off per sample. Value here doesn't work.
- 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.
Examples
- DistFactor (DistFactor) <float>
- DistFactor controls the falloff of rays/length. 1.0 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.
Examples
- ColorInner (ColorInner) <color255 + int>
- The RGB color and brightness of the inner circle. Colors and brightness must be between 0 and 255.
Bug:This color value doesn't work properly with newLight_Point if you are using Normal godrays type. This entity takes only red value. Works fine with Fancy type.
Examples
Note:Rays is disabled on this picture (the colors are partially blending).
- ColorRays (ColorRays) <color255 + int>
- The RGB color and brightness of the rays. Colors and brightness must be between 0 and 255.
Examples
- ColorOuter (ColorOuter) <color255 + int>
- The RGB color and brightness of the outer circle. Colors and brightness must be between 0 and 255.
Bug:This color value doesn't work properly with newLight_Point if you are using Normal godrays type. This entity takes only red value. Works fine with Fancy type.
Examples
Note:Rays is disabled on this picture (the colors are partially blending).
- DiskRadius (DiskRadius) <float>
- Radius of disk/circle of sun/point light in texturespace. 1.0 will be full screen, 0.5 is half screen, etc. 0 means don't render.
Examples
- DiskInnerSizePercent (DiskInnerSizePercent) <float>
- Disk inner circle radius is DiskRadius * DiskInnerSizePercent. 0 means don't render.
Examples
Note:Rays is disabled on this picture (for clarity).
- GodRaysType (GodRaysType) <choices>
- Sets godrays type, normal or fancy.
- 0: Normal
- 1: Fancy
Examples
- RenderInWorldSpace (m_bEnableWorldSpace) <choices>
- Disables disks if this enabled.
- 0: Disabled
- 1: Enabled
- Ell_FR_ConstA (Ell_FR_ConstA) <float>
- This is fancy godrays disk size.
Examples
- Ell_FR_ConstB (Ell_FR_ConstB) <float>
- This is fancy godrays disk distortion.
Examples
- EEll_SR_ConstA (EEll_SR_ConstA) <float>
- This is fancy godrays disk hole size.
Examples
- EEll_SR_ConstB (EEll_SR_ConstB) <float>
- This is fancy godrays disk hole distortion.
Examples
- Ell_RRF_ConstA (Ell_RRF_ConstA) <float>
- This is fancy godrays inner size.
Examples
- Ell_RRF_ConstB (Ell_RRF_ConstB) <float>
- This is fancy godrays inner distortion.
Examples
- RotSpeed (RotSpeed) <float>
- Rotating speed of fancy godrays, 0 means don't rotate, with negative number it will rotate to left. Examples (link to a video that showcase different values).
- RotPatternFreq (RotPatternFreq) <integer>
- Count of fancy godrays, with negative number will deny RotSpeed +/- effect. Examples (link to a video that showcase different values).
m_fAlphaDiskInner (m_fAlphaDiskInner) <float>
- Deprecated.
Alpha inner value for disk. Doesn't work.
m_fAlphaDiskOuter (m_fAlphaDiskOuter) <float>
- Deprecated.
Alpha outer value for disk. Doesn't work.
UseToneMapRays (m_bUseToneMapRays) <choices>
- Deprecated.
Sets tonemap state for rays, enabled or disabled. Doesn't work.
- 0: Enabled
- 1: Disabled
UseToneMapDisk (m_bUseToneMapDisk) <choices>
- Deprecated.
Sets tonemap state for disk, enabled or disabled. Doesn't work.
- 0: Enabled
- 1: Disabled
- ShadowPass_Brush (m_bSRO_Brush) <choices>
- Do we want to render world geometry in shadow passes for this light ? Doesn't affect bmodels.
- 0: YES
- 1: NO
- ShadowPass_StaticProp (m_bSRO_StaticProp) <choices>
- Do we want to render prop_static in shadow passes for this light ? This also affect bmodels.
- 0: YES
- 1: NO
- ShadowPass_DynProp (m_bSRO_DynProp) <choices>
- Do we want to render dynamic models in shadow passes for this light ?
- 0: YES
- 1: NO
- ShadowPass_AlphaTest (m_bSRO__Trans) <choices>
- Do we want to render models with transparency materials in shadow passes for this light ? Objects with transparency can cast shadows if your model includes a material without transparency.
- 0: YES
- 1: NO
Inputs
- SetColorLight <color255>
- Change light's color value. Doesn't affect the godrays.
- SetIntensityForLight <float>
- Change light's intensity value. Doesn't affect the godrays.
- TurnOnGodRays <void>
- Turn the godrays on.
- TurnOffGodRays <void>
- Turn the godrays off.
- TurnOn <void>
- Turn the light on.
- TurnOff <void>
- Turn the light off.
- Toggle <void>
- Toggle the light's current state.
