Free flowing fluids?

Started by
15 comments, last by Eelco 18 years, 6 months ago
Does anyone have an idea of how realistically 'doable' this is? Basically I'd need to make a free flowing fluid that can interact with a world, i.e. collisions and stuff. Here's what I was thinking about. If anyone thinks back to Pipe Dream, I was thinking about how a full 3D version would be made. I'm not talking about something like this, but rather a full 3D version of that game. Now back to the question, ideally There would be let's say a large water tower that holds the water. When the game starts, the water starts leaking out the bottom into the pipes. The problem would then be how to make a fluid that would behave as if it were going though the pipes and such. To explain a little further to make sure it's clear what I'm thinking about, imagine if you had a ride at a waterpark. When the water starts at the top, it just follows down the entire course. (Let's ignore pressure and gravity considerations, just the liquid follows any path) Not knowing about graphic and stuff, I don't even know if that would be a valid approach to this problem, so that's why I'm asking. Any ideas/comments? FYI this is just a thought I have had. I have no immediate plans to implement this nor test it out. I have too much other stuff on my hands right now, but nonetheless I was curious about this [smile]
Advertisement
You could try to just create a particle system.
Add physics (forces/weights).
Add interparticle collisions ( maybe through an octree to limit the number
of collisions you have to check )
Add collisions with your pipes.
The physics/collisions should allow particles to push eachother down the pipe.
(with a tight enough octree this would probably qualify as a voxel approach.
and each particle would only have to take on descrete locations, limiting the
collisons to each face instead of distances.)

Or you could use a fluid flow (Navier-Strokes [sp?]) on a 3d grid...
but you would have to use a small grid or end up waiting forever for each
frame to go by.


Link
Quote:Original post by KulSeran
You could try to just create a particle system.


That's a very interesting idea! Now that I think about it, I think that approach could very well work as a very efficient solution. I'll have to take a look into particle system design to see how to make particles act more cohesive rather than as 'particles'.

Quote:Original post by njpaul
Link


Thanks for that! Looks like a great read, I'll have to definitly go over that. Those images in Figure 8 of the solver in action look very nice.

Well I have a basic idea of a few approaches to this problem. I'll have to keep a few mental notes if I ever come back to this issue. If anyone else has something to share, please do!
You might want to read up on particle based cloth simulation. Typically, particles are connected by springs, which provides a fluid design. Baraff and Witkin did some of the original work on this.
This might also help.
The thumbnails seem to have disappeared, but the movie clips themselves still seem to be available from Meqon AB's future technology page. Just to let you know that it is probably fairly 'doable' ;-)
Obviously Meqon is at the forefront of this stuff, but I imagine similar options may be available for Free libraries like ODE in the not too distant future (of course, if you want to write an ODE extension for this and release it, I'm sure no one would object :-P)

-bodisiw
-bodisiw
The Sh toolkit has some water examples in this article.

edit: I was wondering as I was reading this thread if these algorithms/methods could perhaps be used to make some realistic shoreline rendering -- waves breaking, etc. All games I've seen to date have a flat shoreline with a "foam" texture that moves around or something similar. Highly unrealistic. That's sorta been my holy grail rendering technique. :)
Awesome! Thanks everyone for the additional information. Right now I am thinking about some more 'original ideas' based on something with the aspect of this 'free flowingness'. This weekend, I'll revisit this thread and read some more into everything. Right now I was thinking about something with electricity and protons/electrons [smile]. So much to do, so little time... Thanks again guys!
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).

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

This topic is closed to new replies.

Advertisement