Negative Intensity in Light Scripting

In Q2, the Quake dynamic light handling was at one point extended to signed (optionally negative) intensity values, to be used for Glassner-style "darklights".

A simple change would make this available in scripted lights set by gi.configstring( CS_LIGHT, ... ). Light intensity encoding by characters can be extended to the full range including sign. To avoid loss of prescision, the capital letters A-Z should indicate negative sign.


This makes the full range of Q2 lighting effects including darklights available to the designer. That includes creation of weird monsters as well as static placement of darklights for artistic effects.


None known. Backward compatibility might be an issue if the current config string parsing was not case-sensitive, and treated upper case as lower case.


Requires rewrite of the client side handling of light scripting configstrings. See g_target.c::SP_target_lightramp for related parts of the DLL.


The entity_state_t carries a signed light intensity attribute (see Entity Lighting Proposal). The scripted lighting does not seem to apply to entities, and extending the scripting mechanisms does not overcome this limitation.

Submitted 980407, revised 980420, comments to