FluidSolver [as3 port of MSAFluid]

Fluid Solver

Last weekends I saw fantastic fluids animations on vimeo by Mehmet Akten! He wrote his own fluid solver library for C++ and Processing. Sure I decided to adopt it to flash.
Of course Flash is not so fast as Processing and C++ but I gave it a try and after some painless optimizations I got working Fluid Solver class in pure AS3 without any pixel bender or alchemy. I know you would say that if we use alchemy it would run smoother and faster but it is always pain to rebuild/change smth in such versions…

You can launch preview application by clicking image above.
Note the performance iterating 10K particles combined with Fluid Solver!
(please note: you will need Flash 10 to view it)

I’ve posted sources to my google repo ;)

Also I’ve screencasted some clips during developing process:
Fluid Solver and Particle lines mix
Sound Driven RGB FluidSolver + Particles
Flash AS3 Fluid Solver test application

68 Responses to “FluidSolver [as3 port of MSAFluid]”


  1. 1 leerraum

    simply wow!

  2. 2 Rob

    Good job :)

  3. 3 Marcus Blankenship

    Wow, awesome! Please post the code when you can!

    Thanks,
    Marcus

  4. 4 memo

    very impressive!

  5. 5 Eugene

    Thanks to all for the responce! ;)
    I’ll prepare the sources asap and post it.
    cheers.

  6. 6 johannes

    wow, very cool! and very responsive!

  7. 7 chrleon

    wow. impressive and very visual! Really like the ‘bling’ :D

  8. 8 cyancdesign

    This is amazing. I’m really looking forward to seeing the source to take a stab at implementing it in a multi-touch environment.

  9. 9 Seth

    Great work! I agree with cyan, with source we can get this up and running with multitouch in no time. :)

  10. 10 ookla

    are you a cylon?

  11. 11 Eugene

    @ookla what you mean?

  12. 12 Lawrie

    Beautiful, stunning work. Playing with the source for this will be amazing. Thanks.

  13. 13 David

    Awesome work, the performance is incredible! Out of curiosity, what grid size are you using for this solver?

  14. 14 Eugene

    Thanks, David!
    for particular test application I used grid of 50 pixels width.
    btw, I’ve just posted sources to my google repo!

  15. 15 Simpleex

    Thanks for this !

  16. 16 CJ Cenizal

    Great work man! And I’ll add my voice to the collective “THANKS” for posting the source.

  17. 17 Seth

    Hey Eugene, just ported this to multitouch so people on nuigroup can use it. Hopefully someone can post a video soon showing the touch interaction.

    http://nuigroup.com/forums/viewthread/5587/

  18. 18 BK4D

    Wow. Nice work. Look forward to using this.

  19. 19 Clemente G

    Nice job. This stuff amazes me. I haven’t touched this part of AS3 yet but this makes me want to. Good Job. Cant wait for the code to see if I can understand it.

  20. 20 Eugene

    @Seth that’s cool, man! I have seen your post there. looking forward to see some videos :)

  21. 21 Flashclub

    Hats off. Great job. We are researching cool flux effects for clubgalactik.com and this looks like a very strong candidate. looking forward to the source.

  22. 22 Eugene

    @Flashclub thanx, man! I have already posted sources! ;) go and play!

  23. 23 Michiel van der Ros

    Very Impressive! Looking forward to seeing the code.

  24. 24 taktik

    Absolutely wonderfull ! It’s the first time i see a so beautifull fluid motion only in flash ! ;)

  25. 25 taalto

    Really cool stuff! Thanks for sharing the code also

  26. 26 yezzer

    That’s some absolutely fantastic work. Excellent!

  27. 27 Marcelo

    Oh this is a shit-hot thing dude, really awesome. I’m flash dev too, feel free to add my contact to your msn contact-list, marcelo@marceloduende.com.br

    b-bye

  28. 28 Marcio Puga

    THIS IS FUCKING COOL EUGENE!!!

  29. 29 betamakz

    Simply insane. Congratulations.

  30. 30 tom

    This is one of the most exciting things I’ve seen in flash over the last couple of years. Seriously! Fell in love as soon as my friend showed me this yesterday. I made a quick sound visualizer using your example. Can check it out here… http://www.collisionmethod.com/#scrapbook/fluid.swf

  31. 31 Yasu

    This is realy cool!

  32. 32 john

    Finally!! flash is actually useful for something other than slowing your browser down

  33. 33 cyancdesign

    I have a post up with a video comparing MSAFluid with FluidSolver on my multitouch table. Check it out here: http://www.cyancdesign.com/2009/05/flash-vs-processing-fluid-solver/

  34. 34 cyancdesign

    Didn’t know you were on Vimeo. I see you’ve been added.
    Again, amazing work Eugene.

  35. 35 Eugene

    @cyancdesign Its ok! :) Thanx for providing a link to video!

  36. 36 Justin

    Haha, you beat me to it Eugene! I’ve been having fun with this in Proce55ing but its great to have it on the Flash platform. As ever, incredible work. Keep on raising the bar for the rest of us ;)

  37. 37 Eugene

    @Justin thanx for writing ;) I thought it would be cool to have such class in flash! ;) Have a good time!

  38. 38 Matt

    Eugene,

    Wow, amazing! The performance is astonishingly fast! Great work! Thanks!

    Matt

  39. 39 Dave Stewart

    That is easily the best thing I’ve seen all year. Or ever. Amazing!

  40. 40 Juan Gomez

    Hello Eugene, I like a lot your effect, its really impressive. I downloaded the source files, but I cant put them in flash, we would like to use your effect for a new art website we are creating, if you can help us with that I apreciate it a lot. Hope you can help us.
    Cheers
    Juan

  41. 41 IllusionSector

    This is too awesome. Years ago one of Autodesk’s (then Alias’) principal scientist’s, Jos Stam wrote something to this effect on his blackberry to pass the time during an airplane flight. That mini app snowballed into what later became the Fluid Effects in Maya, which, ultimately won him and his team an Academy Award.
    Anywhoooo…. Thank for generously sharing this with us, Eugene. Keep up the awesome stuff.

  42. 42 Kyle

    oh my god .it’s amazing….soooooooo cool. .man
    Eugene you are amazine flash Developer ,i think dont have people do this like that in China!

  43. 43 uva

    Hi, congratulations for your job. Really impressing.

    Is it possible to change background color to white, so that can use it as mouse trailer in website integration?

    Made some tests with it, but can’t find no way to make it. Allways have some black layer over my background color.

    Thanks

  44. 44 Eugene

    @uva Sure You can change background color but in this very example there is no transparency available. So the only one way is to rewrite fading function so it will fade not in black but in some over color.

  45. 45 uva

    Eugene, Thanks for your fast reply.

    I think I was able to make it by changing project background color and adding:

    fluidImage.blendMode = BlendMode.DIFFERENCE;

    at line 124

    Anyway fading seems strange.

    About the 3 color squares at left top of application how can I remove them ? Seems like some function to record. Can’t find it in your code, and in you online example they don’t show … Strange…

    Thanks one more time, for your help

  46. 46 Eugene

    @uva Thats strange I haven’t seen any color rectangles. may be you can fix at render function that renders fluids to bitmapData

  47. 47 uva

    Eugene, seems like it was related with TUIO

    Just removed :

    TUIO.init(this, ‘localhost’, 3000, ”, true);

    And the squares just disappear :)

    thanks one more time

  48. 48 uva

    Just a final question…

    I’m trying to make the window elastic. Auto resize to fill all browser window.

    I’ve tryed to make it with :

    public var sw:Number = stage.stageWidth;
    public var sh:Number = stage.stageHeight;

    But it wont seems to work. Does anyone have it working ?
    Even if I make :

    stage.scaleMode = StageScaleMode.EXACT_FIT;

    The fluid box stays the same size. :(

    Thanks

  49. 49 Dave

    possibly the best as3 work I’ve seen to date. Fantastic. its like a fireworks dream. excellent effort !

  50. 50 Pedro

    Excellent work. i´m quite new to all this things, trying to build my first multi-touch FTIR setup and wanted to try this efect there. Can anyone explain me how to download this aplication? thank you

  51. 51 Sim

    This is indeed great…I’m hoping to remove the colored rectangles too, which file do I need to edit? Also, is it possible to remove the on screen display? I’ve got co-ordinates and controls displayed when I launch the app in Flashplayer…can I get rid of these? (ie. just the fluids)
    Awesome work, thanks
    -Sim-

  52. 52 Kesit

    Just see this…and adopt it to my interactive wall!! Verrrryyyy Awesome!!
    Thanks for sharing Eugene!

  1. 1 Create Digital Motion » Touchscreen Particle Drawing, Memo’s MSAFluid Particle Library, and Why Sharing is Good
  2. 2 Hebiflux » Fluidsolver, pour se droguer avec du flash
  3. 3 Twitted by dirs
  4. 4 Multitouch Actionscript Fluid Solver | SethSandler
  5. 5 Fluid Flash | MadeByPi® Blog
  6. 6 links for 2009-05-18 » ononolab.com -
  7. 7 Flash vs. Processing - Fluid Solver | Cyan[c] Design
  8. 8 ActionScript3 流体 | 忘 -bou-
  9. 9 Twitted by neave
  10. 10 Tutorials flash actionscript3 at ting
  11. 11 FluidSolver
  12. 12 Fluid Solver – Application « smoke » multitouch
  13. 13 FluidSolverHD [Alchemy version] | astatic notes
  14. 14 frocessing - bongiovi's blog
  15. 15 The secret life of points (part 1)
  16. 16 ARE2010 « James Alliban

Leave a Reply