bullet/dynamica and deterministic results

Physics APIs, Physics file formats, Maya, Max, XSI, Cinema 4D, Lightwave, Blender, thinkingParticles™ and other simulation tools, exporters and importers
Post Reply
meeotch
Posts: 3
Joined: Tue Mar 09, 2010 9:06 pm

bullet/dynamica and deterministic results

Post by meeotch »

I've got a fairly simple file that shows a high degree of non-determinism when run. (Maya 2009-x64 on CentOS 5.4, Bullet 2.76.) It's a shattered object, with the individual pieces having initial pos/rot/vel/spin set, plus a ground plane. I didn't see an option in the solver for randomization - perhaps it's not exposed?

Is there something I'm missing? I was under the impression that Bullet was deterministic. Is there something else I need to do to reset the solver between successive runs? File is attached - run it multiple times, and watch where the pieces end up... not even remotely in the same position.
Attachments
testBullet2.tgz
(458.48 KiB) Downloaded 530 times
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: bullet/dynamica and deterministic results

Post by Erwin Coumans »

Bullet is deterministic, as long as you reset all values properly when you restart.

We don't do this at the moment in Maya Dynamica, so the simulation is different each time. I filed an issue here issue right here, so you can keep track of the progress.
Thanks a lot,
Erwin
meeotch
Posts: 3
Joined: Tue Mar 09, 2010 9:06 pm

Re: bullet/dynamica and deterministic results

Post by meeotch »

Thanks!

Obviously, this issue is a stumbling block to using Maya Dynamica in production situations, where one needs to lock in animation for approval. (You can still bake the animation, obviously - but you can't use the usual tweak-playblast-tweak cycle without also caching each iteration, then quitting & restarting when you want to tweak again... which is a bit unwieldy.)
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: bullet/dynamica and deterministic results

Post by Erwin Coumans »

It took some years before I sat down to fix the code, but Dynamica is now deterministic across different runs (just make sure to reset to the first frame every time before simulating)

It should be fixed from revision 139 onwards, http://code.google.com/p/dynamica/source/detail?r=139

Note that under Linux you can use the Extras/MayaBullet/Makefile, and for Windows you can use cmake
Thanks,
Erwin
meeotch
Posts: 3
Joined: Tue Mar 09, 2010 9:06 pm

Re: bullet/dynamica and deterministic results

Post by meeotch »

Thanks for the update! Very cool. I look forward to trying it out next time I've got a gig requiring Bullet.
Post Reply