Project 6c: Bullet - Rigid Body Simulation

Goal Learn the basics of Rigid Body simulation in Maya's Bullet System.
Resources

Another form of procedural animation is Maya's Bullet Rigid Body simulation. As the name implies, this system deals with objects that do not change in shape, as opposed to a system like nCloth that deforms the input mesh. You can think of Rigid Body simulation as a physics simulation that calculates how objects should react when they collide. This can be useful when you have too many objects to animate by hand. The Bullet settings are avaliable from any menu set, so you don't need to worry about that. Bullet also has a cloth simulation system using their "Soft Body" simulation system, but the Rigid and Soft Body systems do not overlap well, so we will stick to using just the Rigid Body simulation.

  1. You will be using the following script to set up a domino course. First, create a plane to serve as the ground. Second, create a curve using the CV Curve Tool to lay out the path of your dominoes. Paste the script into your Script Editor (Window → General Editors → Script Editor) and with the curve selected do Command → Execute. This will create a set of dominoes with the first one already falling over.

  2. The next step is to make the objects in your scene dynamic. Select the ground plane and go to Bullet → Create Passive Rigid Body → Options to make it a collidable, non-moving dynamic object. Select each domino (individually, NOT the group!) and go to Bullet → Create Active Rigid Body → Options to make them "active" dynamic objects, which can both collide with other dynamic objects and respond to force fields. There is a third type of dynamic object, "kinematic" rigid bodies, which can move, but will not be moved by other rigid bodies. We will not be using that option for this assignment.

    If you select a mesh you have applied a Rigid Body to, it should now have a bulletRigidBodyShape## associated with it, with ## replaced by a number. Going to the channel box for the mesh can show you many values you can tweak to make the simulation go as you would like, including initial velocities, impulses, torques, changes in center of mass, friction, and total mass of the object. Try tweaking these values to change how your dominoes will react to one another.

    Unfortunately, Bullet did one bit of calculation for us wrong. If you go to your first (leaning-over) domino, you should see that the Center of Mass Y and Collider Shape Offset Y are non-zero, while they are zero for all other dominoes. Manually reset these values to 0 for the leaning-over domino, or the domino will never fall over.

    Once you create a rigid body, an object called BulletSolver1 will be created in your Outliner. Click it and look at the Channel Box to see several options how you can edit the simulation. The most important one will be to make sure you have a negative Gravity Y, so that your dominoes will fall to the ground. Try adjusting some of the other fields and see what they do, but make sure to return them to their default states or your dominoes may begin to do unexpected things. Shown below are (to the left) a sample channel box you would find for your BulletSolver, and (on the right) a sample channel box you would find for one domino.

    If you ever want to reset your scene, go to Bullet → Delete Entire Bullet System and all bullet Rigid Bodies and the BulletSolver should be deleted. Also, do not ever create more than one Rigid Body for any single given mesh, or the system will react in unexpected and buggy ways. If you want to remove the Rigid Body for any given mesh, just select the mesh and go to Bullet → Remove Bullet from Selection and it will be cleared.

    Hit play and watch the dominoes fall down. Make sure the timeline is set to play every frame: Max Real-time. (IMPORTANT: Do not duplicate dominoes that are already rigid bodies, as duplicated rigid body nodes will not work. Set up all of your dominoes first, then make them rigid bodies.)

  3. Eventually you are going to want more control over the motion of your dynamic objects. A rigid body simulation is a good starting point, but there will be a lot of motion you will need to clean up. To do this, you can convert your dynamics into a set of key frames by selecting your dominoes and their Translate and Rotate channels in the channel box, then going to Edit → Keys → Bake Simulation (Options). In the options dialogue, set Channels to From Channel Box.  You will want to specify how many frames you want to bake out.

  4. After you bake the keys, there is no longer a reason to keep the rigid body information in your scene.  Delete all this Bullet information by going to Bullet → Delete Entire Bullet System.
  5. Now you can tweak the motion of the dominoes to remove the jitters.  You can do this by deleting all the key frames that occur past the point when the domino should have settled.
  6. Once you are finished tweaking your dominoes, turn in a playblast of them falling down.
Turn In You will be graded on the following: Turn the following into Collect-It on Catalyst: