Ads keep us online. Without them, we wouldn't exist. We don't have paywalls or sell mods - we never will. But every month we have large bills and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3

Volumetric Lighting - A Tutorial for Goldsource Engine.

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.

✔️ Download example file

1. Requisites


2. Creating the effect

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). 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 or directly below the volume). Here are a couple examples of volumetric lighting with and without the use of CONTENTWATER.



A scrolling texture could also be used with a func_conveyor entity.


3. Errors

3.1. Error: WATER brushes not allowed in detail

This error is caused by any of the following keyvalues in your entity:
  • zhlt_clipnodedetaillevel
  • zhlt_detaillevel

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

4. Volumetric lighting textures

TextureGroup
C0A0YELLOWvalve/halflife.wad
C1A3YELLOWvalve/halflife.wad
FADEvalve/halflife.wad
FADE2valve/halflife.wad
CULIGHTAcstrike/cs_havana.wad
CXLIGHTAcstrike/chateau.wad
  • bug$bunny avatar
    bug$bunny username pic Joined 2y ago
    Offline
    914 points Ranked 47,049th
    10 medals 2 rare
    • Returned 1000 times Medal icon
    • Submitted 20 Maps Medal icon
    • Returned 100 times Medal icon
    • Submitted 5 Maps Medal icon
    • One month a member Medal icon
    • 6 months a member Medal icon
    2y 2y
    +1 texture for this.

    C0A0YELLOW

    halflife.wad
    • Agree x 1
    Making Maps...
    URL to post:
  • Foofinoo avatar
    Foofinoo username pic Joined 9y ago
    Dead
    Cell 1 Flag Affiliation: Cell 1
    27,981 points Ranked 237th
    38 medals 3 legendary 10 rare
    • Returned 5000 times Medal icon
    • 15+ Entries! GameBanana’s Christmas Giveaway 2016 Medal icon
    • 15+ Entries! GameBanana’s Christmas Giveaway 2017 Medal icon
    • 2nd Place - Marble Tracks Redux Contest Medal icon
    • Returned 1000 times Medal icon
    • Submitted 20 Maps Medal icon
    Foofinoo avatar
    Foofinoo
    Cell 1 Flag
    Affiliation
    Cell 1
    2y
    Really clear and useful ! Pictures, explanations, (animated) exemples, errors and even some textures to have this effect ? Everything is here, this is truly well done.
    Professional Crastination avatar
    Mantra
    Professional Crastination
    URL to post:
  • tom avatar
    tom username pic Joined 21y ago
    End Boss Ripe Supporter TBS2 Manager FNF Manager TF2 Manager KRtDL Manager GGST Manager CS1.6 Manager Super Admin
    Present
    Home > Mods
    1,976 points Ranked 23,242nd
    92 medals 13 legendary 11 rare
    • Achieved Super Admin clearance Medal icon
    • 10 years a member Medal icon
    • Thanked 500 submitters Medal icon
    • Submitted 200 Blogs Medal icon
    • Submitted 200 Threads Medal icon
    • Submitted 60 Polls Medal icon
    tom avatar
    tom
    End Boss
    2y
    Great tutorial, love the animations. Well done!
    • Agree x 1
    • Thanks x 1
    1 2 3 4 5
    URL to post:
  • Pirucho XP-007 avatar
    Pirucho XP-007 username pic Joined 6y ago
    Offline
    Zamurais Flag Affiliation: Zamurais
    824 points Ranked 48,313rd
    28 medals 2 legendary 5 rare
    • Submitted 50 Maps Medal icon
    • 2019 Top Contributor Medal icon
    • Submitted 20 Maps Medal icon
    • Returned 1000 times Medal icon
    • Submitted 15 Mods Medal icon
    • Submitted 20 Mods Medal icon
    Pirucho XP-007 avatar
    Pirucho XP-007
    Zamurais Flag
    Affiliation
    Zamurais
    2y
    Good contribution, this is a good fact for newbies and those who have these textures and do not know how to use it.
    • Thanks x 1
    Maper and CS 1.6 Programmer avatar
    Mantra
    Maper and CS 1.6 Programmer
    URL to post:
  • DVDS avatar
    DVDS username pic Joined 4y ago
    Offline
    CS:GO Ports Flag Affiliation: CS:GO Ports
    3,108 points Ranked 4,550th
    17 medals 1 legendary 2 rare
    • 2019 Top Contributor Medal icon
    • Received thanks 50 times Medal icon
    • Returned 1000 times Medal icon
    • One month a member Medal icon
    • Submission featured Medal icon
    • Returned 100 times Medal icon
    DVDS avatar
    DVDS
    CS:GO Ports Flag
    Affiliation
    CS:GO Ports
    2y
    Good tutorial!
    • Thanks x 1
    Mapper
    URL to post: