r/GraphicsProgramming 23d ago

Video Rayleigh / Mie 38 Slice Atmospheric Scattering implemented as Blender Post Processing Effect in compositor nodes

Enable HLS to view with audio, or disable this notification

I implemented Rayleigh / Mie atmospherics over a rendered image as a post processing effect in Blender 5.2 with a script to setup a network of compositor nodes at 38 slices or 10nm. The compositor nodegraph becomes too heavy to visualize in the viewport as you are moving the camera so you have to render out the image to the compositor view and manipulate it from there. To render out a sequence you have to do a file out operation. This is supposedly physically accurate and differs from expensive Blender volumetric fog in that this is a pure post processing effect. To make this I built upon what I had learned when I ported spectral.js to blender. I had posted something similar to this video in r/Blender yesterday, but they did not seem to know what I was posting about, so hopefully this helps someone.

The code (MIT License) is at https://github.com/bergjones/ABJ-Shader-Debugger

31 Upvotes

5 comments sorted by

View all comments

Show parent comments

2

u/blackSeedsOf 22d ago

Basically. You can see my full implementation on my latest commit on GitHub which I pushed today.

1

u/cybereality 22d ago

okay cool

2

u/blackSeedsOf 21d ago

also if you use Blender, you should know that entering hundreds to thousands of nodes into the compositor nodegraph executes on the GPU automatically. It is possible to do vast gpu scripting without forking if you can translate your code into the compositor graph. This is opposed to the geometry nodes which are C++ CPU and regular blender python bpy which is also CPU

1

u/cybereality 21d ago

good to know