Maya \bullet Simulation problem, sliding geo

Physics APIs, Physics file formats, Maya, Max, XSI, Cinema 4D, Lightwave, Blender, thinkingParticles™ and other simulation tools, exporters and importers
ASW187
Posts: 5
Joined: Thu Mar 25, 2010 7:13 pm

Maya \bullet Simulation problem, sliding geo

Post by ASW187 »

I'm fairly new to bullet and I've hit my first major stumbling block.

I'm creating a VFX shot in Maya 2008 using the bullet plugin. The shot is of a shattering Vase, I used a Voronoi Shatter to pre brake the geo, then I created an active rigid body mesh out of the individual fragments and a passive rigid cube for ground collision, but the rigid bodies are not behaving in a realistic manner. When the dynamic mesh object hit the passive collision object, it jerks around and begin sliding. Here is a playblast of the offending sim

http://www.anguswakefield.com/Data/VASE ... erTest.avi

I've attached what mayas default rigid body produces with the same object, which looks good, the problem being if I try to run all the 95 pieces mayas rigid body crashes every time

http://www.anguswakefield.com/Data/VASE ... arigid.avi

I'm thinking it might because the object are concave/convex demanding on what side your looking at, I've run successful sims using arrays and more conventional boxy shapes, but I cant for the life of me get this to to simulate properly. Any suggestion or tips would be greatly appreciated. Thanks alot for your help in advance.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Maya \bullet Simulation problem, sliding geo

Post by Erwin Coumans »

It looks like the center of mass is not properly computed (it needs to be at the center of the body, possibly using a btCompoundShape to shift the transform)

Are you using the Maya Dynamica plugin? Which version/platform exactly?

If so, can you please share a .ma or .mb?
Thanks,
Erwin
ASW187
Posts: 5
Joined: Thu Mar 25, 2010 7:13 pm

Re: Maya \bullet Simulation problem, sliding geo

Post by ASW187 »

Thanks so much for the quick response, I'm using Maya 2008, here is an image with my my bullet plugin settings

Image

and here's a link to my maya file

http://www.anguswakefield.com/Data/VASE ... terTesr.ma

Thanks so much for your help
ASW187
Posts: 5
Joined: Thu Mar 25, 2010 7:13 pm

Re: Maya \bullet Simulation problem, sliding geo

Post by ASW187 »

How do you use btCompoundShape to move the COM of the rigid bodies??
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Maya \bullet Simulation problem, sliding geo

Post by Erwin Coumans »

We need to make some fixes in our Dynamica plugin to automatically adjust for this.

There is some manual fix you can try, until we fixed the issue in Dynamica:
You need to make sure that the center of the object transform is at the center of the vertices/mesh part.
If you do 'center pivot' the transform is in the local center, but if you do 'reset transforms' it switched back to the world origin.
You can shift the vertices in such a way that the 'reset transform' becomes the same as the center pivot.

Is there some option to do this automatically in Maya (I'm not too familiar with all the options)?
Thanks,
Erwin
ASW187
Posts: 5
Joined: Thu Mar 25, 2010 7:13 pm

Re: Maya \bullet Simulation problem, sliding geo

Post by ASW187 »

I used your dynamicaHullMeshForEasyBake.mel and it seem to work much better, providing a much more accurate sim, the problem now is that when I rewind the sim everything shoots to world Zero? Any suggestions?Thanks a bunch
ASW187
Posts: 5
Joined: Thu Mar 25, 2010 7:13 pm

Re: Maya \bullet Simulation problem, sliding geo

Post by ASW187 »

The center pivot, move object to world zero, freeze transformation, then snap back the frozen object to it original position solution worked perfectly, it simulates exactly as expected, but without the the collapse to world Zero issue on the rewind I get with the dynamicaHullMeshForEasyBake.mel. I'm going to right a script that does this procedure automatically, as its a bit of a pain in the ass to do it manually. I'll post the script up when its done, thanks so much for your help.
muchmeck
Posts: 2
Joined: Tue Apr 13, 2010 3:28 pm

Re: Maya \bullet Simulation problem, sliding geo

Post by muchmeck »

Hi, been using bullet now for some days and is starting to get the hang of things but I enqounterd the same problem as you did ASW187 so my question is how did it go with the script for not pushing everything to the origin and crash my little maya machine. would love that script.

I would probably be able to do it my self if I just understood what you did. you kind of lost me at snap back the frozen object. :cry:
happymat27
Posts: 4
Joined: Sat Apr 10, 2010 7:57 pm

Re: Maya \bullet Simulation problem, sliding geo

Post by happymat27 »

Muchmeck,

I'm also new to Bullet for Maya and have found that Using the Set To Initial script in the RBD tools before you hit rewind for the first time after running the Easy Bake will stop the pieces from snapping to the origin.

Hope that helps,

Mat :)
muchmeck
Posts: 2
Joined: Tue Apr 13, 2010 3:28 pm

Re: Maya \bullet Simulation problem, sliding geo

Post by muchmeck »

happymat27,

I tried that way now and it no longer snaps to origin, but now completely blows away after one frame so on frame 2 some pieces is in around the 10000th of digit in space and they are not that big as a hole object....