Light Styles


(LaVaGoD) #1

Hello

I was looking for the Light Styles thread that was here some time ago but I can not find it.

I also wanted to know if anyone has a tut writen for it and does Light Styles work with Q3A Mods?


(The5thHorsemen) #2

quote ydnar

Short how-to:

  1. 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.

  2. 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.

  3. 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.

  4. 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:

http://www.shaderlab.com/q3map2/samples/


(LaVaGoD) #3

Thanks