manifold icon indicating copy to clipboard operation
manifold copied to clipboard

Add SDF system

Open elalish opened this issue 2 years ago • 2 comments

Signed distance functions (SDF) are another way to represent 3D solids. They can be discrete (voxels) or continuous (mathematical functions). Traditionally they can be converted to a manifold surface mesh via the Marching Cubes algorithm. I think an implementation of this will fit nicely as an alternative way to create complicated manifolds. SDFs naturally handle Boolean-type operations as well, but they do so in ways that scale differently computationally and can also soften the intersections naturally. I also have some ideas to improve on Marching Cubes via my own Marching Tetrahedra algorithm.

elalish avatar Jun 04 '22 06:06 elalish

Would you provide a way to convert non-manifold meshes to sdfs as a way to get these meshes into manifold?

fire avatar Jun 05 '22 03:06 fire

I suppose that's a possibility, though it would take a pretty wild heuristic to turn something non-manifold into an SDF. I would like to make a sweep-plane algorithm to remove self-intersections from a manifold. That combined with a generic hole-filler could make valid input out of pretty much anything. But the problem is always that the results can pretty easily be random for really non-manifold inputs, because any algorithm just has to guess.

elalish avatar Jun 05 '22 05:06 elalish