RBD Tools for Dynamica (Bullet for Maya) = utils, bake, etc.
Posted: Thu Sep 25, 2008 1:09 pm
Hi, I'm writing some tools and utilities for Dynamica (Bullet for Maya). I was hoping to have more done by now, but I have to leave for a couple of weeks, so I'm putting up (attached below) some of them right now, as a preview, and for possible feedback…
These will be assembled with a menu when I'm done, but for now, simply extract the MEL files from the attachment, and source them in Maya to try them out (Window > General Editors > Script Editor (or icon at bottom right of Maya); File > Source Script). They all have a UI, so just running them won't perform any actions until you choose an option.
Included right now in this preview:
Set To Initial
Cheers.
(UPDATED! See below)
These will be assembled with a menu when I'm done, but for now, simply extract the MEL files from the attachment, and source them in Maya to try them out (Window > General Editors > Script Editor (or icon at bottom right of Maya); File > Source Script). They all have a UI, so just running them won't perform any actions until you choose an option.
Included right now in this preview:
Set To Initial
- Let's say you want your scene to start with a bunch of rigid bodies in a container. You could build the container, create rigid bodies (individual or arrays) above it, then run the simulation until all of the rigid bodies come to rest inside your container. At this point you can use Set To Initial and all of the rigid bodies' current positions and orientations will become their start / initial positions and orientations. This was made possible by a recent change Nicola made to expose rigid body array positions and rotations.
- This one's a toy. Create a curve (try a NURS circle, or draw one using the EP tool) on the Maya grid (X-Z plane), then use Bricks on Cruve. Select a brick size, and a brick wall height (try the defaults at first), and a wall of Dynamica rigid body bricks will be built on the curve. Don't go crazy with big curves, small bricks and tall walls because you'll quickly end up with thousands of rigid bodies and could crash Maya.
- A simple utility to toggle visibility of Dynamica rigid body collision shapes. Useful if you have your own geometry attached as a child and / or you don't want to see the Dynamica collision shape as well.
- Bake Dynamica rigid bodies for rendering / editing. This bake will only work with Dynamica primitives for now (spheres, cubes, planes). I'm working on the mesh bake... it wasn't ready yet. Bake will create new keyframed stand-alone geometry based on the Dynamica simulation you run during the baking process. This geometry and its keyframe curves can then be edited and rendered. Using instances, you can then edit the geometry (like a bevel for the cube) of one item and it will show up on all of them. Maya 2008's new "Replace Objects" would have been perfect for this, but it throws away all keyframes!
Remember that Maya's keyframes take up a lot of memory, don't try to bake hundreds or thousands of rigid bodies for hundreds or thousands of frame, as you could run of out memory and crash Maya. (I'm working on a bake to disk cache for thousands of rigid bodies).
Cheers.
(UPDATED! See below)