Hard physics simulation (contact between solid or even springy objects) is not too bad.
Liquid simulation is tough. Why? Well, think about it...
Take a situation when you're driving your car in the rain. The droplets land on your car and form little pools, but because of your motion, they make water streaks towards the back of your car from the wind. Now, that's not so bad a situation. But there are so many others. Say you have one of those water towers in HL2. You blow a hole in it with a rocket. THINK of all that water, it's interaction with buildings, crevices, etc... You're in for a lot of calculations just figuring out where it's going to go, let alone render the water surfaces...
I'm proposing an alternative that just might work. I guess I'll call it "water-balls".
What you do is have many tiny hard-physically simulated balls, which have the same properties as normal objects, except between each other, they have a mild attraction and zero friction between them. Now, the number of balls would be relative to the volume of the water. You would have to tweak that ratio for physical accuracy and performance. These balls would simulate basic movement of water in a 3d environment. So when you blew that hole in the water tower, they would spill out everywhere.
To render the water surface, you would do some calculations and find specific groups of balls, then stretch a water graphic (maybe with some alpha channels) around all the balls. This would ensure that you get surface deformation (when something steps in water) as well as water displacement (think of the greek guy in the bathtub, the eureka story thing).
As a bonus, it would be fairly easy to have sponging effects as well, since you could just kill a couple balls that come into contact with a porous surface.
Earlier I mentioned adding a mild attraction affect to the balls, and you may be wondering why. This is because if you put a little bit of water on a flat surface, it beads up (due to the polar attraction of water molecules).
I'm curious as to people's thoughts on this and I'd like to hear your suggestions, criticisms and questions
Liquid simulation is tough. Why? Well, think about it...
Take a situation when you're driving your car in the rain. The droplets land on your car and form little pools, but because of your motion, they make water streaks towards the back of your car from the wind. Now, that's not so bad a situation. But there are so many others. Say you have one of those water towers in HL2. You blow a hole in it with a rocket. THINK of all that water, it's interaction with buildings, crevices, etc... You're in for a lot of calculations just figuring out where it's going to go, let alone render the water surfaces...
I'm proposing an alternative that just might work. I guess I'll call it "water-balls".
What you do is have many tiny hard-physically simulated balls, which have the same properties as normal objects, except between each other, they have a mild attraction and zero friction between them. Now, the number of balls would be relative to the volume of the water. You would have to tweak that ratio for physical accuracy and performance. These balls would simulate basic movement of water in a 3d environment. So when you blew that hole in the water tower, they would spill out everywhere.
To render the water surface, you would do some calculations and find specific groups of balls, then stretch a water graphic (maybe with some alpha channels) around all the balls. This would ensure that you get surface deformation (when something steps in water) as well as water displacement (think of the greek guy in the bathtub, the eureka story thing).
As a bonus, it would be fairly easy to have sponging effects as well, since you could just kill a couple balls that come into contact with a porous surface.
Earlier I mentioned adding a mild attraction affect to the balls, and you may be wondering why. This is because if you put a little bit of water on a flat surface, it beads up (due to the polar attraction of water molecules).
I'm curious as to people's thoughts on this and I'd like to hear your suggestions, criticisms and questions