So getting straight to my point, i did expect some lower, or the possibility of lower accuracy of multi-simulated physics. But just to cover my implementation/experience here, i can be certain that i haven't missed something.
There is only one difference i can see compared to the "sequential" implementation, and that is that each object are quite more bouncier.
Just to illustrate the subjective experience rather than the mathematical experience i added 2 screenshots. The non multi-threaded version broke and fell apart, rather than explode upwards.
Both simulations , started by having the cluster of "boxes" , 50 units (positive Y axis), mass set to 1, gravity around -10. Both simulation behaved the same, even when they hit the ground, but multi threaded had this bounce effect so it threw the boxes perhaps 25 points on the Y axis up in the air again.
just a few snippets of my bullet code, but its pretty much same as the sample (except quite a few more objects)
Code: Select all
m_btRigidBody->setContactProcessingThreshold(btScalar(BT_LARGE_FLOAT));
Code: Select all
bool isDynamic = (m_mass != 0.f);
btVector3 localInertia(0,0,0);
if (isDynamic)
m_btBoxShape->calculateLocalInertia(m_mass, localInertia);
Code: Select all
m_btBroadphaseInterface = new bt32BitAxisSweep3(worldAabbMin,worldAabbMax,maxProxies);
Could be that this is "normal" for this engine, then i can tweak per object values (friction, mass etc), just thought it was a bit odd.