MB_dynamicaUI - an extended Dynamica toolset

Physics APIs, Physics file formats, Maya, Max, XSI, Cinema 4D, Lightwave, Blender, thinkingParticles™ and other simulation tools, exporters and importers
mBakr
Posts: 53
Joined: Thu Aug 05, 2010 5:57 pm

MB_dynamicaUI - an extended Dynamica toolset

Post by mBakr »

EDIT: revised version further down the thread

UPDATE: the latest tools have been integrated into the Dynamica source and should be available in the next build (v 2.78). Documentation will *hopefully* follow soon...

All,

Attached is an extended Dynamica toolset designed for pre-shatter (voronoi) rigid body workflows. Here's a quick summary of the extended features - Build, Activate, and Bake:

- Build: Create rigid bodies of the Hull or Mesh type from an arbitrary number of source meshes - with a user specified collision margin.
- Activate: Create complex rigid body activation effects using Axis Gradients, Radial Gradients, and 3D Textures.
- Bake: Store simulations as clean optimized keyframe sequences for the next phase of production.

The attachment below contains a mel script (MB_dynamicaUI.mel) and a text file (MB_dynamicaUI_notes.txt) with installation instructions, details, and a mini-tutorial. An advanced workflow example will be available soon.

*Special thanks to user RBD for sharing tools and info

Comments are welcome :)

Screenshot:
MB_dynamicaUI_Grab.jpg
You do not have the required permissions to view the files attached to this post.
Last edited by mBakr on Sat Nov 27, 2010 4:07 am, edited 3 times in total.
ErikJE
Posts: 8
Joined: Fri Aug 06, 2010 4:25 pm

Re: MB_dynamicaUI - an extended Dynamica toolset

Post by ErikJE »

Will try it out. Especially custom collision margin sounds nice. At the moment everything explodes very easy.
mBakr
Posts: 53
Joined: Thu Aug 05, 2010 5:57 pm

Re: MB_dynamicaUI - an extended Dynamica toolset

Post by mBakr »

dRigidBodies push away from each other within a collision margin of approx 0.04 units - if I remember correctly. Surface points that intersect within this range repel each other which can cause the (sometimes desired) exploding effect.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: MB_dynamicaUI - an extended Dynamica toolset

Post by Erwin Coumans »

mBakr wrote: Attached is an extended Dynamica toolset designed for pre-shatter (voronoi) rigid body workflows. Here's a quick summary of the extended features - Build, Activate, and Bake:
That looks great. Can we include your contribution under the ZLib license into the latest Dynamica from http://dynamica.googlecode.com?
ErikJE wrote:Will try it out. Especially custom collision margin sounds nice. At the moment everything explodes very easy.
Could you describe how things explode exactly? There is some option called 'split impulse', it could help avoiding high velocities due to penetrations. Not sure if this option has been exposed to the GUI already.
Thanks,
Erwin
mBakr
Posts: 53
Joined: Thu Aug 05, 2010 5:57 pm

Re: MB_dynamicaUI - an extended Dynamica toolset

Post by mBakr »

Erwin Coumans wrote: That looks great. Can we include your contribution under the ZLib license into the latest Dynamica from http://dynamica.googlecode.com?
Hi Erwin!

Sounds great. It could use a round or two of debugging/optimization, but it's more or less production ready. Are you looking for another contributor? - I have a few more features under development...

Thanks,
m
ErikJE
Posts: 8
Joined: Fri Aug 06, 2010 4:25 pm

Re: MB_dynamicaUI - an extended Dynamica toolset

Post by ErikJE »

Tried it out today. Works great.
Not having to deal with keyframing mass is great and also the bake works much better than the one in RBDTools. With RBDTools my objects that where keyframed as inactive with mass where not moving when simulating but started jiggling in the baked sim for some reason. Never had the time to investigate why.
mBakr
Posts: 53
Joined: Thu Aug 05, 2010 5:57 pm

Re: MB_dynamicaUI - an extended Dynamica toolset

Post by mBakr »

ErikJE wrote:Tried it out today. Works great.
Not having to deal with keyframing mass is great and also the bake works much better than the one in RBDTools. With RBDTools my objects that where keyframed as inactive with mass where not moving when simulating but started jiggling in the baked sim for some reason. Never had the time to investigate why.
Good news. Did you follow the included tutorial or build your own sim? If you continue to use it, post back with more comments!

I am currently working on a few additional features including a deactivation button (for easier resetting), dRigidBody deletion, activation tolerance, and a mesh cutting utility. oh ya, and a few bug fixes...;)
mBakr
Posts: 53
Joined: Thu Aug 05, 2010 5:57 pm

Re: MB_dynamicaUI - an extended Dynamica toolset

Post by mBakr »

mBakr wrote:
Erwin Coumans wrote: That looks great. Can we include your contribution under the ZLib license into the latest Dynamica from http://dynamica.googlecode.com?
Hi Erwin!

Sounds great. It could use a round or two of debugging/optimization, but it's more or less production ready. Are you looking for another contributor? - I have a few more features under development...

Thanks,
m
Erwin, I can submit as an enhancement issue for now via the googlecode page, unless there is another preferred method. When is the next planned release? I am building new features and fixes at the moment.
ErikJE
Posts: 8
Joined: Fri Aug 06, 2010 4:25 pm

Re: MB_dynamicaUI - an extended Dynamica toolset

Post by ErikJE »

mBakr wrote:
ErikJE wrote:Tried it out today. Works great.
Not having to deal with keyframing mass is great and also the bake works much better than the one in RBDTools. With RBDTools my objects that where keyframed as inactive with mass where not moving when simulating but started jiggling in the baked sim for some reason. Never had the time to investigate why.
Good news. Did you follow the included tutorial or build your own sim? If you continue to use it, post back with more comments!

I am currently working on a few additional features including a deactivation button (for easier resetting), dRigidBody deletion, activation tolerance, and a mesh cutting utility. oh ya, and a few bug fixes...;)
I like manuals, tutorials and references so i read it.

I am having some problems with the baking at the moment tho. When baking is done in the new scene it do not remove the rigidbodies and also not selected rigid bodies are still present. I use bake only selected objects.

Got any idea if i could be doing something wrong?

EDIT: Also it would be great if the build option worked on groups of objects. When there is like group -> objecttranssform -> object shape

EDIT2: Asking if to save old scene before opening baked scene would be a good thing also. Easy to lose changes otherwise.
mBakr
Posts: 53
Joined: Thu Aug 05, 2010 5:57 pm

Re: MB_dynamicaUI - an extended Dynamica toolset

Post by mBakr »

ErikJE wrote:
mBakr wrote:
ErikJE wrote:Tried it out today. Works great.
Not having to deal with keyframing mass is great and also the bake works much better than the one in RBDTools. With RBDTools my objects that where keyframed as inactive with mass where not moving when simulating but started jiggling in the baked sim for some reason. Never had the time to investigate why.
Good news. Did you follow the included tutorial or build your own sim? If you continue to use it, post back with more comments!

I am currently working on a few additional features including a deactivation button (for easier resetting), dRigidBody deletion, activation tolerance, and a mesh cutting utility. oh ya, and a few bug fixes...;)
I like manuals, tutorials and references so i read it.

I am having some problems with the baking at the moment tho. When baking is done in the new scene it do not remove the rigidbodies and also not selected rigid bodies are still present. I use bake only selected objects.

Got any idea if i could be doing something wrong?

EDIT: Also it would be great if the build option worked on groups of objects. When there is like group -> objecttranssform -> object shape

EDIT2: Asking if to save old scene before opening baked scene would be a good thing also. Easy to lose changes otherwise.
re: baking - Could you post the offending Maya scene here?

Interesting idea for the Build function - maybe an option to build from a group could be added.

Good idea about prompting to save old scene.

Keep em coming...
ErikJE
Posts: 8
Joined: Fri Aug 06, 2010 4:25 pm

Re: MB_dynamicaUI - an extended Dynamica toolset

Post by ErikJE »

mBakr wrote: re: baking - Could you post the offending Maya scene here?

Interesting idea for the Build function - maybe an option to build from a group could be added.

Good idea about prompting to save old scene.

Keep em coming...
Nevermind with the stuff not being removed, it is. Dont know what i was doing/thinking at that moment.

Another (non)problem i found is that the shapes after baking are not selectable through the viewport only through the outliner.

More small stuff is that if you move your rigid bodies with their group node in your scene that translate is not taken into consideration when simulating. So if you move all your fractured pieces up a bit it will think it collides with the plane above where the actual plane is.

Here is a broken elephant. http://www.youtube.com/watch?v=cTcES3eUU74&hd=1
mBakr
Posts: 53
Joined: Thu Aug 05, 2010 5:57 pm

Re: MB_dynamicaUI - an extended Dynamica toolset

Post by mBakr »

ErikJE wrote:
mBakr wrote: re: baking - Could you post the offending Maya scene here?

Interesting idea for the Build function - maybe an option to build from a group could be added.

Good idea about prompting to save old scene.

Keep em coming...
Nevermind with the stuff not being removed, it is. Dont know what i was doing/thinking at that moment.

Another (non)problem i found is that the shapes after baking are not selectable through the viewport only through the outliner.

More small stuff is that if you move your rigid bodies with their group node in your scene that translate is not taken into consideration when simulating. So if you move all your fractured pieces up a bit it will think it collides with the plane above where the actual plane is.

Here is a broken elephant. http://www.youtube.com/watch?v=cTcES3eUU74&hd=1
Post baking shapes remain on the display layer DynamicaMeshes - which is set to Reference mode - and are thus not selectable in the viewport. Baked dRBs should probably be moved to a new layer - "DynamicaBaked" perhaps...

transforming the group node will indeed break the sim - and many other types of transform hierarchies. The group is an organizational device - meant to keep the outliner clean.

nice elephant!

I implemented a fix to the baking issue - re not saving current scene...but it's not right yet. A new version will be available soon - perhaps tomorrow...
tkdmatt
Posts: 2
Joined: Tue Sep 07, 2010 2:50 am

Re: MB_dynamicaUI - an extended Dynamica toolset

Post by tkdmatt »

Hi mBakr, really liking the toolset. I couldn't get it to work for a while, I found the rbds would snap to the origin, and I had this problem with the rbdtools too.

I found it was because I set production scenes to 25fps (I'm in a PAL region), if I set it back to 24fps it's fine, and this is a viable workaround for now. Is it possible for you to look into this?

Matt
mBakr
Posts: 53
Joined: Thu Aug 05, 2010 5:57 pm

Re: MB_dynamicaUI - an extended Dynamica toolset

Post by mBakr »

tkdmatt wrote:Hi mBakr, really liking the toolset. I couldn't get it to work for a while, I found the rbds would snap to the origin, and I had this problem with the rbdtools too.

I found it was because I set production scenes to 25fps (I'm in a PAL region), if I set it back to 24fps it's fine, and this is a viable workaround for now. Is it possible for you to look into this?

Matt
Could be something at the plugin level - not sure why framerate would affect anything. The source meshes are snapped to the origin before each dRB is assigned, and then transformed back to their original locations. This is a limitation within the plugin for which the tools compensate (when they work properly).

I will test various framerates and report back...

Glad you like the toolset, check the next post for an update.
mBakr
Posts: 53
Joined: Thu Aug 05, 2010 5:57 pm

Re: MB_dynamicaUI - an extended Dynamica toolset

Post by mBakr »

UPDATE: Bake was broken, download MB_dynamicaUI.0.9.2a.zip to fix the problem. It is attached below.

MB_dynamicaUI v0.9.2:

attached is an updated version of the toolset. It includes a reworked bake function which allows the current scene to be saved before baking, and an option to overwrite previously baked scenes (which supports iterative processing - saving memory usage etc.). A Deactivate Dynamica Rigid Bodies button is now present under the Activate tab - it will set the activateFrame to 0 - effectively disabling activation - useful if you need to "reset" the sim. It also includes a new tool: PolyCutter. PolyCutter cuts polygon meshes along a NURBS surface - you can draw a curve along a desired fault line, loft it, and run PolyCutter to slice the meshes along the NURBS surface.

Screenie:
MB_dynamicaUI_Grab2.jpg
PolyCutter results:
MB_dynamicaUI_Grab2a.jpg
You do not have the required permissions to view the files attached to this post.