lianlab / bullet

Automatically exported from code.google.com/p/bullet
0 stars 0 forks source link

Make btDbvtBroadphase deterministic and improve performance to remove batch of objects #188

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create and run a simulation
2. reset the objects to their original state, add/remove them from the 
world
3. restart the simulation

Restarting the simulation should produce the same results as running the 
first time. There is some data that is not properly reset to the original 
state, fix this.

Original issue reported on code.google.com by erwin.coumans on 6 Feb 2009 at 7:00

GoogleCodeExporter commented 9 years ago

When restarting a simulation, to be deterministic, all objects need to be 
removed 
from the dynamics world, and re-added.

This takes too much time, so speed up cleanProxyFromPairs and/or destroyProxy 
(batch 
version).

Original comment by erwin.coumans on 6 Feb 2009 at 8:06

GoogleCodeExporter commented 9 years ago

Did some investigation into why btDbvtBroadphase is not deterministic. When 
using 
btSortedOverlappingBroadphase, it is deterministic now, with those fixes.

http://code.google.com/p/bullet/source/detail?r=1617

More work needs to be done to make it deterministic when using 
btHashedOverlappingPairCache.

Original comment by erwin.coumans on 10 Feb 2009 at 3:52

GoogleCodeExporter commented 9 years ago
The bug fix in btSortedOverlappingPairCache::removeOverlappingPair looks 
important, for more than just determinism.  Any reason not to apply it even 
though the rest of the patch needs more implementation?

I'm referring to:
- m_overlappingPairArray.swap(findIndex,m_overlappingPairArray.capacity()-1);
+ m_overlappingPairArray.swap(findIndex,m_overlappingPairArray.size()-1);

Also, is this patch necessary for determinism even if all objects are removed 
from the world between simulation runs?  Or is it only necessary if objects are 
retained between runs?

Original comment by paul.dubois@gmail.com on 14 Jun 2010 at 8:53

GoogleCodeExporter commented 9 years ago

Original comment by erwin.coumans on 9 Jun 2011 at 7:31