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:
...implemented his advecting textures idea:
...and added vorticity confinement:
...to get this:
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:
If anyone has any questions to post, I'll be happy to answer them...
Image of the Day Gallery
Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our