Got lightstyles (dynamic/blinking/flickering lights) working with vanilla Quake 3 and RTCW.
Short how-to:
-
Add a “style” key to any light entities you want to be styled. Use a value between 1 and 31. You can also use q3map_lightStyle N on light-emitting shaders to have them emit styled light.
-
Add “_styleNrgbGen” and/or “_styleNalphaGen” where N is the style number keys to the worldspawn entity. Look at the Shader Manual for more documentation on rgbGen/alphaGen.
-
For any shaders that may be hit by a styled light, you’ll need to add q3map_styleMarker after the lightmap stages, before the texture stages so Q3Map2 can properly create the fake lightmap stages. For masked textures where a depthFunc equal is required, add q3map_styleMarker2.
-
Compile your map with Q3Map 2.5.5-test-6 or later. Be sure to use the -nocollapse switch in the -light phase. This is important, because styled lights generate shaders, and this minimizes the number of unique shaders.
Gotchas:
-
Shaders with lightmaps after texture passes will look odd. This may change in the future. Try to rearrange your shaders, if possible, to have lightmaps first.
-
Only lightmapped surfaces are affected by styled lights. Lightgrid (dynamic entity lighting) and vertex lighting (misc_models). are not. Use light_junior entities near styled lights to give your entities a decent average lighting value.
This functionality has been there for SOF2/JK2 support (they have native light styles) for a while, and this just brings the nifty feature to Quake 3/RTCW mappers.
Oblig demonstration map + bsp screenshot:
Cheers,
y

Great Work. 


