CG Sketchbook , notes and tutorials

New still : volumetrics



It took some experiments but i finally have fog, with light rays !

It was a long time i wanted to learn volumetrics properly, and get some proper ‘god rays’/ light halos and a ‘physically simulated’ fog  .. not uniform but showing swirls, movement and interaction with the env.

Making smoke simulations in blender is heaps of fun , but somehow also quite frustrating ,  it’s intuitive because it’s all based on physical params (emitters of smoke , wind forces , etc..) but it took quite a few iterations of change-the-sim-rebake-render-tweak and redo .. mostly in order to get an interesting distribution.


Above is a screenshot of the smoke sim scene , using a very simplified geometry loosely matching the scene as obstacle , some smoke emission from the ground , some from vertical planes on the side of the scene and 2 wind forces to push the smoke accross the scene.


Rendering the pass was the tricky part :


The screenshot above is the fog ‘pass’ : i copied the smoke sim result to another scene with the actual geometry , rendered , then partially colorized the smoke  based on depth (in comp) .

“God rays” were though to get .. the trickiest part was figuring out that “shaded” volume mode enables this effect , but only if light cache resolution is high enough (like 512 instead of default 50 )

But i ended up using “shadowed” : it does lightrays too ,  even if less refined (as if these volume shadows where perfectly sharp)  but is also generally faster to render.

Also the shading params aren’t as intuitive as for “solids” (“diffuse or glossy”) : In a Blender volume material  “reflection” is what will respond to external lights , so that must be high , a bit of scattering/trasmission and density  are necessary , but best kept low (quite low , even like 0.0X)  to reduce the  thickness of depth-fog vs. the intensity of the rays. And it’s necessary to have quite strong lights for them to show up as volume rays.

Though i don’t know much of the technical workings of volumes .. it would make an interesting tutorial , i’ll try making something for my YT channel when i’m done with this still.









Comments are closed.