Dynamic light

From ZDoom Wiki
Jump to: navigation, search
Center Warning: This feature does not work in ZDoom but in its OpenGL children ports.
Additive, normal, and subtractive.
Dynamic lights are objects that provide point-based light sources. They can be used to complement the Doom engine's sector-based ambient lighting; but they are more resource-intensive and should not be used to replace sector lighting entirely.

Dynamic lights can also be attached to certain actor frames with the GLDEFS lump and the light keyword in a DECORATE state definition.

All types of lights are also available in additive and subtractive versions. Normal dynamic lights makes colors brighter, additive lights makes them whiter, and subtractive lights make them darker.

A dynamic light is represented by its RGB value and intensity. Intensity basically corresponds to the light's radius; RGB values to its color.

Non-attached dynamic lights are PointLights and its derivatives.

  1. PointLight: a simple static source of light.
  2. PointLightFlicker: a source of light which alternates between two intensities. Every tic, the light has a chance equal to its angle out of 360 to use the secondary radius instead of the primary one.
  3. PointLightFlickerRandom: a source of light which alternates between random values in the continuum between its primary and secondary intensities. The angle is used as a number of tics between intensity changes.
  4. PointLightPulse: a source of light which gradually alternate between its primary and secondary intensities. The angle is used as the number of tics there are between minimal and maximal intensities.
  5. SectorPointLight: a source of light which depends on sector lighting. The intensity is equal to the sector's current light level multiplied by the scale value, and clamped between 0 and 255. The interest of this type is that it follows sector light effects caused by certain sector types or by lighting specials.

Note that since ZDoom does not implement the dynamic light objects, if they are used in a map, they will spawn as error markers in ZDoom.