- #1
DivisionByZero
- 17
- 0
I was searching for equations on water bouyancy, and was very interested to find this forum for physics, etc. I'm currently writing the physics for a game engine, partially because I want to learn more physics and I would also like to see the game engine have some nice physics.
Todays personal computers are fast, but not quite fast enough to do 3d renderings along with a bunch of other stuff, with perfect physics. I would however like to make the physics as realistic as possible while still maintaining decent frames per second.
I'm using particle based system, where each particle moves based upon the verlet integrator, uses projection to handle collisions, and uses distance constraints to keep the particles in their correct positions.
Anyway, the main reason for saying all this is that I don't want utter perfection, but stuff that looks good, and is reasonably accurate.
Now, to my actual question.
I'm intending to implement reactions to water in my physics engine. The game engine already has a water object- using sine waves to generate the waves with a little randomness thrown in. Anyway, I was thinking on implementing the water physics, when I realized there would be a problem with simply making particles raise/lower proportianetly to the water height above. the problem with this is that even when the object is very, very deep, it is affected by the water motion above. I decided it would probably be best to basically have two equations. one that bases it's calculations on local water height, and one that works of average water height. then put the result in a weighted average, where the weights are based off the distance from the minimum water level. When above this level, the local water height equation is used, but when below, the average favors the average water level more as depth increases. eventually it is the only equation used.
I believe my method so far should pretty much work, but the question is how to store particle bouyancy. simply a constant that when multiplied by the adjusted water preasure(result of weighted average) to get acceleration? Where negative values will mean that the particle drops, and positive mean it rises.
Is there a better system than this that is not too calculation intensive?
Thanks for any suggestions!
--DivisionByZero
You know it makes sense
Todays personal computers are fast, but not quite fast enough to do 3d renderings along with a bunch of other stuff, with perfect physics. I would however like to make the physics as realistic as possible while still maintaining decent frames per second.
I'm using particle based system, where each particle moves based upon the verlet integrator, uses projection to handle collisions, and uses distance constraints to keep the particles in their correct positions.
Anyway, the main reason for saying all this is that I don't want utter perfection, but stuff that looks good, and is reasonably accurate.
Now, to my actual question.
I'm intending to implement reactions to water in my physics engine. The game engine already has a water object- using sine waves to generate the waves with a little randomness thrown in. Anyway, I was thinking on implementing the water physics, when I realized there would be a problem with simply making particles raise/lower proportianetly to the water height above. the problem with this is that even when the object is very, very deep, it is affected by the water motion above. I decided it would probably be best to basically have two equations. one that bases it's calculations on local water height, and one that works of average water height. then put the result in a weighted average, where the weights are based off the distance from the minimum water level. When above this level, the local water height equation is used, but when below, the average favors the average water level more as depth increases. eventually it is the only equation used.
I believe my method so far should pretty much work, but the question is how to store particle bouyancy. simply a constant that when multiplied by the adjusted water preasure(result of weighted average) to get acceleration? Where negative values will mean that the particle drops, and positive mean it rises.
Is there a better system than this that is not too calculation intensive?
Thanks for any suggestions!
--DivisionByZero
You know it makes sense
Last edited: