mac osx maya 2009 plugin

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: mac osx maya 2009 plugin

Post by RBD »

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
Posts: 21
Joined: Fri Jul 24, 2009 10:50 am

Re: mac osx maya 2009 plugin

Post by cgbeige »

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?
cgbeige
Posts: 21
Joined: Fri Jul 24, 2009 10:50 am

Re: mac osx maya 2009 plugin

Post by cgbeige »

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?
cgbeige
Posts: 21
Joined: Fri Jul 24, 2009 10:50 am

Re: mac osx maya 2009 plugin

Post by cgbeige »

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.
cgbeige
Posts: 21
Joined: Fri Jul 24, 2009 10:50 am

Re: mac osx maya 2009 plugin

Post by cgbeige »

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.
RBD
Posts: 141
Joined: Tue Sep 16, 2008 11:31 am

Re: mac osx maya 2009 plugin

Post by RBD »

cgbeige wrote:Can someone give me a brief rundown of when I should use an array?
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: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.
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:[...]are there soft bodies available to test?
Not yet... and a bunch of other Bullet Physics features.
cgbeige wrote:and how do I go about setting up fields other than gravity?
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:is there a way to set initial velocity?
Yes, all of the initial states can be set, even for arrays. Look under the rigid body attributes.
cgbeige wrote:Error: This script requires the Dynamica plugin to be loaded
Opps, I guess the plugin name is different on the Mac. :(
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?
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: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.
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
Posts: 21
Joined: Fri Jul 24, 2009 10:50 am

Re: mac osx maya 2009 plugin

Post by cgbeige »

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?
RBD
Posts: 141
Joined: Tue Sep 16, 2008 11:31 am

Re: mac osx maya 2009 plugin

Post by RBD »

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?
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...

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.
cgbeige
Posts: 21
Joined: Fri Jul 24, 2009 10:50 am

Re: mac osx maya 2009 plugin

Post by cgbeige »

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?
cgbeige
Posts: 21
Joined: Fri Jul 24, 2009 10:50 am

Re: mac osx maya 2009 plugin

Post by cgbeige »

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: //
RBD
Posts: 141
Joined: Tue Sep 16, 2008 11:31 am

Re: mac osx maya 2009 plugin

Post by RBD »

cgbeige wrote:[...]odd vortex stuff[...]
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: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: //
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).
Last edited by RBD on Sat Jul 25, 2009 11:17 am, edited 1 time in total.
davegreenwood
Posts: 10
Joined: Wed Jul 22, 2009 5:06 pm

Re: mac osx maya 2009 plugin

Post by davegreenwood »

cgbeige wrote:I tried running the bake script but got this:

// Error: This script requires the Dynamica plugin to be loaded //
Hi,
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.
cgbeige
Posts: 21
Joined: Fri Jul 24, 2009 10:50 am

Re: mac osx maya 2009 plugin

Post by cgbeige »

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.
cgbeige
Posts: 21
Joined: Fri Jul 24, 2009 10:50 am

Re: mac osx maya 2009 plugin

Post by cgbeige »

is it normal that I have to run the sim twice to get the initial velocity to kick in (like the array layout)?
cgbeige
Posts: 21
Joined: Fri Jul 24, 2009 10:50 am

Re: mac osx maya 2009 plugin

Post by cgbeige »

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
Post Reply