Bullet 2.71 Dynamica Maya Plugin crash on 'dRigidBodyArray'

Physics APIs, Physics file formats, Maya, Max, XSI, Cinema 4D, Lightwave, Blender, thinkingParticles™ and other simulation tools, exporters and importers
RBD
Posts: 141
Joined: Tue Sep 16, 2008 11:31 am

Re: Bullet 2.71 Dynamica Maya Plugin crash on 'dRigidBodyArray'

Post by RBD »

Thanks Nicola, that's great!

BTW there is a thread over at the CGSociety forums (CGTalk): Disney's Dynamica plugin for Bullet Physics.

Cheers.

Edit: a question Nicola: Appears dRigidBodyArrayShape.position[n] and .rotation[n] do not return current position/orientation of array items? Is there a reason for this, or is it a bug? Would be great to know where a RigidBodyArrayShape item is located; would enable us to set initialPosition[n] after a simulation run has positioned them in a desired rest state (simple loop script to read position[n] and write initialPosition[n]). Also, it would allow us to place objects/instances/particles in position and to bake. I realize the export to .pdb file option is there, but it would be great to access that data directly from within Maya. Thanks again!
Nicola Candussi
Posts: 5
Joined: Mon Sep 08, 2008 8:24 pm

Re: Bullet 2.71 Dynamica Maya Plugin crash on 'dRigidBodyArray'

Post by Nicola Candussi »

Ok, now during the simulation, position[n] and rotation[n] should contain the state of the rigid bodies.
RBD
Posts: 141
Joined: Tue Sep 16, 2008 11:31 am

Re: Bullet 2.71 Dynamica Maya Plugin crash on 'dRigidBodyArray'

Post by RBD »

Ok Nicola, thanks! I'll try to get the latest changes compiled and try it out.

Edit: Hi Nicola. I downloaded the latest trunk (rev. 1316) and compiled it. I noticed there have been some changes, but the dRigidBodyArrayShape's position and rotation arrays still appear to return 0 0 0 regardless. Of course... I could be doing something wrong...
Nicola Candussi
Posts: 5
Joined: Mon Sep 08, 2008 8:24 pm

Re: Bullet 2.71 Dynamica Maya Plugin crash on 'dRigidBodyArray'

Post by Nicola Candussi »

Just committed the changes, revision 1322.
RBD
Posts: 141
Joined: Tue Sep 16, 2008 11:31 am

Re: Bullet 2.71 Dynamica Maya Plugin crash on 'dRigidBodyArray'

Post by RBD »

Excellent Nicola, that opens up a bunch of possibilities for scripting/baking rbArrays within Maya! :D

For a moment I didn't think it was working because on frame 1 the positions and rotations were still reported as 0. I noticed a simulation step needs to be run before positions and rotations are populated. Also, when the scene is rewinded the values don't change (they remain at their last value). I guess I'll just have to assume that if we are on the first frame, to use initialPosition and initialRotation... or... how difficult would it be to have them populated at the first frame as well? :)

Thanks Nicola, much appreciated.

Edit: BTW, there appears to be a 4K maximum for rigid bodies? (on my Windows 32-bit with Maya 2008 anyhow; and it doesn't appear to be a RAM / PC resources issue)... I can create up to around 4000 rigid bodies and everything is fine, but if I hit 4096, then Maya crashes. For example, if I create a sphere array of 16x16x16, then Maya crashes. Perhaps, if there is an internal limit, it should be caught.
RBD
Posts: 141
Joined: Tue Sep 16, 2008 11:31 am

Re: Bullet 2.71 Dynamica Maya Plugin crash on 'dRigidBodyArray'

Post by RBD »

RBD wrote:[...]to have them populated at the first frame as well?[...]
Thanks Nicola, I noticed it's been fixed... that's great!
I'm going to start writing some Dynamica utility scripts now...
Cheers.