NewLight Spot: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
(28 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Toc-right}}{{This is a|name=newLight_Spot|e0|game=Black Mesa|sprite=NewLight_Dir-Icon-Small.png}} It is one of the many new lighting entities available. Black Mesa incorporates a new lighting system which utilizes [[Deferred lighting]] to create dynamic lighting system with dynamic shadows, which allows to complement and quite enliven some scenes, it is also nice effect for moving objects, such as trains. It is also include animated lightcookies.
{{this is a|point entity|name=newLight_Spot|game=Black Mesa|sprite=NewLight_Dir-Icon-Small.png}} It is a cone-shaped, invisible [[Deferred lighting|deferred light]] source, includes lightcookies with animations for them. The animations is based on row and column atlases or scroll mode.
{{warning|New lights use expensive [https://learnopengl.com/Advanced-Lighting/Deferred-Shading gbuffer], that means that with this entity your scene rendering at least 5 times, which makes your level very expensive, considering that [[XenEngine]] uses 32-bit architecture and [[DirectX_Versions|DirectX]] 9.5 rendering. In large quantities, new lights can greatly heat up your computer and also cause large FPS drops (depending on difficulty of your map and how your area open). Use wisely.}}
{{CDA|CNewLightSpot|CBaseEntity|}}
[[File:newLight_Spot_jpg.jpg|thumb|right|NewLight_Spot in bm_c4a1b (used for the floodlight).]]
{{note|You can have only 256 spot light entities placed in the map editor.}}
{{note|You can have only 256 spot light entities placed in the map editor.}}
{{back | Black Mesa Level Creation}}
{{todo|Update issues, rework page.}}
<br>
<gallery mode=packed heights=340px>
File:newLight_SpotGIF.gif| frame | center | 510px |NewLight_Spot in Black Mesa: Hazard Сourse After Disaster - Restored.
</gallery>
{{bms}} Represented by class <code>CNewLightSpot</code>.
 
==Keyvalues==
==Keyvalues==
<div style=overflow:auto;height:500px><div><!-- some template has an extra </div> thats effing with the scroll box, so here is an extra <div> to appease your hungry appetite. DO NOT REMOVE!!! Mediawiki deserves to die, Markdown superiority! -->
{{KV Targetname}}
{{KV|Name|intn=targetname|target_source|The name that other entities refer to this entity by.}}
{{KV|ReverseDir|intn=ReverseDir|Choices|By default, the Y angle for a spot light is inverted, which causes the light to point upward when pointed downwards. This option allows you to fix this problem.
{{KV|Parent|intn=parentname|target_destination|The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent.}}
{{KV|Pitch Yaw Roll (Y Z X)|intn=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.}}
{{KV|ReverseDir|intn=ReverseDir|Choices|Reverse the direction of spotlight
Reflects Y angle value and applies it.
{{Important|This additionally impacts performance, use it in extremely rare cases (like moving with NPC flashlight). For example if you want your [[NewLight_Spot]] to look up and not down, change value of Y angle from positive number to negative number.}}
*0: No
*0: No
*1: Yes}}
*1: Yes
{{expand|title=Examples|
:{{Important|This additionally impacts performance, use it in rare cases (for moving with NPC flashlight, etc), It is much better to invert required Y angle value (make it from 90 to -90 for example).}}
<br>
:{{expand|title=Examples|
<gallery mode=packed heights=400px>
<gallery mode=packed heights=400px>
File:ReverseDir0.jpg| thumb | left | 510px | ReverseDir - No (Pitch Yaw Roll (Y Z X) - 90 0 0)
File:ReverseDir0.jpg| thumb | left | 510px | ReverseDir - No (Pitch Yaw Roll (Y Z X) - 90 0 0)
Line 26: Line 16:
</gallery>
</gallery>
}}
}}
{{KV|Enabled|intn=Enabled|Choices|Enable/Disable this Entity.
Determines if the light is off at level start.
*0: Enabled
*1: Disabled}}
{{KV|Appearance|intn=FlareStyle|Choices|Appearance presets.
{{Light appearances}}
{{tip|Static lightmapped lights reduces performance with custom appearance (especially near displacements). If this cause problems, you can use replace your static lights with new lights, if used correctly - in most cases this will significantly preserve performance.
}}
}}
{{KV|Light Color|intn=LightColor|color255|This is the color of the sunlight.
Determines color of light.}}
{{KV|Light Ambient Color|intn=LightColorAmbient|color255|This is the ambient color of the sunlight.
Determines color of shadows that light source creates.}}
{{expand|title=Examples|
<br>
<gallery mode=packed heights=290px>
File:cShadowC1.jpg| thumb | left | 510px | 0 0 0
File:cShadowC2.jpg| thumb | left | 510px | 255 0 0
File:cShadowC3.jpg| thumb | left | 510px | 255 128 128
</gallery>
}}
{{KV|Light Intensity|intn=Intensity|float|RGB * Intensity.
Brightness of the light.}}
{{Note|With 0 will not draw, process and specular shader be disabled.}}
{{KV|SpecularMultiplier|intn=SpecMultiplier|float|0 to 1 RGB * Intensity * SpecularMultiplier.
Brightness [https://developer.valvesoftware.com/wiki/New_Specularof the specular] shader from this light source.}}
{{expand|title=Examples|
<br>
<gallery mode=packed heights=290px>
File:cBS IN1.jpg| thumb | left | 510px | SpecularMultiplier - 1
File:cBS IN10.jpg| thumb | left | 510px | SpecularMultiplier - 10
File:cBS IN20.jpg| thumb | left | 510px | SpecularMultiplier - 20
</gallery>
}}
{{KV|Range|intn=Range|float|Range.
How far the light source illuminates. Measured in Hammer Units.}}
{{Important|It greatly affects optimization, less is better.}}
{{expand|title=Examples|
<br>
<gallery mode=packed heights=290px>
File:cL1.jpg| thumb | left | 510px | Range - 150
File:cL2.jpg| thumb | left | 510px | Range - 300
File:cL3.jpg| thumb | left | 510px | Range - 500
</gallery>
}}
{{KV|OuterAngle|intn=phi|float|Double the value of lightcone for correct value, if you want 45 degrees in-game, put 90 here. hammer 45 deg [[=]] 90 in-game
Outer angle value for spot light.}}
{{KV|InnerAngle|intn=theta|float|Double the value of lightcone for correct value, if you want 45 degrees in-game, put 90 here. hammer 45 deg [[=]] 90 in-game
Inner angle value for spot light.}}
{{KV|AngularFallOff|intn=angularFallOff|float|AngularFallOff
Angular falloff.}}
{{Note|Results depend on values of OuterAngle and InnerAngle.}}
{{expand|title=Examples|
<br>
<gallery mode=packed heights=290px>
File:AngularFallOff1.jpg| thumb | left | 510px | AngularFallOff - 1 (OuterAngle - 60, InnerAngle - 30)
File:AngularFallOff2.jpg| thumb | left | 510px | AngularFallOff - 30 (OuterAngle - 60, InnerAngle - 30)
File:AngularFallOff3.jpg| thumb | left | 510px | AngularFallOff - 60 (OuterAngle - 60, InnerAngle - 30)
</gallery>
}}
{{KV|Light Type|intn=LightType|choices|
Determines the light type.
*0: Static - shadows are cast only by static objects ([[prop_static]], geometry, etc.). Lighting does not update if it has parent (use if part scene has no large moving parts, or shadow accuracy is not important).
*1: Stationary - shadows are cast by static and dynamic objects, lighting does not update if it has a parent. {{Important|Shadows for dynamic props update, but baked for geometry. That means that shadows from [[func_physbox]] and other dynamic geometry will never update, and shadows from other geometry on them too.}}
*2: Dynamic - lighting is not baked at all. Shadows are cast by static and dynamic objects, lighting updates if it does have a parent. This light is quite expensive, and should only be used for moving light sources, or if your scene have moving geometry.}}
{{expand|title=Examples|
<br>
<gallery mode=packed heights=420px>
File:B-1.gif|| thumb | left | 510px | Light Type - Static
File:B0.gif| thumb | left | 510px | Light Type - Stationary
File:B1.gif| thumb | left | 510px | Light Type - Dynamic
</gallery>
}}
{{KV|HasShadow|intn=HasShadow|choices|Do you want this light to have shadows?
Determines whether the light source will cast shadows. Remember that default choices is No.
*0: No
*1: Yes}}
{{expand|title=Examples|
<br>
<gallery mode=packed heights=410px>
File:cBM NO.jpg| thumb | left | 510px | Has Shadow - NO
File:cBM YES.jpg| thumb | left | 510px | Has Shadow - YES
</gallery>
}}
}}
{{important|With closed [[areaportals]], shadows baking for <code>Static</code> and <code>Stationary</code> new light types. With <code>Dynamic</code> new light type all shadows disappear.
{{KV BmNewLightOldFalloff}}
{{expand|title=An example.|
{{KV BmNewLightsSettings}}
<br>
{{KV BmNewLightShadowMain}}
<gallery mode=packed heights=410px>
{{KV BmNewLightShadowBias}}
File:cBlack Mesa Screenshot 2023.10.23 - 19.02.36.87.jpg| thumb | left | 510px | 
{{KV BmNewLightCookieSpot}}
</gallery>
{{KV BmNewLightShadowPasses‎}}
}}
}}
{{KV|ShadowMapLOD|intn=ShadowLod|choices|Resolution of ShadowMap used by this light.
Determines quality of shadows. 1024 is very expensive, use it only in places where it's really needed, in most cases 512 is good alternative. 256 produces the blurriest shadows, but it is also the cheapest.
*0: 256
*1: 512
*2: 1024}}
{{expand|title=Examples|
<br>
<gallery mode=packed heights=290px>
File:cLOD256.jpg| thumb | left | 510px | 256
File:cLOD512.jpg| thumb | left | 510px | 512
File:cLOD1024.jpg| thumb | left | 510px | 1024
</gallery>
}}
{{Important|In one level you can have only 8 light spot/points with shadows which use one and same shadow lod, even if you don't use all them simultaneously. If this limit is not respected - 9-th and next lights will not cast shadows. However - you can rise up this limit with {{ent|point_template}}, just kill past lights with kill input and spawn new when you need it. Also use different shadow lods.}}
{{KV|NearZ|intn=NearZ|float|NearZ used by shadowmap camera for this light.
Determines distance at which light source will cast shadows.}}
{{KV|DepthBias|intn=DepthBias|float|DepthBias - Offset added to depth values in shadowmaps.}}
{{expand|title=Examples|
<br>
<gallery mode=packed heights=290px>
File:DepthBias1.jpg| thumb | left | 510px | DepthBias - 0.0002
File:DepthBias2.jpg| thumb | left | 510px | DepthBias - 0.002
File:DepthBias3.jpg| thumb | left | 510px | DepthBias - 0.0000000002
</gallery>
}}
{{KV|SlopeDepthBias|intn=SlopeDepthBias|float|Slope Depth Bias - For surfaces having aliasing due to steep angles with light}}.
{{expand|title=Examples|
<br>
<gallery mode=packed heights=290px>
File:SlopeDepthBias1.jpg| thumb | left | 510px | SlopeDepthBias - 0.2
File:SlopeDepthBias2.jpg| thumb | left | 510px | SlopeDepthBias - 8
File:SlopeDepthBias3.jpg| thumb | left | 510px | SlopeDepthBias - 20
</gallery>
}}
{{KV|NormalBias|intn=NormalBias|float|While rendering objects into shadow maps, each vertex will be moved along -ve Normal direction, giving it an appearance of shrinking while rendering to shadow maps. This property determines the amount of Units to be moved. Helps with shadow aliasing.}}
{{expand|title=Examples|
<br>
<gallery mode=packed heights=290px>
File:cNB1.jpg| thumb | left | 510px | NormalBias - 1
File:cNB2.jpg| thumb | left | 510px | NormalBias - 5
File:cNB3.jpg| thumb | left | 510px | NormalBias - 10
</gallery>
}}
{{bug|Numbers lower than 0.8 can cause huge graphics problems.}}
{{expand|title=The bug example|
<br>
<gallery mode=packed heights=420px>
File:cNormalBiasBug.gif| frame | NormalBias - 0
</gallery>
}}
{{KV|ShadowFOV|intn=ShadowFOV|float|Fov used by shadowmap camera for this light. Keep it 0 to use Outer angle as the fov.}}
{{bug|If value lower than OuterAngle value - it'll cause broken shadow behavior.}}
{{expand|title=The bug example|
<br>
<gallery mode=packed heights=420px>
File:ShadowFOVBUG.jpg| frame | ShadowFOV value is 70 here, but OuterAngle value is 140.
</gallery>
}}
{{KV|ShadowRadius|intn=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_Med and nr_shadow_rad_Low.}}
Determines shadow blur. Low numbers are expensive to render.
{{expand|title=Examples|
<br>
<gallery mode=packed heights=290px>
File:cBLUR1.jpg| thumb | left | 510px | ShadowRadius - 0.0001
File:cBLUR2.jpg| thumb | left | 510px | ShadowRadius - 1
File:cBLUR3.jpg| thumb | left | 510px | ShadowRadius - 5
</gallery>
}}
{{KV|Enable Texture Light|intn=bTexLight|choices|Enable Texture Light
Determines whether the given light source uses .vtf texture from game files (just like {{ent|env_projectedtexture}}). A great example is survey scanner that use models/props_equipment/survey_lasercookietex.vtf.
*0: Disabled
*1: Enabled}}
{{expand|title=Examples|
<br>
<gallery mode=packed heights=390px>
File:cTE_Spot_Enabled.jpg |Disabled
File:cTE_Spot_Disabled.jpg |Enabled
File:survey lasercookietex.jpg |Texture that use survey scanner.
</gallery>
}}
{{Note|One of the most expensive features, use wisely. If shadows enabled - it can work with lags even with powerful PC.}}
{{KV|Texture name for TexLight|intn=texName|string|Texture name for TexLight.
Determines which texture will use light source. It use .vtf files, not .vmt.}}
{{KV|TexCookieFramesX|intn=TexCookieFramesX|integer|Num of frames in 1 row of Atlas}}
{{Note|If value lower than 1 - you'll get message in the developer console:
<code>TexCookieFramesX for LightSpot - class C_NewLightSpot CookieName - TEXTURENAME.vtf is 0. Are you sure this light is using texcookie? If yes then set this property to at least 1. </code>}}
{{KV|TexCookieFramesY|intn=TexCookieFramesY|integer|Num of frames in 1 column of Atlas}}
Sets scales for texture, with 2 and higher it allow TexCookieFps to animate texture.
{{Note|If value lower than 1 - you'll get message in the developer console:
<code>TexCookieFramesY for LightSpot - class C_NewLightSpot CookieName - TEXTURENAME.vtf is 0. Are you sure this light is using texcookie? If yes then set this property to at least 1. </code>}}
{{expand|title=Examples|
<br>
<gallery mode=packed heights=290px>
File:TexCookieFramesY1.jpg| thumb | left | 510px | TexCookieFramesY - 1
File:TexCookieFramesY2.jpg| thumb | left | 510px | TexCookieFramesY - 2
File:TexCookieFramesY3.jpg| thumb | left | 510px | TexCookieFramesY - 3
</gallery>
}}
{{KV|TexCookieFps|intn=TexCookieFps|float|FPS for Texture anim}}
Determines frame rate for animation. For animation [[NewLight_Spot]] divides texture into several parts (their count is indicated in TexCookieFramesY) and changes them in a specific sequence.
{{KV|Tex Cookie Scroll Mode|intn=bTexCookieScrollMode|choices|Tex Cookie Scroll Mode
Enables texture scrolling function. ScrollSpeedU and ScrollSpeedV sets scrolling speed and direction.
*0: Disabled
*1: Enabled}}
{{KV|ScrollSpeedU|intn=fScrollSpeedU|float|ScrollSpeedU}}
Determines scrolling speed along Y axis.
{{expand|title=Examples|
<br>
<gallery mode=packed heights=500px>
File:ScrollSpeedU2.gif| thumb | left | 510px | ScrollSpeedU - 2
File:ScrollSpeedU-1.gif| thumb | left | 510px | ScrollSpeedU - -1
</gallery>
}}
{{KV|ScrollSpeedV|intn=fScrollSpeedV|float|ScrollSpeedV}}
Determines scrolling speed along X axis.
{{expand|title=Examples|
<br>
<gallery mode=packed heights=500px>
File:ScrollSpeedV-1.gif| thumb | left | 510px | ScrollSpeedV - -1
File:ScrollSpeedV2.gif| thumb | left | 510px | ScrollSpeedV - 2
</gallery>
}}
{{KV|Enable Prop Only Mode|intn=bNegLight|choices|Enable Prop Only Mode.
{{todo|Document what it does.}}
*0: Disabled
*1: Enabled}}
{{KV|ShadowPass_Brush|intn=m_bSRO_Brush|choices|Do we want to Render Brushes in shadow passes for this light?
*0: YES
*1: NO}}
{{KV|ShadowPass_StaticProp|intn=m_bSRO_StaticProp|choices|Do we want to Render StaticProps in shadow passes for this light?
*0: YES
*1: NO}}
{{KV|ShadowPass_DynProp|intn=m_bSRO_DynProp|choices|Do we want to Render Dynamic Props in shadow passes for this light?
*0: YES
*1: NO}}
{{KV|ShadowPass_AlphaTest|intn=m_bSRO__Trans|choices|Do we want to Render AlphaTested Objects in shadow passes for this light?
*0: YES
*1: NO}}
{{KV|bUseOldFallOff|intn=bUseOldFallOff|choices|Enable old falloff similar to [[light]]/[[light_spot]].
*0: No
*1: Yes
|nofgd=1|deprecated=1}}
{{KV|falloffConstant|intn=falloffConstant|integer|Constant (work only if bUseOldFallOff enabled).|nofgd=1|deprecated=1}}
{{KV|falloffLinear|intn=falloffLinear|integer|Linear (work only if bUseOldFallOff enabled).|nofgd=1|deprecated=1}}
{{KV|falloffQuadratic|intn=falloffQuadratic|integer|Quadratic (work only if bUseOldFallOff enabled).|nofgd=1|deprecated=1}}
</div>


==Inputs==
==Inputs==
{{IO|SetColorLight|param=color255|Change Light's Color value. Doesnt effect the godrays}}
{{I|SetColorLight|param=color255|Change light's color value.}}
{{IO|SetIntensityForLight|param=float|Change Light's intensity value. Doesnt effect the godrays}}
{{I|SetIntensityForLight|param=float|Change light's intensity value.}}
{{IO|TurnOn|param=void|Turn the light on.}}
{{I|TurnOn|param=void|Turn the light on.}}
{{IO|TurnOff|param=void|Turn the light off.}}
{{I|TurnOff|param=void|Turn the light off.}}
{{IO|Toggle|param=void|Toggle the light's current state.}}
{{I|Toggle|param=void|Toggle the light's current state.}}
{{IO|InputFixRotBugDueToTram|param=void|InputFixRotBugDueToTram}}
{{I|InputFixRotBugDueToTram|param=void|Resets the [[Bounding box|bounding box]] size taking into account the current [[FOV]] and range values. Can be used to fix the bounding box size after applying [[NewLights settings|new settings for light]].}}
 
{{I BaseEntity}}
 
==Outputs==
{{O BaseEntity|}}


==Bugs/Limitations==
==Bugs/Limitations==
<!-- WIP TOC HERE:
See [[NewLight_Point/Bugs_and_limitations|/Bugs and limitations]]
<center>{{Expand|title=Table of Contents|1=<span style=color:white>'''Table of Contents'''</span><br>
;[[#Deferred_lighting_incorrect_work_with_.24translucent|Deferred lighting incorrect work with $translucecnt]]
}}</center>
-->
<div style="overflow:auto;height:850px;width:95%;background-color:rgba(38,38,38,85%);border-radius:5px;border:2px solid rgba(82,82,82,255);padding:5px">
====Deferred lighting incorrect work with [[$translucent]]====
Deferred lighting all time rendering through walls with [[material]] [[shader]] parameter [[$translucent]]. This happen because of game can't tell the depth of scene because of the transparency, what you are see in the picture is just the lighting layer applied to the color of transparency texture.
<br>
<gallery mode=packed heights=250px>
File:C BugHah.jpg| frame | No [[$translucent]]. Behind the wall placed lighting and some models with small room.
File:C BugDamn.jpg| frame | With [[$translucent]]. Now player see everything, but only what lighted.
</gallery>
<br>
<gallery mode=packed heights=250px>
File:C GargHah1.jpg| frame | Scene behide window. Looks like the gargantua has lost its texture and turned white.
File:C GargDamn1.jpg| frame | Scene out window. This is what should see player.
</gallery>
This problem also applies to brushes which not have [[$translucent]], but which parented to brushes that have this parameter. Similar will happen if brush with [[$translucent]] is part of your brush entity.
<br>
<gallery mode=packed heights=250px>
File:C BSFL1.jpg| frame | This sticker is brush parented to the glass. Flashlight off.
File:C BSFL2.jpg| frame | This sticker is brush parented to the glass. Flashlight on.
</gallery>
Same will happen if you use [[overlays]]/[[decals]] on brushes with [[$translucent]].
<br>
<gallery mode=packed heights=250px>
File:C MS1.jpg| frame | Metal speaker is overlay that use [[$alphatest]], but lighting of the health charger visible anyway, because overlay pasted on the transparency window.
</gallery>
This issues does not happen if replace [[LightmappedGeneric]] to [[ShatteredGlass]] or [[UnlitGeneric]], so, you can use one of them for glass or transparency surfaces when it's needed.
<br>
<gallery mode=packed heights=250px>
File:C HahF1.jpg| frame | [[LightmappedGeneric]].
File:C HahF2.jpg| frame | [[ShatteredGlass]].
</gallery>
In some cases use [[$alphatest]] if it'll give similar to [[$translucent]] resualts, with this your surface also will cast dynamic shadows.
<br>
<gallery mode=packed heights=250px>
File:C AF1.jpg| frame | [[$translucent]].
File:C AF2.jpg| frame | [[$alphatest]].
</gallery>
----
====Deferred lighting incorrect work with [[$alphatestreference]] and [[$allowalphatocoverage]]====
[[$alphatestreference]] is a [[material]] [[shader]] parameter that specifies the threshold alpha channel value at which the surface should be transparent instead of opaque, default "0.5". [[$allowalphatocoverage]] creates translucent steps based on alpha values. Both have one and same problems with deferred lighting.
For examples used this texture with this alpha channel.
<br>
<gallery mode=packed heights=250px>
File:C_ATSC_D.jpg| frame | Diffuse texture.
File:C_ATSC_A.jpg| frame | Alpha channel.
</gallery>
Here deferred lighting placed behind wall with the texture, lighting is red and shadows is blue. We can see the circle part of that have alpha channel part which is invisible due to $alphatest, with enabled deferred lighting we see that the invisible part doesn't show through itself deferred lighting with shadows.
<br>
<gallery mode=packed heights=250px>
File:C_ODSL_1_С.jpg| frame | Dynamic light disabled behind wall with the texture, using standart VRAD light.
File:C ODSL_2.jpg| frame | Dynamic light enabled behind wall with the texture, not using standart VRAD light.
</gallery>
From the opposite side the invisible part illuminates everything in itself equally, without taking into account decay of light, it's also don't show shadows and other dynamic lights in itself.
<br>
<gallery mode=packed heights=250px>
File:cIIPSEE_.jpg| frame | Dynamic light disabled, using standart VRAD light.
File:C IIPSEE.jpg| frame | Dynamic light enabled, not using standart VRAD light.
</gallery>
If use very low numbers you will see resualts like in the pictures.
<br>
<gallery mode=packed heights=250px>
File:cCCCC_11.jpg| frame | Dynamic light disabled, using standart VRAD light.
File:C CCCC_12.jpg| frame | Dynamic light enabled, not using standart VRAD light.
</gallery>
<br>
<gallery mode=packed heights=250px>
File:C CCCC_21.jpg| frame | Dynamic light disabled, using standart VRAD light.
File:CCCCC_22.jpg| frame | Dynamic light enabled, not using standart VRAD light.
</gallery>
You can't escape this problem, only minimize effect with <code>$alphatestreference 0.1</code> or if paint alpha correct channel.
----
====Weird clipping====
Often meeting strange clipping/flickering, strange bug that was in early stages of the game (this can be seen even in videos before new lights release in public), this does not depend on OS or drivers. Somehow related to <code>Range</code> value, since changing its value halfway fixes this bug, because it move away the bugged area.
<br>
<gallery mode=packed heights=350px>
File:cWC1.gif| frame |One of many examples.
File:cWC2.gif| frame |One of many examples.
File:cWC3.gif| frame |One of many examples.
</gallery>
----
 
====Brush polygons may clip deferred lighting====
Rare phenomenon, sometimes brush polygons clip deferred lighting, the reason that cause this is unknown. Can be easy fixed if divide invalid brush into two parts.
<br>
<gallery mode=packed heights=250px>
File:C BPl0.jpg| frame | One of examples (mat_wireframe 0).
File:C BPl1.jpg| frame | One of examples (mat_wireframe 1).
</gallery>
<br>
<gallery mode=packed heights=250px>
File:C BPb0.jpg| frame | One of examples (mat_wireframe 0).
File:C BPb1.jpg| frame | One of examples (mat_wireframe 1).
</gallery>
----
====Spot lights have sharpness bug if shadows enabled====
It is most noticeable if spot light is at not a right angle. It greatly degrades quality of shadows. Issue can be partially fixed if make <code>NormalBias</code> value bigger. Also can be minimized with shadow quality, range, outer and inner angles.
<gallery mode=packed heights=250px>
File:)BUGSUCK1.jpg| frame | An example.
File:)BUGSUCK2.jpg| frame | bm_c1a2b.
</gallery>
----
 
====Deferred lighting shine through [[nodraw]] texture====
Not a bug, but a pattern. Unfortunately, this cannot be controlled in any way, you should keep in mind this before paint [[nodraw]] to escape situations like in the gifs. If your dynamic light source illuminates face that player never see - use cheap textures with low resolution and which don't use material shader parameters, a good solution would be tools/toolsblack or any {{Shader Name|UnlitGeneric}} texture.
<br>
<gallery mode=packed heights=350px>
File:cSLB1.gif| frame | Black Mesa - bm_c2a2a.
File:cSLB2.gif| frame | Black Mesa: Blue Shift - bs_c0m0c.
</gallery>
----
====Shadows don't appear immediately after reload====
After game save and load shadows don't appear for short time, maybe it has something to do with caching. This appearance duration may vary depending on power of user PC and how much of lights with enabled shadows are turned on at level, but in any case user will get this issue even with most powerful PC. Enable in [[worldspawn]] settings <code>Level Fade In</code> to hide this problem, this setting also will hide some other problems with loads that avaible in{{bms|4}}.
<br>
<gallery mode=packed heights=450px>
File:cSDAIAR1.gif| frame | With no <code>Level Fade In</code>. It seems like the shadows flicker, which makes it unpleasant for eyes.
File:cSDAIAR2.gif| frame | With <code>Level Fade In</code>. Everything looks fine.
</gallery>
----
====Shadows don't appear immediately with a lot of lights with shadows====
If your level use a lot of lights with shadows - shadows from enabling lights will not appear immediately, this happens if light source was disabled and if player's camera did not see this light source enabled initially.This happen because shadows use passes per frame for memory, if level use a lot of new lights - game change integer value of cvar <code>nr_shadow_max_passes_per_frame</code> to lower numbers. Can be fixed if change cvar value with [[point_servercommand]] to <code>25</code> or if enable light source at level start and keep it enabled before drawing of level allows player's camera to see this light source, disable this light source and than enable when we need this.
<br>
<gallery mode=packed heights=450px>
File:cSDAIWALOLWS1alt.gif| frame | An example.
File:cSDAIWALOLWS2.gif| frame | bm_c2a1a.
</gallery>
----
====Dynamic lights with shadows may buggy====
In some cases your attached lights may have buggy shadows if parent moving, work smart when use this feature. If your moving light is decoration - highly recommended to leave shadows disabled to save limits and performance.
<br>
<gallery mode=packed heights=350px>
File:CSDAIWALOLWS1.gif| frame | An example.
File:cDLWSMB2.gif| frame | bm_c1a1c.
</gallery>
----
====Moving [[newLight_Spot]] clipping if shadows enabled====
Even with low speed, [[newLight_Spot]] clipping when rotating, but only if shadows enabled. With pause this bug get fix.
<br>
<gallery mode=packed heights=250px>
File:DamnCrowbarCollective2.gif| frame | An example.
File:DamnCrowbarCollective1.gif| frame | bm_c1a3a - emergency light sources.
File:CrowbarPickUpSceneBuggy.gif| frame | bs_c3m0a - scene with the stucked scientist.
File:RosenberAndFlashLight.gif| frame | bs_c3m2a - Dr. Rosenberg scene.
</gallery>
----
====[[Viewmodel]] illuminated by deferred render draw in [[refract]] shader====
Refract shader and [[Water_(shader)|Water]] shader take and refract player screen space without taking into account viewmodel. However - viewmodel illuminated by deferred render draw in refract shader because of game can't tell the depth of viewmodel because of the transparency, what you are see in the pictures is just the lighting layer applied to the color of transparency texture.
<br>
<gallery mode=packed heights=250px>
File:C DFS1Alt.jpg| frame |Clear example in test map, the hivehand illuminated by deferred render draw in the refract texture, plus it's completely discolored there..
File:C DFS2.jpg| frame |Black Mesa - bm_c4a1a.
File:C DFS3.jpg| frame |Black Mesa: Blue Shift - bs_c2m0a.
</gallery>
----
====Objects with [[refract]] shader self refract if illuminated by deferred render====
Objects with [[refract]] shader in their own refraction disable self, to escape some problems. However - objects with [[refract]] shader illuminated by deferred render refract self because of game can't tell the depth of objects because of the transparency, what you are see in the pictures is just the lighting layer applied to the color of transparency texture.
<br>
<gallery mode=packed heights=250px>
File:as_c3map01_1.jpg| frame |as_c3map01 - flashlight disabled, everything looks fine.
File:as_c3map01_2.jpg| frame |as_c3map01 - flashlight enabled, now this magnifying lamp refract self.
</gallery>
Similar issue happen if model with refraction behind wall with refraction.
<br>
<gallery mode=packed heights=250px>
File:RefractBugs_1.jpg| frame |Flashlight disabled, everything looks fine.
File:RefractBugs_2.jpg| frame |Flashlight enabled, now this wall show one of magnifying lamp deferred lighting layers.
</gallery>
----
====Viewmodel doesn't support self-shadowing with deferred ligths====
Unlike cascade shadows - viewmodel doesn't support self-shadowing with deferred ligths. Not a bug, but this is not what you expect from real life, it also isn't so with [[env_projectedtexture]].
<br>
<gallery mode=packed heights=250px>
File:C CSMSF.jpg| frame | Here you can see how one of gluon gun switches create shadow that fall on other part of gun.
File:C DFSF.jpg| frame | Light spot illuminates gluon gun, but lighting just ignore viewmodel and fully shine through, although only the side of the gun should be light.
</gallery>
----
====Godrays and deferred lighting incorrect work with cloak====
Cloak is a material shader parameter for <code>VertexLitGeneric</code> shader, female assassins use it to make them transparent when they need it. Godrays all time fully render through them, same for deferred lighting.
<br>
<gallery mode=packed heights=250px>
File:C_ASSASINRAYS.jpg| frame | bm_c2a3c, the sun's rays are not cut off despite the fact that she is completely untransparent right now.
File:C_ASSASINDF.jpg| frame | bm_c2a3c, she is completely untransparent, but we still can see one of lighting layers.
</gallery>
----
====Strange "holes" when player's camera is at a great distance====
In some cases may will appear strange "holes" when player's camera is at a great distance. Strange bug that occurs quite rarely. It is affected by game resolution, for example in <code>bm_c4a1b1</code> this bug shows up well with a resolution wtih <code>1920x1080</code>, but with <code>3840x2160</code> the light source from the teleporter flickers, but does not form a hole. Can be fixed if increase <code>NormalBias</code> number.
{{ModernConfirm|Does it happen with [[newLight_Spot]] ?}}
<br>
<gallery mode=packed heights=350px>
File:C_BMSH42.jpg| frame | Example in bm_c4a1b1, the green teleporter light source starts to glitch when player move certain distance (crossbow zoom doesn't effect to this bug, unlike HEV zoom).
</gallery>
<br>
<gallery mode=packed heights=250px>
File:C_BMSH_1.jpg| frame | Black Mesa, map bm_c4a1b1. NormalBias - 1.
File:C_BMSH_2.jpg| frame | Black Mesa, map bm_c4a1b1. NormalBias - 5.
</gallery>
<br>
<gallery mode=packed heights=250px>
File:C_BMOBSH_1.jpg| frame | Black Mesa: Black Ops - Restored, bmops_map_2. NormalBias - 0.5.
File:C_BMOBSH_2.jpg| frame | Black Mesa: Black Ops - Restored, bmops_map_2. NormalBias - 1.5.
</gallery>
----
====Weapons dynamic light incorrect work with damaged [[func_breakable_surf]]====
For some reason weapons dynamic light can illuminate damaged [[func_breakable_surf]] even if position of it very far from position of damaged [[func_breakable_surf]].
{{ModernConfirm|Is there a way to fix this?}}
<br>
<gallery mode=packed heights=450px>
File:cAnSexample.gif| frame |An example.
</gallery>
----
====New lights don't work with [[3D Skybox]]====
Don't use new lights in your 3D skyboxes, none of them will work at all.
<br>
<gallery mode=packed heights=350px>
File:C NLDW3DS.jpg| frame |An example. We see that deferred lighting and Godrays works fine, but 3D Skybox don't draw both.
</gallery>
----
====Motion blur blurring viewmodel lighting layer====
For some reason <code>Motion blur</code> blurring viewmodel lighting layer, you can notice this when you just rotate camera.
<br>
<gallery mode=packed heights=550px>
File: cVLLBASUalt.gif| frame | An example.
</gallery>
----
====Deferred lighting incorrect work with [[Customize Character]] window====
For some reason [[Customize Character]] take player's screen, inserts it into character preview window and show one of deferred lighting layers.
<br>
<gallery mode=packed heights=350px>
File: BruhCharacter.jpg| thumb | An example with zombie scientist model.
</gallery>
----
====Deferred render atrociously work with Linux and Linux based OS====
Linux port is atrocious. The only thing that can help is proton. The only platform that works fine with Black Mesa is Windows.
<br>
<gallery mode=packed heights=350px>
File: feois.gif| frame | <code>feois</code>'s video. OS - Manjaro.
File: Deleted_User_d3feb451-3819.gif| frame | <code>Deleted User d3feb451#3819</code>'s video. OS - Linux.
</gallery>
----
====Deferred lighting does not draw with <code>-tools</code>====
If you don't use <code>Full Screen</code> - deferred lighting will not draw.
<br>
<gallery mode=packed heights=250px>
File:DLDNDWT_1.jpg| frame |In <code>Full Screen</code>.
File:DLDNDWT_2.jpg| frame |Out <code>Full Screen</code>.
</gallery>
<br>
----
====Deferred lighting that use shadows disappear after materials reload====
This issue happen when you open Hammer while game is opened, when you disable speculars with <code>mat_specular 0</code>, when you reload all matelias with <code>mat_reloadallmaterials</code>, e. t. c. Can be fixed with save reload.
<br>
<gallery mode=packed heights=250px>
File:DLDAMR_1.jpg| frame |Before <code>mat_reloadallmaterials</code>.
File:DLDAMR_2.jpg| frame |After <code>mat_reloadallmaterials</code>.
</gallery>
<br>
====Broken half-lambertian lighting====
Sources standard model lighting comes with a hacky way of boosting ambient lighting on characters and props. This is called half-lambertian lighting. The light is wrapped around the edges of a model which gives the lighting a softer appearance, prevents overly harsh shadows from normal maps. This was implemented as an easy and performant way to improve the appearance of lighting, at a cost of realism.
Consequentially, newlights also had half-lambertian lighting implemented. However, it is currently left in a broken state. The result is that meshes with [[$phong]] or [[$halflambert]] get lit from ALL sides perpendicular to newlights, including ones with opposing normals. Shadows help to mask this bug, but it still appears glaringly incorrect.
<br>
<gallery mode=packed heights=250px>
File:BHLL_1.jpg| frame |Phong disabled.
File:BHLL_2.jpg| frame |Phong enabled.
</gallery>
<br>
If you want to use [[$phong]] or [[$halflambert]] - you are able to fix this with adding in your [[VMT]] material parameter <code>"$halflambert_gbuffer_off"    "1"</code>.
<br>
<gallery mode=packed heights=250px>
File:BHLL_21.jpg| frame |$halflambert_gbuffer_off disabled.
File:BHLL_22.jpg| frame |$halflambert_gbuffer_off enabled.
</gallery>
<br>
This also makes new lighting with shadows much more realistic, since the light no longer shows through at edges of model.
<br>
<br>
<gallery mode=packed heights=250px>
File:BHLL_31.jpg| frame |$halflambert_gbuffer_off disabled.
File:BHLL_32.jpg| frame |$halflambert_gbuffer_off enabled.
</gallery>
<br>
However it have some limitations:
*As explained, this will only affect models that use $halflambert, which mostly means things with specularity/phong.
*Some areas may not quite bit lit the same as they may have depended on the bug. Notably areas entirely lit by newlights may seemingly lack ambient lighting and have overly dark shadows.
*Xen plant lights for instance have shadows on the bulbs as they did not use illumtextures.
You can use [https://steamcommunity.com/sharedfiles/filedetails/?id=3160360493 this] fix by [[User:Jofoyo|Jofoyo]] for your mods to fix this issue without manual correction for each model.
</div>


== See also ==
== See also ==
* [[New Lights Editor]]
* {{ent|newLight_Point}} - point deferred light entity.
* {{ent|newLight_Point}}
* {{ent|NewLights_Spawner}} - spawner of deferred point lights.
* {{ent|newLight_Dir}}
* {{ent|env_lensflare}} - cinematic dynamic lens flare.
* {{ent|NewLights_settings}}
* {{ent|newLight_Dir}} - directional sun light with godrays only.
* {{ent|env_cascade_light}}
* {{ent|newLights_settings}} - entity that changes deferred light settings.
* [[New_Specular|New Specular]]
* {{ent|godrays_settings}} - entity that changes godrays settings.
* [[newxog_volume]]
* {{ent|env_cascade_light}} - deferred cascade sun light entity.
* [[Lighting]]
* [[New Lights Editor]] - in game deferred lights editor.
* [[Adding Light]]
* [[Effect flags]] - effects flags, some of them are dynamic light effects.
* [[Intermediate Lighting]]
* [https://chetanjags.wordpress.com/2023/07/18/blackmesa-xenengine-part-4-lighting-shadows/ BlackMesa XenEngine: Part 4 – Lighting & Shadows] - page from Chetan (lead programmer for Black Mesa) about new lights.
* [[Advanced Lighting]]
* [https://chetanjags.wordpress.com/2023/07/11/blackmesa-xenengine-part2-how-a-frame-is-rendered/ BlackMesa XenEngine: Part2 – How a Frame is Rendered] - page from Chetan (lead programmer for Black Mesa) about how a frame is rendered.
* [[Effect flags]] (dynamic light effects)
* [https://chetanjags.wordpress.com/2022/06/01/blackmesa-xenengine-part1-a-heavily-modified-source-engine/ BlackMesa XenEngine: Part1 – Heavily Modified Source Engine] page from Chetan (lead programmer for Black Mesa) about {{xe|4}}.
* [[Tool textures]] (for Block light)
* [https://chetanjags.wordpress.com/2023/07/18/blackmesa-xenengine-part-4-lighting-shadows/ BlackMesa XenEngine: Part 4 – Lighting & Shadows] (page from Black Mesa developer about new lights)
* [https://chetanjags.wordpress.com/2023/07/11/blackmesa-xenengine-part2-how-a-frame-is-rendered/ BlackMesa XenEngine: Part2 – How a Frame is Rendered] (page from Black Mesa developer about how a frame rendered, include Godrays.)
* [https://chetanjags.wordpress.com/2022/06/01/blackmesa-xenengine-part1-a-heavily-modified-source-engine/ BlackMesa XenEngine: Part1 – Heavily Modified Source Engine] (page from Black Mesa developer about Black Mesa engine, better known as [[Xengine]])
{{todo|Investigate and document some keyvalues and functions. Remove "See Also" from scroll box. Clean up english. Add more issues if you'll find.}}

Latest revision as of 23:15, 29 July 2025

NewLight Dir-Icon-Small.png

newLight_Spot is a point entity available in Black Mesa Black Mesa. It is a cone-shaped, invisible deferred light source, includes lightcookies with animations for them. The animations is based on row and column atlases or scroll mode.

C++ Class hierarchy
CNewLightSpot
CBaseEntity
NewLight_Spot in bm_c4a1b (used for the floodlight).
Note.pngNote:You can have only 256 spot light entities placed in the map editor.
Todo: Update issues, rework page.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

ReverseDir (ReverseDir) <choices>
By default, the Y angle for a spot light is inverted, which causes the light to point upward when pointed downwards. This option allows you to fix this problem.
  • 0: No
  • 1: Yes
Icon-Important.pngImportant:This additionally impacts performance, use it in rare cases (for moving with NPC flashlight, etc), It is much better to invert required Y angle value (make it from 90 to -90 for example).
Examples


Use old Falloff ? (bUseOldFallOff) <choices> !FGD Obsolete
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.pngNote: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.pngWarning:This is one of the parameters that affects performance in the game. Smaller values ​​allow you to process less geometry and save performance.
Icon-Important.pngImportant: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 Lightstyle 0.png
10 Fluorescent flicker mmamammmmammamamaaamammma Lightstyle 10.gif
2 Slow, strong pulse abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba Lightstyle 2.gif
11 Slow pulse, noblack abcdefghijklmnopqrrqponmlkjihgfedcba Lightstyle 11.gif
5 Gentle pulse jklmnopqrstuvwxyzyxwvutsrqponmlkj Lightstyle 5.gif
1 Flicker A mmnmmommommnonmmonqnmmo Lightstyle 1.gif
6 Flicker B nmonqnmomnmomomno Lightstyle 6.gif
3 Candle A mmmmmaaaaammmmmaaaaaabcdefgabcdefg Lightstyle 3.gif
7 Candle B mmmaaaabcdefgmmmmaaaammmaamm Lightstyle 7.gif
8 Candle C mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa Lightstyle 8.gif
4 Fast strobe mamamamamama Lightstyle 4.gif
9 Slow strobe aaaaaaaazzzzzzzz Lightstyle 9.gif
12 Underwater light mutation mmnnmmnnnmmnn Lightstyle 12.gif
Tip.pngTip:Use new lights instead for lights with custom appearance, because static lightmapped lights reduces performance with this feature (especially near displacements).
Note.pngNote: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 Obsolete
Deprecated.
Constant value (can work only if old falloff is enabled).
falloffLinear (falloffLinear) <integer> !FGD Obsolete
Deprecated.
Linear value (can work only if old falloff is enabled).
falloffQuadratic (falloffQuadratic) <integer> !FGD Obsolete
Deprecated.
Quadratic value (can work only if old falloff is enabled).
OuterAngle (phi) <float>
Outer angle for spot light.
Warning.pngWarning:This affect shadow quality, less is better.
Icon-Important.pngImportant:Don't use values 180 and higher, this will make shadows and lighting broken.
InnerAngle (theta) <float>
Inner angle value for spot light.
Warning.pngWarning: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
Note.pngNote:Results depend on values of OuterAngle and InnerAngle.


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.
Icon-Important.pngImportant:Brush entities and bmodels are also included in static shadowmaps and they never update (including func_physbox).
Note.pngNote: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.pngNote: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
Icon-Important.pngImportant: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_Med and nr_shadow_rad_Low.
Examples
Tip.pngTip: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.


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.pngNote:You will not see any changes if your material doesn't not provide bumpmap.
Icon-Important.pngImportant: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.
Icon-Bug.pngBug:Numbers lower than 0.8 can cause huge graphics issues. Example.
Tip.pngTip:Increase this value if you are getting aliasing issues like this.


ShadowFOV (ShadowFOV) <float>
Fov used by shadowmap camera for this light. Keep it 0 to use Outer angle as the fov.
Icon-Bug.pngBug:If value lower than OuterAngle value, the lights will have visual issues.
Example


Enable Texture Light (bTexLight) <choices>
Sets lightcookie (texture lights) state, enabled or disabled.
  • 0: Disabled
  • 1: Enabled
Examples
Warning.pngWarning:This is one of the most expensive features, use wisely.
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> Obsolete
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
TexCookieFramesX (TexCookieFramesX) <integer>
Number of frames in 1 row of atlas.
TexCookieFramesY (TexCookieFramesY) <integer>
Number of frames in 1 column of atlas.
TexCookieFps (TexCookieFps) <float>
The amount of time it takes to move to the next atlas frame.
Tex Cookie Scroll Mode (bTexCookieScrollMode) <choices>
Sets texture scrolling function state, enabled or disabled. ScrollSpeedU and ScrollSpeedV sets scrolling speed and direction.
  • 0: Disabled
  • 1: Enabled
ScrollSpeedU (fScrollSpeedU) <float>
Scrolling speed along Y axis.
ScrollSpeedV (fScrollSpeedV) <float>
Scrolling speed along X axis.


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 <color255RedirectInput/color32>
Change light's color value.
SetIntensityForLight <floatRedirectInput/float>
Change light's intensity value.
TurnOn <void>
Turn the light on.
TurnOff <void>
Turn the light off.
Toggle <void>
Toggle the light's current state.
InputFixRotBugDueToTram <void>
Resets the bounding box size taking into account the current FOV and range values. Can be used to fix the bounding box size after applying new settings for light.

Bugs/Limitations

See /Bugs and limitations

See also