tag:blogger.com,1999:blog-1791631495483462759.post7415782739296841006..comments2024-03-25T07:29:21.225-07:00Comments on 3DWorld: Volume Lighting Effects with Smoke and FogFrank Gennarihttp://www.blogger.com/profile/02815853731800103017noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-1791631495483462759.post-7524009180131825162020-10-14T18:24:05.749-07:002020-10-14T18:24:05.749-07:00There are many ways to implement smoke. One of my ...There are many ways to implement smoke. One of my later posts uses procedural noise plus volumetric effects to produce drifting clouds of smoke. It's technically realtime, but it does take most of the frame time.<br /><br />I also added God rays as a GPU post-processing pass sometime after this post. These move with the camera and look pretty good - in certain outdoor scenes. It's all screen space and uses the depth map of the previous draw and the sun disk passed in as a shader uniform, with ray marching along the light vector. It only works when the sun is visible though, and only with a single light source.<br /><br />I might work on this more in the future. So many things to do, ... and it seems like procedural buildings will take a long time.Frank Gennarihttps://www.blogger.com/profile/02815853731800103017noreply@blogger.comtag:blogger.com,1999:blog-1791631495483462759.post-85565708129633744582020-10-14T14:47:16.364-07:002020-10-14T14:47:16.364-07:00I don't know how it works, but the smoke syste...I don't know how it works, but the smoke system in Blender has some sort of vortex convolution that looks ace and runs in realtime.<br />Yeah, the holy grail would be to run a full atmospheric volume simulation every frame, but as you noted it takes forever. I think you could probably do some sort of special case for crepuscular rays. Do an outline for gaps in the shadow map and extrude the geometry, then do a low-res (1/4?) front and back depth pass and use the difference as an addition to the final buffer... Or whatever.Paul Spoonerhttps://www.blogger.com/profile/17640871289041630907noreply@blogger.com