Hacker News new | ask | show | jobs
by codeka 4481 days ago
Yes, you basically render the particles as metaballs for that sort of effect. Should be doable in glsl, though I haven't personally done it.

Edit: here's a video showing the technique: http://vimeo.com/4391370

2 comments

Yep, those kind of 2d metaballs are indeed doable in GLSL - I have a WebGL proof-of-concept lying around. I really struggled to get good performance, though my shader-fu isn't up to much.
Metaballs are too expensive for more than a few particles. There are probably some other algorithms that would work better, or not doing metaballs strictly.
I found metaballs as very efficient when using pixel shader. I did port my js fluid simulation to C++ and used cocos2dx with shaders to do it for iphone. Works good.
Rendering rigid bodies as metaballs is a big step away from buoyancy