| Submitted by , posted on 27 March 2002 |

Image Description, by Nothing original but it's probably more interesting than my landscape engine... All I did was take the code Jos Stam kindly released: http://www.acm.org/jgt/papers/Stam01/solver.html ...implemented his advecting textures idea:
http://www.dgp.toronto.edu/people/stam/reality/Research/pdf/ns.pdf
...and added vorticity confinement:
http://graphics.stanford.edu/papers/smoke/smoke.pdf
...to get this:
http://matrix.netsoc.tcd.ie/~the_one/iotd.exe
It's tweaked for my PIII-700 where I get 50 FPS. It could probably be made many times faster however by optimizing specifically for power-of-2 grid sizes (especially the FFT computation). Right mouse click pops up a menu.
The particular screen-shot above shows a swirling texture with vorticity visualization enabled, where vorticity is simply the curl of the velocity field. Clockwise circulation is represented by red and counterclockwise by blue. This was made on a 100x100 grid with a 512x512 texture, although the demo uses a hard-coded 64x64 grid with very low resolution textures. A couple of even higher quality screen-shots can be found here:
http://matrix.netsoc.tcd.ie/~the_one/wallpaper_scifi.jpg and here:
http://matrix.netsoc.tcd.ie/~the_one/wallpaper_paint.jpg
If anyone has any questions to post, I'll be happy to answer them...

[prev] | Image of the Day Gallery www.flipcode.com | [next]

Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.