Water Flow Collision and Response

Started by
1 comment, last by MrRowl 13 years, 1 month ago
I am building a water particle system that uses collision detection to automatically flow down a terrain and other obstructions.

Pic1

It works OK, but it is not taking into consideration some of the physics of water and so it doesn't look natural in some places. For example, here is a close up of an odd path flow.

Odd Path Flow

I know why this is happening: Because I am just using gravity to control the particles. But real water tends to want to spread and fill troughs (is this due to the pressure? Any other forces?).

Any ideas of how to simulate this cheaply? It just needs to look right, not be physically accurate.
-----Quat
Advertisement
Having never done this my initial guess is as follows. You have a source and starting from that source point on the terrain every 1 meter in 32 directions find the height (simple interpolation) and choose the lowest direction and go there. Then keep doing that same process and connect each point. When you're done build a spline. I'm sure at that point you can have your particles follow the spline like boids or something naive and not use real physics at all. I bet you could even just generate geometry over the spline to slope into the terrain slightly and just render a flowing water shader on it.

If you still want water particles maybe a weight tower the spline might help curve the flow.
At the very least you need to represent some form of friction/drag, otherwise the water particles will accelerate without limit and swoosh up the sides as in your screenshots.

This topic is closed to new replies.

Advertisement