Free flowing fluids?

Started by
15 comments, last by Eelco 18 years, 6 months ago
Well, I'm currently studying real-time smoke simulation for my Honours in B. Comp. Sci. (Computer Games) and have reviewed a bunch of papers concerning fluid simulation. I reckon there's a few different direction you could go in trying to model this water flow idea.
KulSeran's idea of utilising particle systems is a good one, especially for such a situation as the water almost always being in pipes. If you let each particle represent a 'packet' or small moving volume of fluid, with density, pressure, velocity and vorticity this method becomes known as a Langrangian fluid model -> a fluid is composed of many small volumes of fluid with particular characteristics.

On the other hand, Stam's system as linked by njpaul keeps track of the change of fluid flow past specified static points. This is called a Eulerian fluid model, and there are a lot of papers that use this model to solve the Navier-Stokes equations and get some attractive fluid animation. In particular, check out this paper on implementing them real-time on the GPU -> http://wwwcg.in.tum.de/Research/data/Publications/eg05.pdf

For world interactions, the Eulerian models are generally agreed to be better suited to handling boundary conditions. Both models have their strengths and weaknesses and there is a plethora of papers out there implementing them.
I'd say your idea is very much 'doable'.

[Edited by - PAiNIC on September 11, 2005 7:12:34 PM]
Advertisement
what about particle based fluids

novodex has fluids too, a couple of the physx demos has it
[and this paper is by at least one person from novodex]

http://portal.acm.org/citation.cfm?id=1073368.1073402

click the pdf link near the top to read it
Found a paper on 'Real-time fluid dynamics in games'. It's quite good.

http://www.dgp.toronto.edu/people/stam/reality/Research/pdf/GDC03.pdf

There's also a website in the paper where you can go to download the code used in the paper.
I know of at least two games that have used this technique:

http://www-personal.umich.edu/~dratti/fluids/index.html
Oh wow, thanks for that second site PAiNIC, that looks very nice. I need to come back to this topic, I've kinda left it in the dark with so much going on. I'll get around to it eventually...
I came across this paper not a while go:
http://www.iro.umontreal.ca/labs/infographie/papers/Clavet-2005-PVFS/

I haven't had the privilege of implementing it yet but the technique described in this paper looks pretty straight-forward and as for the results... well, you can judge by yourself.
^

Wow. That's pretty impressive. I'm trying to resist the temptation to go off & implement this myself...
Quote:Original post by superpig
Personally, I'm not convinced that solutions based on velocity fields are ever going to be a general solution to water in game engines - Jos Stam's paper notes at the end that you've got to extract the boundary between water and air in order to render the water surface, and also, your water is constrained to the volume covered by the velocity field. That could need to be a pretty large volume...

I've reckoned for a while that it's possible to break a generalised water system down into subvolumes (probably convex ones) and then establish statistical averages for water in/out at each face of the volume, or pressure or something; by connecting volumes together you can run water through pipes, tanks, channels, and by differentiating between watervol/geometry boundaries and watervol/air boundaries you can pretty quickly establish the faces where you need to render the water surface. The difficult part is probably the 'realtime CSG' required to compute convex volumes... especially if you're looking at being able to drop objects into a volume (causing it to fracture into smaller volumes).

I've not tried any of that though, only thought about it. (If anyone knows of any work done with that kind of method I'd be interested).


what you are talking about is using the more general finite element method, instead of the in computational fluid machanics commonly used finite differences.

This topic is closed to new replies.

Advertisement