3 ms·
Metaballs are great! Here's demo I wrote a while back that does them, but in a slightly hacky way for performance reasons (and it performs pretty well!) http://
by yoklov 10y ago
Metaballs are great! Here's demo I wrote a while back that does them, but in a slightly hacky way for performance reasons (and it performs pretty well!) http://codepen.io/thomcc/pen/vLzyPY http://codepen.io/thomcc/pen/vLzyPY
Basically, each "ball" is a 2d gradient texture, i render them all to a framebuffer, and then do a postprocessing pass which applies a threshold (not strictly binary so as to get some antialiasing) to the gradient, rendering the isosurface.
(And I also have a 3D pen, which does the more legit marching-cubes approach: http://codepen.io/thomcc/pen/NGmmPB http://codepen.io/thomcc/pen/NGmmPB )