Now that the buoyancy force function is gone, how do we make a water plane? I have this function but it seems to add random force to the object and doesn't look anything like buoyancy forces:
I first try making a box with a more regular aspect ratio. see if you can get I stable first and them start change the dimensions gradually.
essentially the alchemies buoyancy force is a function of the volume under the plane a shape with a very skew volume lead to a very stiff volume rate of change.
you can adjust it with damping, to a certain limit, beyond that the only thong that can make stable is a higher frequency update so the volume become a more smooth function.
If you can run the SDK demo, try to place one of the boxes with the same shape size, make I can see how to adjust it to be more stable.
I didn't really notice any effect with fluid viscosity. Shouldn't the viscosity of the water cause a huge amount of damping? Right now it just looks like it's been dropped a vertical wind tunnel:
after I changed the function to operate on shapes rather than on a rigid body, the viscosity is not longer used. That was delegate to the end application
For realistic calculation the effect for the fluid viscosity on the body, the velocity must be known, and realistic viscose effects is a trivial calculation because viscosity act like a non linear thing on objects, It is like fly lift forces calculation, you can do a trivial calculation ot you can do a surface integration. You can however fake it very easy, in you function you can do something like this.
dVector force (accelPerUnitMass.Scale (mass)); dVector torque (torquePerUnitMass.Scale (mass));
// here this is show it was done before in 1.5 and 2.xx dVector omega; NewtonBodyGetOmega(visitor, &omega[0]); omega = omega.Scale (viscosity); NewtonBodySetOmega(visitor, &omega[0]);