Garry's Mod

Garry's Mod

1,736 ratings
Volumetric Lighting / Fog
6
3
4
2
7
4
6
4
3
2
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Effects
Addon Tags: Fun, Scenic, Realism
File Size
Posted
Updated
79.647 KB
21 Mar @ 1:57pm
3 Jul @ 1:56pm
9 Change Notes ( view )

Subscribe to download
Volumetric Lighting / Fog

Description
Volumetric Lighting
Adds a volume_cloud entity to your game. The entity can be spawned by going to
Entities->Volumetrics->Volume Cloud

Open the context menu (hold C) and right click on the effects halo to change its properties.

Please Note:
- I suggest using this with the GMod shadow setting set to High
- Turning on 'Environment Fog' makes normal point lights kind of work.. (as long as the bounding box is small)

- The volumetrics_quality console command will change the resolution of the lighting. Performance gets exponentially worse the higher the number. (If you are not an animator I suggest leaving this at 1)
1 = Low (1/64th resolution)
2 = Medium (1/16th resolution)
3 = High (1/4 resolution)
4 = Extreme (full resolution)

Recommended Addons:
CSM (Used in second image)
Advanced light entities


Originally inspired by The J

discord: https://discord.gg/xWvhfargMY

Edit (6/25/24): Please ask for permission before reuploading or republishing any of this code. Thanks
Popular Discussions View All (11)
7
24 Mar @ 9:56pm
If i spawn it,the house starts to flicker, when I entered the house, the world began to flicker
KRI4
7
23 Mar @ 11:04pm
Whenever I spawn the entity it forms grand pillars of light rather than working as it supposed to
bug bite craig
4
31 Jul @ 6:58pm
ain't working
MB (Mako Bomby)
297 Comments
bosspowermark 6 Aug @ 11:19pm 
The lighting only Appears When i look in a specific direction. Is there any way to fix that?
⸸ₓナイトメアₓ⸸ 31 Jul @ 10:17pm 
oh my bad, i never knew you added that to the description
Meetric  [author] 31 Jul @ 6:56pm 
Meetric  [author] 31 Jul @ 6:56pm 
use console command volumetrics_quality (1-4)

1 = Low (1/64th resolution)
2 = Medium (1/16th resolution)
3 = High (1/4 resolution)
4 = Extreme (full resolution)
⸸ₓナイトメアₓ⸸ 31 Jul @ 5:25pm 
i wanted to ask because i have no idea what im doing in the lua file but maybe we can have an option to select the resolution of the fog?

or even better could you tell me what i have to change to increase resolution?

local prev = render.GetRenderTarget()
render.SetRenderTarget(volumetric_rt) -- volume RT is 1/64th resolution which drastically speeds up drawing compute
render.Clear(0, 0, 0, 0)


it's fine if you dont wanna tell me but i thought to ask because i feel like i could run the fog at higher resolutions and not have massive performance issues
EXOCORE 24 Jul @ 11:23am 
you should make the settings save and make an option to use volumetric lighting when spawned in
bluecoolman280 20 Jul @ 2:56pm 
is global illumination possible?
Biocrab 18 Jul @ 12:03pm 
volumeetric
Midnight Ruby 17 Jul @ 10:09am 
@Peter Lemoncello there was, however it was removed because it used code from this without permission. I personally hope the creator of this mod will make a version like that, because it was nice to have it naturally spawned in.
Kirya 10 Jul @ 12:42am 
Please make realistic, customizable smoke in Garry's mod