Godrays settings: Difference between revisions
Jump to navigation
Jump to search
Tip:You can change values dynamically via AddOutput input.
Bug:Doesn't affects newLight_Dir due to mistake in the game code.
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.
MyGamepedia (talk | contribs) No edit summary |
MyGamepedia (talk | contribs) |
||
Line 7: | Line 7: | ||
==Keyvalues== | ==Keyvalues== | ||
{{KV Targetname}} | {{KV Targetname}} | ||
{{KV|TargetGodRays_Name|intn=TargetGodRays|string| | {{KV|TargetGodRays_Name|intn=TargetGodRays|string|Here you enter name of new light entity (with godrays support) for which you want to apply changes. Works with multiple lights if they have the same name.}} | ||
{{KV|TransitionTime|intn=TransitionTime|integer|Transition time in seconds (0 for instant) to transition into new settings. Its a lerp operation A + (B-A) * TimeFactor.}} | |||
{{KV|TransitionTime|intn=TransitionTime|integer| | |||
{{KV|LightType|intn=LightType|Choices| | {{KV|LightType|intn=LightType|Choices| | ||
Type of light source for which you want to apply settings. Entity will not apply settings for [[newLight_Dir]] if selected <code>Point Light</code> and will not apply settings for point lights if selected <code>Direction/Sun Light</code>. | Type of light source for which you want to apply settings. Entity will not apply settings for [[newLight_Dir]] if selected <code>Point Light</code> and will not apply settings for point lights if selected <code>Direction/Sun Light</code>. | ||
*0: Direction/Sun Light | *0: Direction/Sun Light | ||
*1: Spot Light | *1: Spot Light | ||
{{ | {{bug|hidetested=1|Doesn't affects [[newLight_Dir]] due to mistake in the game code.}} | ||
}} | }} | ||
{{ | {{KV BmGodraysNormal}} | ||
==Inputs== | ==Inputs== |
Revision as of 10:00, 7 January 2025
godrays_settings
is a point entity available in Black Mesa. This entity uses to dynamically change godrays settings for Black Mesa new light entities. For better understanding of this page - recommended at first familiarize yourself with new lights.
Represented by class CGodRaysSettings
.

Keyvalues
- Name (targetname) <string>[ Edit ]
- 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
- TargetGodRays_Name (TargetGodRays) <string>
- Here you enter name of new light entity (with godrays support) 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 newLight_Dir if selected
Point Light
and will not apply settings for point lights if selectedDirection/Sun Light
.
- 0: Direction/Sun Light
- 1: Spot Light

- 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).
Inputs
- InputApplySettings <void>
- InputApplySettings Trigger to apply settings
See also
- NewLights_settings
- newLight_Point
- newLight_Spot
- env_lensflare
- newLight_Dir
- env_cascade_light
- Lighting
- Adding Light
- Intermediate Lighting
- Advanced Lighting
- Effect flags (dynamic light effects)
- Tool textures (for Block light)
- BlackMesa XenEngine: Part 4 – Lighting & Shadows (page from Black Mesa developer about new lights)
- BlackMesa XenEngine: Part2 – How a Frame is Rendered (page from Black Mesa developer about how a frame rendered)
- BlackMesa XenEngine: Part1 – Heavily Modified Source Engine (page from Black Mesa developer about Black Mesa engine, better known as Xengine)
Todo: Clean up english. Add more issues if you'll find.