libfive is mostly manifold dual contouring [1], which snaps to sharp features and is watertight + manifold, but may contain self-intersections. I experimented with a few other algorithms, but nothing is better so far.
I think that Doug and I talked about mixing libfive + Curv a few years back. At this point, the right way to do it would be using an Oracle, which lets you embed an arbitrary black-box into the math tree (then hide a CPU-side Curv interpreter in that black box). This isn’t super well-documented, but I could write it up if there’s strong enough interest.
For ease of implementation, you could even have the oracle return +/-infinity for every interval evaluation (which is technically true!). This would be less efficient, since it would force evaluation to recurse down to individual voxels, but would let you avoid implementing interval arithmetic in Curv.
You’d still need to calculate partial derivates, since that’s what libfive uses to place vertices on sharp features. Since Curv renders with shading, I suspect that you’ve already got a path for that, although partial differences would also work as a last resort.
-Matt
[1]
http://faculty.cs.tamu.edu/schaefer/research/dualsimp_tvcg.pdf
> To view this discussion on the web, visit
https://groups.google.com/d/msgid/curv/bbe66f9c-cfaf-46a1-9985-0bf2385269c7%40www.fastmail.com.