3D water effects : splashing

Started by
5 comments, last by sergamer1 15 years, 3 months ago
Hi all, I've been searching (without success) for some information on methods of modelling water interactions in 3D games. In particular, I am looking for how to do realistic splashing effects when an object is dropped into water, and then all the subsequent effects (e.g. does the object sink If not, it will oscillate up and down on the water's surface. And then of course the propagating water waves from the splash). I'll assume that most (maybe all?) instances of splashing in games is a visual effect with some mathematical prescription to dictate the water response rather than having some serious physics behind the scenes, but maybe I am wrong and there is something more clever going on. I am interested since it would be great to model this in some way (using some low resolution-SPH simulation or other particle method perhaps) so you can obtain realistic splashes for different size objects which fall in the water. Maybe this is not a realistic goal, but I thought I'd ask the question before deciding whether it's worth actively pursuing. Thanks, Sergamer
Advertisement
Puh - I've yet to see a good (read: realistic) water simulation in a game or other realtime application. The thing about water is that it's incredibilly hard to simulate because of the movement physics. I've read some articles which simulated water using the Navier-Stokes equations Example. The problem with this method is it's very computational and requies you to solve a bunch of partiel-differential equitions for a vector field (read: not realtime friendly). As for implementing it in realtime you might was to look up Jos Stam who proposed a fast implementation a few years back. I believe Nvidia also have an example using the GPU. Problem is these realtime alternatives are 2D.

Right now I would say your best bet is to use PhysX which has a decent fluid simulation built-in.

Rendering the water is a whole other matter - I've seen people do it using an isosurface. But again not very realtime friendly :)

It's all about faking it - or well that's what my girlfriend seam to think!
NVidia also has a real-time 3d fluid simulation demo available, and it runs very well on GF8800 and above.

I have written a comparable simulation myself using D3D10, and performance was good if the volume resolution is not too high (I used 1283). The visual result can still be very convincing, because rendering of the volume will inherently mask away the linearity of the grid at any viewing direction except straight toward the primary axes.

A good optimization trick is that if the volume can be somewhat flat in one dimension (as in shallow water) you can reduce the resolution of the thinnest dimension and improve performance dramatically.

Niko Suni

If you need to handle a large quantity of water one possible way is to use a combination of surface and particle methods - for example:

1. Represent large expanses of water as a heightfield with some superposition of waves (no physics)

2. Represent local disturbances - e.g. near the camera with a water surface simulation (on a higher resolution heightfield) and superimpose that (somehow) on the result above.

3. Then represent splashing with particles - anything from simple non-physical particle effects to full SPH simulation that interacts with the heightfield and rigid bodies.
Hi guys,
Thanks for the replies. I guess you've confirmed some of my thoughts about this problem. My initial thoughts were probably in line with what MrRowl suggested, i.e. some combination of different methods to get the full effects. Obviously it would be completely impractical to solve the fluid equations for say an entire ocean, so I was only thinking of solving these equations for a small region of the problem where there some body interacts with the water. I suggested SPH since I have experience with it (although no experience in fluids interacting with solid-bodies) and I know it is much easier to model splashes with particle methods than grid-methods. Coupling the local-SPH simulation to the large-scale non-physics water expanse will of course be the tricky part (assuming that the local simulation is fast enough that it doesn't slow things down). I guess I'll have to have a think about this, since it would good to see what is possible.
Thanks :-)
I don't know how much help this is but there is a game coming out called Hydrophobia by Blade Interactive

quote from website

"Hydrophobia is the first game developed using Blade's revolutionary HydroEngine - the world's only full computational fluid dynamics engine for games.

This incredible technology allows water and other liquids to flow and behave completely realistically, resulting in the most dynamic and dramatic gameplay you've ever seen."
Quote:Original post by Malal
I don't know how much help this is but there is a game coming out called Hydrophobia by Blade Interactive

quote from website

"Hydrophobia is the first game developed using Blade's revolutionary HydroEngine - the world's only full computational fluid dynamics engine for games.

This incredible technology allows water and other liquids to flow and behave completely realistically, resulting in the most dynamic and dramatic gameplay you've ever seen."


Yeah, I had a look at that. Looks quite good, although there is virtually no information anywhere on what methods they've used. Yes, I know dev teams don't go about revealing 'secrets', but knowing a method and creating an efficient implementation are two different things, unless of course they come up with a completely new approach to hydrodynamics ;-)

This topic is closed to new replies.

Advertisement