Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is beautiful. My apologies if I missed it, but is it possible to download the produced figure as an STL (or something equivalent)?


No; Bauble doesn't know how to "rasterize" SDFs into meshes; it only knows how to raymarch them. It's theoretically possible, but it's a pretty complex problem that would take me much too long to figure out and implement. So Bauble is relegated to just making pretty pictures for now. If you want to produce meshes using SDFs, check out https://libfive.com/


There's also ImplicitCAD (https://github.com/Haskell-Things/ImplicitCAD) which produces STLs, as it is designed for CAD. It uses implicit functions, which I believe are similar to SDFs (I believe the idea is not to necessarily correspond to the distance function).


Thanks!


I think that would be quite difficult, as raymarching does not produce polygons, so you'd need a way to polygonize the resulting sdf. Maybe marching cubes?


Surely not "something equivalent" that you are expecting, but my smartphone can do screen recordings, so here's a cropped version of what's displayed in its browser:

  http://www.cynix.net/2022/screenrecording-baubel.mp4
I cropped the screen recording to square format with the online service at clideo.com so they added their watermark.


STL is a format for 3D geometry, so the GP is asking if there's a way to export the 3D models themselves. Bauble will have a way to export recordings eventually! That's much easier to do than meshing surfaces.


Thanks, I did guess that it might be some specific format and not just a screen recording, but all these TLAs are hard to memorize.

BTW, it's a really nice example of the possibilities of Lisp, which reminds me to refresh my memories and start coding in Lisp again.


I've written a tool somewhat similar that can export meshes of sdf's created using a javascript api, check it out: https://github.com/stasilo/retrace.gl




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: