In order to render a surface you have to either use a contouring algorithm like marching cubes to generate a mesh like the above three.js demo, or raytrace or raymarch them. Because metaballs describe a distance function, its really easy to use SDF raymarching and there is a whole category dedicated to metaball shaders on shader toy (https://www.shadertoy.com/results?query=tag%3Dmetaballs).
Comments (93) 36 threads
Earlier commentsContinue this thread — 5 replies
Works on Unix, Mac, iOS and Android
Code mirror is here - https://github.com/Zygo/xscreensaver
W.P. van Paassen's metaballs C code is here -
https://github.com/Zygo/xscreensaver/blob/master/hacks/metab...
Also, you can set various parameter tweaks for the metaballs from the command line or settings - count, radius etc.
https://threejs.org/examples/#webgl_marchingcubes
With the SVG/Bézier approach I doubt you could do 3D, true :)
In order to render a surface you have to either use a contouring algorithm like marching cubes to generate a mesh like the above three.js demo, or raytrace or raymarch them. Because metaballs describe a distance function, its really easy to use SDF raymarching and there is a whole category dedicated to metaball shaders on shader toy (https://www.shadertoy.com/results?query=tag%3Dmetaballs).
All comments shown.
Couldn't load more comments. Check your connection and try again.