Computational Fluid Dynamics

I have recently been thinking about realistic water in games (In general, not just Torque Games), and I have come to the conclusion that it's quite under-represented. I know that we have detailed Ocean and river effects, using shaders and other techniques, but I'm talking about genuine "flowing" water.

For Example: filling a bucket from a tap, water from a leaking pipe flowing down a staircase and puddling at the bottom, a player shoots at a barrel of water and it pours out into the room. This, to my knowledge, has never been done.

The reason for this, of course, it that water is composed of "particles", ie, molecules, and rendering enough particles for realistic water is a huge challenge for any computer system, and nigh-on impossible for a computer game running on average hardware.

The closest we can probably get is a 3D version of the "Falling Sand" type game:
fallingsandgame.com/sand/pyro.html

Which would be a lot of "fun" but not realistic looking, a player would easily be able to see the individual particles that make up the flow.

I found an excellent article from Intel, here:
Fluid Simulation for Video Games
This provides extensive documentation and sample code for a very complex fluid dynamics program, which is a lot more than a "game" would likely need.

Nvidia has also produced an excellent water pysics demo using physx:
n4g.com/news/183130/nvidia-physx-particle-fluid-demo-video

I created a simple 2d water physics demo (based on falling sand) in college for a physics project, and I had an idea to try to do something like that in torque. I am not sure, however, if it is even possible to create realistic flowing water like "Falling sand", without the individual particles being visible to a player.  Is there some kind of smoothing function that can be implemented quickly (in real time) like the Nvidia demo?

 I think it could open up a whole new area of games, in the same way that Havoc and Ageia did with their physics engines, or Volition did with the original Red Faction. They allow players to look at a game in a whole new way, in Red Faction, you can tunnel through walls and floors to flank an enemy or set traps. Imagine combining the with realistic water, you could plant an explosive charge on a reservoir, retreat to a safe distance, then detonate it and drown all of the enemies nearby.

Another point is that, if you look at Valve's Portal series, in those games a gameplay mechanic (namely, the portal guns) became the entire game! So it could be possible to do the same thing with water.

You must be a member of this blog to see the comments. Log in now!

If you have no account yet, you can register now! (It only takes a few seconds)