Fluids

Smoke in Flash 8.5Some days ago I found an article about fire as a fluid on the very excellent page of Hugo Elias. Most of you will know him because of his famouse perlin noise article. I liked the idea behind the way how to simulate fire as the reaction of fuel and oxygen. So I started to reproduce that fire and got stuck at the fluid part.
Lightweight fluids in FlashI did not know anything about the mathematical natrue of fluids. So I followed the link to the publications of Jon Stam. Fluids are a very difficult natural phenomena in my eyes. If you do not really want to read about fluids you might have a look at the implementation of a stam-solver in C. As you can see this is something Flash can not handle. But then I also saw a stam-solver done in Java.
This is why I thought it could be possible in Actionscript too. But it is not. First of all I tried to do the stam-solver in a nice way with packages etc. It was much slower than the Java version. I thought it might be because this was the first time I worked with packages (like flash.util.trace I did something like de.je2050.fluids.solve). The direct clone of the Java source in Flash was also much slower than the Java version. What a shame. It is not just slower, it is even not 1fps.
So what I did was reducing the stam solver to lower quality. The result is a bad looking fluid (which is also colored like fire). Too bad that Flash has fallen behind the current standarts. The smoke looks so nice but it took me about 10 minutes to render that in Flash ;)

Update: A video of this beautiful smoke is also available. I have done this using C++ instead of Flash.

Related Posts

  • No related posts

3 Responses to “Fluids”


  1. 1 kiroukou

    Hi,
    Nice effect! Good work.
    But i don’t see anything except a black frame in your video… I’m using VLC player.
    ++

  2. 2 Aaa

    GREAT GREAT GREAT!!! YOU PWN!!!
    Please more news, this shit is really interesting.
    Your a real pro.

  3. 3 joa

    You have to use Windows MediaPlayer I am awfully sorry. Bad Codec :o)

Leave a Reply






Close
E-mail It