Realtime fluids Demo [Project in avance]

Please don't post Bullet support questions here, use the above forums instead.
cristianGB
Posts: 5
Joined: Tue Nov 18, 2008 10:16 pm

Realtime fluids Demo [Project in avance]

Post by cristianGB »

Image

Hi!
This is a small captured video of my project, a fluids solver in real time. The simulation is based on the model of Lattice Boltzmann represented in a 2D Grid. The size of the grid used in the video is of 100x100 cells, although also I obtained similar results (in other computers) using a size of 200x200 cells. I added some simple shaders for the reflection and refraction too.
In the future, i will release a version of this project, in DLL format, maybe with source.

Youtube Video

Thanks for watching!!! :wink:
Pierre
Posts: 67
Joined: Mon Jul 25, 2005 8:56 am

Re: Realtime fluids Demo [Project in avance]

Post by Pierre »

I find it funny that people still insist doing those 2D height field fluids exactly in the same way Iguana did it in Heartquake, some 14 (!) years ago.
cristianGB
Posts: 5
Joined: Tue Nov 18, 2008 10:16 pm

Re: Realtime fluids Demo [Project in avance]

Post by cristianGB »

Yeah, i know what you're talking about. The IGUANA demo is great! (but they only obtain 3rd place in Assembly 94' :(

My work it's not a "super mega ultra water fluid simulation", it's just my 2 cents . :wink:
I only want to show something of my work to the forum and perhaps somebody thinks that is interesting.

Well, with a basic algorithm, we can obtain good results too. In most cases, a simple
elastic membrane model is often sufficient for games.
For example:

Code: Select all

Initialize u[i,j] (some function)
Initialize v[i,j]=0

loop
 v[u.j] +=(u[i-1,j] + u[i+1,j] + u[i,j-1] + u[i,j+1])/4 – u[i,j]
 v[i,j] *= 0.99
 u[i,j] += v[i,j]
 visualize (u)
endloop
This simple algorithm, model the water surface as an elastic membrane with low stiffness
(A. Jeffrey, Applied Partial Differential Equations, Academic Press, ISBN 0-12-382252-1)

The state of the art in off-line fluid simulation is impressive; (see Ron Fedkiw or some Nils Thurey works), but 10 minutes per frame (in average) is not suitable for realtime. :-)
So, always the challenge is get as close as possible to off-line results with new or modified technics.
Today, procedural water (shaders, etc); particle systems and heightfields are used.

In particular, i develop a fluid solver on a scheme based in heightfield and LBM; (there are a lot of works based on NS equations, for example, but with LBM we model turbulence too).
The idea is extend this, using particles (splash, breaking waves, etc); implements some LOD, etc. and release a "stable" version.

Regards,
Pierre
Posts: 67
Joined: Mon Jul 25, 2005 8:56 am

Re: Realtime fluids Demo [Project in avance]

Post by Pierre »

This simple algorithm, model the water surface as an elastic membrane with low stiffness
(A. Jeffrey, Applied Partial Differential Equations, Academic Press, ISBN 0-12-382252-1)
...which is exactly the same code everybody's been using for 14 years. It bothers me that people write papers out of this.
The state of the art in off-line fluid simulation is impressive; (see Ron Fedkiw or some Nils Thurey works)
I know, Nils was working for us (Novodex/Ageia) when I was there.
cristianGB
Posts: 5
Joined: Tue Nov 18, 2008 10:16 pm

Re: Realtime fluids Demo [Project in avance]

Post by cristianGB »

Thanks for your reply!
I will continue working on this. :wink:

Small edit:
Another video: YouTube Video 2
anlumo
Posts: 6
Joined: Thu Nov 29, 2007 3:27 pm

Re: Realtime fluids Demo [Project in avance]

Post by anlumo »

Hi,

I know it's a late reply, but I'm not here very often :)

My diploma thesis is about LBM, too: http://monitzer.com/FluidGPU/
Since I used CUDA, I was able to do full 3D simulation on a 64x32x32 grid. Maybe my work can help you a bit :)

(yes, I used bullet for the rigid body physics)
cristianGB
Posts: 5
Joined: Tue Nov 18, 2008 10:16 pm

Re: Realtime fluids Demo [Project in avance]

Post by cristianGB »

hi Andreas! I was reading your work, very interesting...you obtains good values of performance!! 8)
Actually i'am working on the interaction of the water model with some static/animated models.
We keep in touch :wink:
cristianGB
Posts: 5
Joined: Tue Nov 18, 2008 10:16 pm

Re: Realtime fluids Demo [Project in avance]

Post by cristianGB »

Hello! First, sorry for double posting :oops:
This is a basic (& very preliminary) version of the DLL that i promised, including the fluid physics module in my last demos.
The zip file includes a Visual C++ Project that show you how to use the library, renders a water grid and permits
user interaction.

Image

Of course, the visualization in this demo is simple because i don't use my graphics engine.
I hope that it helps somebody...

Send me an email if you have any question (or you got some results using this) :wink:
Download: DLL Project Visual C++ Source Code

Regards,
Cristian