Tutorial: Volumetric Lighting Last edited 12 hours ago2020-02-22 00:34:44 UTC

✔️ Download example file

Volumetric lighting, also known as light shafts or god rays, is a lighting effect that can add depth and realism to the visuals of your map.

Requisites

Creating the effect

First, skew a brush to closely match the angle of your light source. Since the base faces of the brush are meant to be invisible, they should be textured with CONTENTWATER in order to mirror the side faces of the brush, making it more realistic. Lastly, the brush should be an entity, such as func_illusionary, with Render Mode set to Additive. The translucency can be set with FX Amount (1 - 255).
User posted image
If you use NULL or BLACK_HIDDEN, not all of the side faces will be rendered at the same time, and the effect is invisible from some angles (i.e. inside the volume).
Volumetric lighting, with and without the use of CONTENTWATERVolumetric lighting, with and without the use of CONTENTWATER
Volumetric lighting, with and without the use of CONTENTWATERVolumetric lighting, with and without the use of CONTENTWATER
A scrolling texture could also be used with a func_conveyor entity.
Scrolling volumetric lightingScrolling volumetric lighting

Errors

Error: WATER brushes not allowed in detail
This error is caused by any of the following keyvalues in your entity:
  • zhlt_clipnodedetaillevel
  • zhlt_detaillevel
Error: mixed face contents
If your brush is textured with CONTENTWATER, then this error is caused by any of the following textures on your brush:
  • BOUNDINGBOX
  • CLIP
  • CLIPBEVEL
  • CLIPBEVELBRUSH
  • CLIPHULL1
  • CLIPHULL2
  • CLIPHULL3
  • CONTENTEMPTY
  • ORIGIN
  • SKIP

Volumetric lighting textures

TextureGroup
FADEvalve/halflife.wad
FADE2valve/halflife.wad
CULIGHTAcstrike/cs_havana.wad
CXLIGHTAcstrike/chateau.wad

Comments

You must log in to post a comment. You can login or register a new account.