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:
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]

 
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.
 
kroz

March 27, 2002, 01:49 PM

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

cool

 
Buster

March 27, 2002, 02:01 PM

looks like pudding.

mmmmm, pudding

 
Scorp

March 27, 2002, 02:26 PM

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

 
Aurora

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?

GREAT WORK!!!!

 
Nich

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:
http://developer.nvidia.com/view.asp?IO=ogl_fluid_viz
or:
http://www.nada.kth.se/~gustavt/fluids/


> 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.

 
masterg

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.

 
hdmx

March 27, 2002, 02:53 PM

Who is "ugly mud"??? ;)

hdmx

 
Nich

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.

http://www.flipcode.com/cgi-bin/msg.cgi?showThread=12-07-2001&forum=iotd&id=-1

 
n1c_V

March 27, 2002, 03:45 PM

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

 
iCodeSuk

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..

 
DirtySouthAfrican

March 27, 2002, 04:42 PM

The "powergoo" mode is just disturbing...

 
Kanda

March 27, 2002, 04:55 PM

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

 
dEViNiTY

March 27, 2002, 05:17 PM

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

 
KieranIsOK

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. :)

James.

 
Nich

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.

 
Nich

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.

 
Trob

March 27, 2002, 08:55 PM

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

~Trob

 
matthew j stephens

March 27, 2002, 09:31 PM

wild turbulance

 
Dobbs

March 27, 2002, 10:16 PM

You MUST make a winamp visualization out of this.

 
PrimeOrdeal

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.



 
Udderdude

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.