← All ideas

Signed Distance Field Raymarching in Blender

Raymarching has become an important part of the 3D world... There are quite literally infinite possibilities.. Blender can already raymarch to an extent. I successfully made a raymarcher in nodes.

youtu.be/VnUv9BrPQp4

It is EXTREMELY performant and efficient. Raymarching is one of the fastest methods of rendering out there. And yes, I know that signed distance fields are not the most optimal way of creating scenes... However, it wouldn't be unfeasible to make cycles or eevee a hybrid engine and support this kind of rendering. If you've ever used Vectron (from octane) youll probably recognize this. Vectron is a similar tool, but its extremely inconvenient and difficult to use. Theres also already an endless amount of research for raymarching. People like Inigo Quilez have done incredible work on the subject, iquilezles.org/www/articles/raymarchingdf/raymarchingdf.htm

On the page above is one of his example projects, where he turns primitives in a basic raymarcher into a fully lit PBR scene.

iquilezles.org/www/articles/raymarchingdf/vid_00.mp4

Also, the shear power of raymarching would make this an invaluable tool to have. Raymarching can achieve practically unlimited detail, without relying on mesh data. You can render fractals and perform endless boolean operations, and even apply physics to said shapes. A great example would be Code Parade's 3D fractal physics game "marble marcher". He renders warping 3D fractals in realtime with raytracing-like features and even fractal physics, with incredible efficiency

youtube.com/watch

Let me know what you guys think... I believe this kind of rendering has unlimited potential, and Im sad that so little exists for using it.

83.3%

Development Status: Open

Upvote 10 Downvote 2
mistersircode
16 Feb 2022

7 Comments

modormoder

This thing is too different from blender's rendering algorithm to be inline.

No its not... Octane supports hybrid rendering with raymarching.. Infact, many engines do. You can even do it with a fragment shader in Unity

Infact, its actually not all that difficult to merge a scene description of a raymarcher with a normal renderer.

You canc do z-depth masking, and the already existing normal-assumption functions to get the normals and depth of a Raymarched scene and combine it, along with the render layers, to a normal scene, and sample data.

The same way data is sampled from meshes, it can be sampled from distance fields. Its not that complex when you really think about it

1
mistersircode Author

modormoder, I think thats a bit of a stretch. I was able to use the material depth to merge my SDFs with the scene, it wasnt amazing but it worked. And the SDFs surprisingly worked perfectly with glass, reflections and emissions. The only issue is that when objects went inside the SDF's containing object (the object with the material), it would intersect the object and cause weird depth issues and overlays

mistersircode Author

uar (I think I replied to you, idk how this reply thing works), I like your explaination, and I do think this is viable, but Ive never worked with cycles (programming wise) so I cant make any solid decisions there

modormoder

I beg Just post the link to the video! They don't show up!

mistersircode Author

I fixed the links.. not sure why the videos were stuck on proccessing, oh wells

Lauloque

the website's implementation of user is bugged since months now, I actually don't remember a time when it worked. Hopefully it gets fixed one day