Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Nich, posted on March 27, 2002

Image Description, by Nich

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: 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: and here:

If anyone has any questions to post, I'll be happy to answer them...

Image of the Day Gallery


Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

March 27, 2002, 01:49 PM

nice one - looks like had some drugs, then watchin' tv.



March 27, 2002, 02:01 PM

looks like pudding.

mmmmm, pudding


March 27, 2002, 02:26 PM

hmm...looks like loking down in the latrine when having a case of serious diarrhoea. Pretty cool! :)


March 27, 2002, 02:27 PM

That is one of the coolest IOTD's I have seen in a long while. I highly recommend downloading the demo and playing with it. Its just as fun as a game, at least for a several minutes.

Any chance of sourcecode? I just downloaded all the papers thanks to your demo but I would to see how you put it all together. Have you tried adding in obstructions to the flow?



March 27, 2002, 02:39 PM

Thanks for the kind words.

> but I would to see how you put it all together

If you want to see how to make use of Jos Stam's code check out:

> Have you tried adding in obstructions to the flow?

Just so you know, Stam's code only works for periodic domains with no obstacles. But yeah, I got my version with obstacle boundary conditions working over the last few days. It allows you to interactively draw walls like a paint program. I'll probably upload a demo of this in another few days after I've cleaned it up.


March 27, 2002, 02:48 PM

Running that application and viewing the new effects, which you implemented was quite a refreshing, enjoyable change from the standard set of programs lately.


March 27, 2002, 02:53 PM

Who is "ugly mud"??? ;)



March 27, 2002, 03:40 PM

Chris Killpack also used Jos Stam's code in an IOTD from last December. His description is a lot more informative.


March 27, 2002, 03:45 PM

Looks like hot chocolate to me. I want some:)


March 27, 2002, 03:56 PM

This looks like part of that benchmark(fianl reality i think) made by that fin(i think) team who made May Payne. Remedy i think they are..


March 27, 2002, 04:42 PM

The "powergoo" mode is just disturbing...


March 27, 2002, 04:55 PM

Wow ! What a piece of fun :-))))
REally funny to play with it :-)))


March 27, 2002, 05:17 PM

oehhh that's trippy
i prefer my hot coffee though :)
nope, no drugz for me


March 27, 2002, 05:32 PM

It's very good.
It runs a little fast on my machine, is there no way of increasing detail to give my cpu/gpu more to do?

Sniper BoB

March 27, 2002, 05:34 PM

soo much fun.... but its gonna make me blow chunks... slow it down a bit, or make that variable :-)

James Matthews

March 27, 2002, 07:02 PM

Wow, that is *really* cool...I haven't seen pretty patterns like that since my New Years Party in Tokyo :) The only thing was that while it ran the first time perfectly, any subsequent times the console window would stay open even if I closed the main window, then if I tried to close the console, it'd crash. Comp spec: P3-933, 512Mb RAM, WinXP Pro, GeForce2 GTS.

Anyway, like a said before - this kicks ass. :)



March 27, 2002, 08:29 PM

Sorry, not at the moment...
Grid size, viscosity, time step, etc. are all hard-coded and tweaked for my computer.


March 27, 2002, 08:33 PM

Regarding the crash, I don't know what the problem could be. It's just a straightforward OpenGL GLUT app. I'm not doing anything strange in the code and haven't had any problems with it myself.


March 27, 2002, 08:55 PM

Very nice, its very cool. Nice to see some different stuff...


matthew j stephens

March 27, 2002, 09:31 PM

wild turbulance


March 27, 2002, 10:16 PM

You MUST make a winamp visualization out of this.


March 28, 2002, 12:22 AM

Excellent stuff! I especially like hitting the 'R' key to get the random waves moving - very nice.

This is way more complicated (and way faster) than my feeble attempt at sine wave function composition (already submitted as an IOTD - hope it gets up here soon).

The effect is quite similar, but yours is both interactive and has swirls! - my hat is off to you.


March 28, 2002, 03:06 AM

Awesome effect, just played with it for 10 minutes .. I think i'm gonna hurl now x_X

j/k, it's great, you really should make a Winamp thing out of it. :)

- Chris

Bemmu Sepponen

March 31, 2002, 04:09 PM

I know it's not fancy 3D or anything, but this is the best IOTD I remember seeing so far. And I've seen every IOTD there's been so far.

This thread contains 24 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.