SDF Functions

Expanding to Signed Distance Field takes up a lot of space, that’s why it’s SDF. The labels are up for debate!!

This is really cool, I wish you best of luck with development!
In the future, could SDFs be a way to realise the wish for a text node?

Yes.

2 Likes

I’m still working on this!

Using SDF to create volumetric donuts!

8 Likes

What does the SDF “Vesica” primitive look like?

This page has the math and an example of most of the shapes.

2 Likes

Great work! Looking forward for Cycles version!
I just asked on RCS about very similar thing:

My question is - will SDF that is implemented provide that kind of function?
The ability to create procedural fallof/border between two values on bitmap or other input would be awsome.

Thought you’d be interested in this, font rendering in glsl using msdf:

1 Like

Any news or updates? This would be great to have in Blender.

2 Likes

Sorry for the dumb question. Are you talking same sdf shown in the linked video?

2 Likes

Partially, the SDF functions in D6464 only define some math primitives to define a distance field, the demo you linked has a ray marcher on top to actually render it.

2 Likes

It is possible (though rather complex and, in many ways, limited) to set up ray marching in shader nodes in Cycles.
That being said I kinda doubt results like in that video would be possible.

I do wonder if, somehow, this technique could be incorporated into Cycles. From what I understand it’s actually sorta like monte-carlo style ray-marching (well, Sphere-marching really) which might be able to deal in an essentially uniform manner with point clouds, SDFs, and regular meshes alike.

(Of course that’s quite a few steps beyond the scope of this effort here though)

Thank you for the replay.

Sorry, I’ve been inactive with Blender development due to various reasons. This is one downside of FOSS at times. As @LazyDodo pointed out, the patch is really just a Maths node with SDF functions.

2 Likes

Hi.

You might want to check out how Material Maker (an open source texture creator) does SDF functions. It has a lot of SDF nodes that aren’t too hard to figure out.

Perhaps if Blender nodes could have more comprehensive UI widgets built into them, perhaps things could be easier to control?

2 Likes

Hey, Charlie! Thank you for the response. Even so, SDF nodes would be great. I would hope that some form of SDF nodes gets into master eventually.

2 Likes

True, please also check my https://github.com/paulofalcao/MaterialMakerRayMarching for adicional SDFs stuff for Material Maker

1 Like

Patch has been updated and works on Eevee and Cycles (limited testing and not OSL)
See: ⚙ D6464 Shader Nodes: SDF Node (WIP)

7 Likes

Buildbot builds for D6464 are available here: Blender Builds - blender.org

Please use at your own risk.

5 Likes