liquids

marcus • April 4th, 2008



when i saw the fountain a while ago, i was stunned by the amazing liquid effects photography chris parks did for their surreal space backgrounds and since then wanted to get my head around the dynamics in these systems.
now having finished our patashnik piece (will be blogging about it soon) i had some time to get into that subject. but before going directly to the code i got hands on ... with ink, olive oil, washing detergent, soy sauce. here's what i got out of it after playing with it for a few hours.
» "liquids" on flickr.

its definitively amazing for me because normally i'd spend three months writing code before seeing a single image thats close to one of these photos. not exactly what you'd call "agile" ...



however speaking about code =)
i currently see two strategies to simulate this "liquid effect" in code:
a) do all the calculations for the complete area/ volume of the liquid. this is the traditional approach and has been implemented a number of times. however since your calculation costs increase exponentially with increasing resolution, it is impossible to generate hd images/ animations in realtime using this method, which is what i'm aiming for.
(i wrote a GLSL GPU-feedback based implementation a while ago, which works fine, even at higher resolutions, but is difficult to combine with other physical forces/ particle effects)

b) another approach i'm currently pursuing is simulating the fluid with a very large particle system where each particle varies in size to cover the complete area, therefore i'm currently rewriting/ optimizing my particle system to use multiple worker threads and improved opengl performance tricks (display lists, point sprites etc). that way i can now simulate 40.000 particles at 125 fps on my macbook pro – in java!

lets see where this goes...

by the way; the very talented maxim zhestkov also makes use of liquid effects in his latest video installation – very nice!

Tags

+dynamics +liquid +math +performance +physics +programming

Reply

3d 4-space abstract aesthetic system aesthetics algorithm alien ambient ambisonics animation architecture art artificial audio audio research black&white book caskets classic clicks & cuts code color computer-vision conceptual art consoles cpp culture ddr design devices digtial fabrication documenta documentation drawing dynamics electricity electromagnetism electronics environment event exhibition experimental exploration fashion festival film flocking folk food fractal furniture gamedev generative genetic geometry glitch graphic hacks haptics hardware history hyperspace ideas illustration images inspiration installation instrument intelligence interactive interieur japan java knowledge management landscape library life light liquid live london math micro minimal modernism monochrome motion motion graphics multiples music naming nature nervous ink networked networking opensource osx painting paper particles performance personal photography physics playful politics press print processing processing.org programming quotes recipes research retro romance ruby scripts sculpture SENDUNG.net shopping snippets social software sound space space exploration craft space exploration craft orbiter supercollider swiss systems technology theory theremin toys transformed travel tricks typography universe video visual vj water web2.0 xcode