mac osx maya 2009 plugin
-
- Posts: 141
- Joined: Tue Sep 16, 2008 11:31 am
Re: mac osx maya 2009 plugin
The missing ".ac" attribute was an old "Active" rigid body attribute (that Nicola removed to aleviate the code I guess). Now Dynamica simply checks if mass > 0, then the rb is considered active (which is what bullet considers to determine if an object is active).
cgbeige: Yes, always favor hull over mesh, and primitives foremost; mesh are the slowest and least reliable collision shapes in Dynamica. Also, consider the scale of your objects, Dynamica treats Maya units as meters (regardless of your Maya settings). Bullet is optimized for meter sized objects, it's best to work with larger scale objects.
In your tests it appears the center of mass is way off on your objects. Center of mass is determined by the pivot point, the object's untransformed center. Try using the RBDTools dynamicaHullMeshForEasyBake.mel scripts (in the other thread) to create your poly based rigid bodies, it might help.
cgbeige: Yes, always favor hull over mesh, and primitives foremost; mesh are the slowest and least reliable collision shapes in Dynamica. Also, consider the scale of your objects, Dynamica treats Maya units as meters (regardless of your Maya settings). Bullet is optimized for meter sized objects, it's best to work with larger scale objects.
In your tests it appears the center of mass is way off on your objects. Center of mass is determined by the pivot point, the object's untransformed center. Try using the RBDTools dynamicaHullMeshForEasyBake.mel scripts (in the other thread) to create your poly based rigid bodies, it might help.
-
- Posts: 21
- Joined: Fri Jul 24, 2009 10:50 am
Re: mac osx maya 2009 plugin
ok - I've give that a try later and scale everything up and pay attention to the centres and report back later.
Can someone give me a brief rundown of when I should use an array?
Can someone give me a brief rundown of when I should use an array?
-
- Posts: 21
- Joined: Fri Jul 24, 2009 10:50 am
Re: mac osx maya 2009 plugin
just a note that arrays spawn objects directly on top of each other and then have to be rewound and played back again to show up correctly at frame 1. Also, I opened a saved file and it couldn't get back to the initial state that it was set up with when I saved the file.
are there soft bodies available to test?
and how do I go about setting up fields other than gravity?
is there a way to set initial velocity?
are there soft bodies available to test?
and how do I go about setting up fields other than gravity?
is there a way to set initial velocity?
-
- Posts: 21
- Joined: Fri Jul 24, 2009 10:50 am
Re: mac osx maya 2009 plugin
I tried running the bake script but got this:
// Error: This script requires the Dynamica plugin to be loaded //
so I commented out the beginning bit but then got this:
// Error: Current selection doesn't match required selection type. //
I'm assuming I have to run this before I turn the objects into dynamica RBs? Is there a way to change objects back to meshes so I can run this script?
anyway, I reloaded the voronoi meshes and ran the script but it shrank my objects and rotated them despite me having cleared the object history and froze transformations. And even then, they do that wonky vortex-ish movement if I play the sim through.
// Error: This script requires the Dynamica plugin to be loaded //
so I commented out the beginning bit but then got this:
// Error: Current selection doesn't match required selection type. //
I'm assuming I have to run this before I turn the objects into dynamica RBs? Is there a way to change objects back to meshes so I can run this script?
anyway, I reloaded the voronoi meshes and ran the script but it shrank my objects and rotated them despite me having cleared the object history and froze transformations. And even then, they do that wonky vortex-ish movement if I play the sim through.
-
- Posts: 21
- Joined: Fri Jul 24, 2009 10:50 am
Re: mac osx maya 2009 plugin
here's a sample:
http://www.3eige.com/cgtalk/voronoibullet3.mov
that's with Hull selected from the Bake meshes script. Everything else looks good.
http://www.3eige.com/cgtalk/voronoibullet3.mov
that's with Hull selected from the Bake meshes script. Everything else looks good.
-
- Posts: 141
- Joined: Tue Sep 16, 2008 11:31 am
Re: mac osx maya 2009 plugin
When you want a bunch of the same objects (like that styrofoam peanuts scene in Disney's Bolt). Or see my "Bricks On Curve" script in RBDTools. You can also create an array, drop them in a container, then use my dynamicaSetToInitial.mel script to set that as their new start positions.cgbeige wrote:Can someone give me a brief rundown of when I should use an array?
Yes, it's always a good idea to rewind to reset Dynamica after adding or changing rigid bodies. I think I also observed and reported the problem with saving.cgbeige wrote:just a note that arrays spawn objects directly on top of each other and then have to be rewound and played back again to show up correctly at frame 1. Also, I opened a saved file and it couldn't get back to the initial state that it was set up with when I saved the file.
Not yet... and a bunch of other Bullet Physics features.cgbeige wrote:[...]are there soft bodies available to test?
You can add any Maya force field in the scene, you don't need to attach them, Dynamica rigid bodies will automatically be affected.cgbeige wrote:and how do I go about setting up fields other than gravity?
Yes, all of the initial states can be set, even for arrays. Look under the rigid body attributes.cgbeige wrote:is there a way to set initial velocity?
Opps, I guess the plugin name is different on the Mac.cgbeige wrote:Error: This script requires the Dynamica plugin to be loaded

Yes, and no, Dynamica's own hull and mesh are a one way street, that's one of the reasons I wrote the script.cgbeige wrote:I'm assuming I have to run this before I turn the objects into dynamica RBs? Is there a way to change objects back to meshes so I can run this script?

I'll have to see how I can recreate that, must be some existing transformations somewhere. I assume you centered the pivots? (Edit: Ok, figured it out, your object might have been under a group with transforms at some point, funny cause I had commented out that part in the script, I'll fix it. Thanks.)cgbeige wrote:it shrank my objects and rotated them despite me having cleared the object history and froze transformations. And even then, they do that wonky vortex-ish movement if I play the sim through.
-
- Posts: 21
- Joined: Fri Jul 24, 2009 10:50 am
Re: mac osx maya 2009 plugin
k - let me know when you have a revised script to try out that doesn't affect scaling.
As far as workflow goes, I don't know what people usually do for working scenes. I'm assuming that you create duplicates of your working meshes and parent your textured meshes to the Bullet dynamics meshes and then use your script to bake the animation?
With the arrays - can the meshes be the same but with a different rotation in their initial state?
As far as workflow goes, I don't know what people usually do for working scenes. I'm assuming that you create duplicates of your working meshes and parent your textured meshes to the Bullet dynamics meshes and then use your script to bake the animation?
With the arrays - can the meshes be the same but with a different rotation in their initial state?
-
- Posts: 141
- Joined: Tue Sep 16, 2008 11:31 am
Re: mac osx maya 2009 plugin
I updated the script to automatically unparent (Dynamica does not like children; I had commented out the parent to world command and forgot to reactivate it). Oh, and I changed the plugin name error to a warning...cgbeige wrote:k - let me know when you have a revised script to try out that doesn't affect scaling.
As far as workflow goes, I don't know what people usually do for working scenes. I'm assuming that you create duplicates of your working meshes and parent your textured meshes to the Bullet dynamics meshes and then use your script to bake the animation?
With the arrays - can the meshes be the same but with a different rotation in their initial state?
The dynamicaHullMeshForEasyBake.mel script (used to create hull and mesh Dynamica rigid bodies) will take care of carrying your textured mesh forward with the rigid body for you, that's part of its purpose. Then you use the separate dynamicaBake.mel script to bake.
With the arrays... yes, like I wrote before, just check it out for yourself, look at the rigidbody node, under "initial configuration", you'll find all of the initial states there, including rotation settings for every array member.
Last edited by RBD on Sat Jul 25, 2009 3:53 am, edited 1 time in total.
-
- Posts: 21
- Joined: Fri Jul 24, 2009 10:50 am
Re: mac osx maya 2009 plugin
great. so the only major problem I see right now is the annoying array spawning and odd vortex stuff. Is the latter something I'm doing still?
-
- Posts: 21
- Joined: Fri Jul 24, 2009 10:50 am
Re: mac osx maya 2009 plugin
I'm getting an error with the bake sim script. When I try and run it now, the basic dynamica objects are created at their default position (they were moved for the sim) and then there is this error:
// Error: No object matches name: //
// Error: No object matches name: //
-
- Posts: 141
- Joined: Tue Sep 16, 2008 11:31 am
Re: mac osx maya 2009 plugin
Still looks like a pivot issue, center of mass being off. Not something you're specifically doing, just that Dynamica / Bullet work with standard world space untransformed rigid bodies. But try creating new hull rigid bodies using the updated dynamicaHullMeshForEasyBake.mel script, it should fix that problem.cgbeige wrote:[...]odd vortex stuff[...]
Sorry I'm not following... by basic dynamica objects, do you mean primitives? Perhaps some detailed steps to re-create the problem? But I suspect perhaps you are trying to bake hull / mesh objects that weren't created with the dynamicaHullMeshForEasyBake.mel script. (But I also note that you haven't downloaded the updated script yet).cgbeige wrote:I'm getting an error with the bake sim script. When I try and run it now, the basic dynamica objects are created at their default position (they were moved for the sim) and then there is this error:
// Error: No object matches name: //
Last edited by RBD on Sat Jul 25, 2009 11:17 am, edited 1 time in total.
-
- Posts: 10
- Joined: Wed Jul 22, 2009 5:06 pm
Re: mac osx maya 2009 plugin
Hi,cgbeige wrote:I tried running the bake script but got this:
// Error: This script requires the Dynamica plugin to be loaded //
Just rename the plugin to match the script, don't change the mel.
BulletMayaPlugin.bundle
BTW the scripts work great, I particularly like the bricks on curve

Dave.
-
- Posts: 21
- Joined: Fri Jul 24, 2009 10:50 am
Re: mac osx maya 2009 plugin
hey - Is there a way to get the plug-in from overwriting the shelf every time it's loaded? I add the scripts and they're gone when I start Maya and load Bullet again.
edit: scratch that. It's fine - I think it was just because I was always crashing Maya while tooling around with Bullet and it wasn't saving the shelf on exit.
edit: scratch that. It's fine - I think it was just because I was always crashing Maya while tooling around with Bullet and it wasn't saving the shelf on exit.
-
- Posts: 21
- Joined: Fri Jul 24, 2009 10:50 am
Re: mac osx maya 2009 plugin
is it normal that I have to run the sim twice to get the initial velocity to kick in (like the array layout)?
-
- Posts: 21
- Joined: Fri Jul 24, 2009 10:50 am
Re: mac osx maya 2009 plugin
sorry if this is covered somewhere else in the forum but I can't wrap my head around how the hinge is supposed to be set up. I am getting some crazy behaviour with a hull mesh and a hinge