Volumetric Raymarching

Hello Blenderheads,

While looking for the best techniques to create Clouds, “Volumetric Raymarching” (step by step in small increments) is the go to answer i found everywhere. Cycles Volume Shader simply does not have the exact controls/modularity i am looking for.

I already tried and experimented with “Raymarching” with SDF’s/Spheres and it is quite straightforward and easy to implement in cycles node system (https://www.youtube.com/watch?v=HDrbHDuf0K4&t=2141s&ab_channel=WannesMalfait).

But I cant wrap my head around on how to implement “Incremental/Stepped Raymarching” in the Node editor, is anyone interested to help me with that?

Thank you in advance kind stranger

Raymarching is how Cycles renders volumes already, you wouldn’t be able to touch this area from the node editor anyway. If you’d like to contribute to Cycles you can ask on devtalk

1 Like

Thank you for the answer!
This is is really confusing/weird though. As I understand it (correct me if im wrong), both raymarching techniques rely on the same basics/need the same inputs to work/be calculated. Why would one work but not the other one? I have all the data i need in the node editor (camera position, view direction etc.) why wouldnt it then be possibe to recreate Volumetric Raymarching?

I think using the shader editor to create custom raymarching is a stretch; but I could be mistaken. For once there isn’t a way to make a loop, that seems like a dealbreaker to me ? take it from someone who never tried. I really think that kind of question should go to devtalk because most contributors hang out there. Or maybe try asking in the Blender chat (https://blender.chat/directory)

1 Like

It would be good to have a raymarching shader for volumetric materials in Cycles - as it would enable volumetric materials with solid, even glossy surfaces.

Based on tests conducted by Charlie in his SDF development thread, it does seem like it is possible:

https://developer.blender.org/D6464

2 Likes

Well it’s certanly not the best way to do it thats for sure, but it should be possible and is the easiest method i’m aware of.
You cant make a real loop, but you can repeat/stack a process (thats how you can achieve the mentioned sphere tracing).
Ah ok i’ll try that, thanks for the suggestions.

Yes and it would open up a lot of possibilities!
I used the same method, but it is (as far as i know) only feasible for rendering solid objects, as it only calculates until it hits an object/stops at the surface (which is more efficient) but in order to display things with variable density (clouds for example) we need to march “inside” of the shape, which is why we need a constant step size.

vs

It should not be hard to change the setup in a way that allows for this to happen but i just can’t figure it out.

1 Like

Would Secrop’s loop node help?

1 Like

Yes this would indeed make the setup less tedious and cluttery. Thanks