We've been using btAxisSweep for some time and we've had great results that were always consistent when rerunning sims. Recently we switched to using btDbvtBroadphase and I notice that the results are always different from sim to sim.
Before digging deep into the code I'm curious if anyone else has noticed this? If not, is there something about initialization that I'm not doing? Basically I'm just allocating a btDbvtBroadphase object in place of my previous btAxisSweep3/bt32BitAxisSweep3 object.
btDbvtBroadphase nondeterministic?
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: btDbvtBroadphase nondeterministic?
We recently solved this issue: http://code.google.com/p/bullet/issues/ ... &start=100
Can you try to use the latest Bullet SVN trunk, and see if it solves your issue?
You can find all steps for deterministic/reproducable results in Bullet/Demos/OpenGL/DemoApplication/DemoApplication.cpp, method
Please make sure to call the new broadphase 'resetPool(btDispatcher* dispatcher);' method, constraint solver reset, and remove and re-add all objects to the world.
Hope this helps,
Erwin
Can you try to use the latest Bullet SVN trunk, and see if it solves your issue?
You can find all steps for deterministic/reproducable results in Bullet/Demos/OpenGL/DemoApplication/DemoApplication.cpp, method
Code: Select all
void DemoApplication::clientResetScene()
Hope this helps,
Erwin
-
- Posts: 7
- Joined: Wed Jun 13, 2007 6:14 pm
Re: btDbvtBroadphase nondeterministic?
Thanks for the reply Erwin. There is a comment in the log:
I be passing in a btSortedOverlappingPairCache at allocation instead?
In svn the btDbvtBroadphase is using a btHashedOverlappingPairCache by default. ShouldDid some investigation into why btDbvtBroadphase is not deterministic. When using
btSortedOverlappingBroadphase, it is deterministic now, with those fixes.
I be passing in a btSortedOverlappingPairCache at allocation instead?
-
- Posts: 3
- Joined: Thu Oct 29, 2009 8:46 am
Re: btDbvtBroadphase nondeterministic?
I just got this exact same problem... If i don't use ray tracing in btAxisSweep3, it stays deterministic...
I have also included a call to m_raycastAccelerator->resetPool(dispatcher) in resetPool() but didn't fix it...
What should I be doing? Using a btSortedOverlappingPairCache instead of the default hashed version? I looked at the demon and none seem to be using btSortedOverlappingPairCache so I was wondering how you were testing for determinism...
Cheers...
I have also included a call to m_raycastAccelerator->resetPool(dispatcher) in resetPool() but didn't fix it...
What should I be doing? Using a btSortedOverlappingPairCache instead of the default hashed version? I looked at the demon and none seem to be using btSortedOverlappingPairCache so I was wondering how you were testing for determinism...
Cheers...
-
- Posts: 3
- Joined: Thu Oct 29, 2009 8:46 am
Re: btDbvtBroadphase nondeterministic?
sorry its my stuff that is not deterministic...