G L O O M   M A P P I N G   G U I D E
V O L U M E T R I C    L I G H T I N G

While you can't actually get true volumetric lighting in the Quake2 engine, there is a way to fake it in OpenGL and make the illusion of volumetric lighting. Something like these examples:


Now then, on to the tutorial!
Create a 16 x 16 pixel texture with two stripes of color - the top strip should be the color of your light and the bottom one should be the 255th color in the colormap, which Quake2 interprets as transparent. Example:

After that create an object where you want the volumetric lighting to be and give it the texture you made. For example, if you wanted to put light beams coming through these castle windows ...

... then you would put the brushes like this:

Give the brushe(s) a trans33 or trans66 surface flag and a mist content flag. Now here's the key part of the proccess: up the vertical stretch value to around 50 or 100. This will basically just blend the top and bottom colors together - your light color and the transparency color. It will probably take a while to get it how you like it, but the brushes should end up looking something like this in your editor:

The r_speeds might suffer a small hit though - my r_speeds jumped from 292 to 397 after adding three blocks of volumetric lighting in the castle windows.


[ PG | GMG ]
last updated Tue Dec 11 2001