3 ms·
you can generate an SDF from a mesh with Polygonjs ( https://polygonjs.com https://polygonjs.com ). Here is an example scene ( https://polygonjs.com/examples/by
by frading 3y ago
you can generate an SDF from a mesh with Polygonjs ( https://polygonjs.com https://polygonjs.com ). Here is an example scene ( https://polygonjs.com/examples/bynode:mat:raymarchingbuilder:sdffromobject https://polygonjs.com/examples/bynode:mat:raymarchingbuilder... ).
It won't generate a function, though. Instead it creates a 3D texture which is used inside the raymarching material. In my experience this is much more performant, and also art-directable.
(disclaimer, I'm building Polygonjs)