Re:Metaballs and WebGL
by yoklov on Friday July 15, 2016 @08:33PM
(#12104655)
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
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.
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 )