Maya> animation>Reactions

Reactions

Share |

This will be a 3-part tutorial series on making objects react to other objects. This tutorial will be covering how to make a full body IK rig react with rigid body dynamics.

Set-up

If you already have a rig, you can skip this part.

Step one - We're going to use a pre-made rig that comes with Maya. On the animation menu set, go to skeleton>full body IK>get FBIK example. Select the biped example, right click and hit Import.

Setting Up The Collision Objects

In most cases you'll have skinned geometry connected to the joints. This doesn't affect the work flow in our case because we'll be using separate collision objects.

We use polygonal primitives for collision objects because they're low poly and we can edit them to the general shape of our rig.

Step one - Go to create>polygonal primitives>cube.

Step two - Use the scale and move tools to set them at the same size and position of the feet. Duplicate it (ctrl+D) and move the new one to the opposite side. If we had skinned geometry, we'd want to make this the size of the foot, but slightly larger.

click to enlarge

Step three - Now, use different primitives and sizes of primitives to create the rest of the collision objects (we used one box to make the hands; normally you'd want to make a bunch of small boxes to make the hand in more detail).

click to enlarge

Rigging The collision Objects

We;re not going to smooth bind or rigid bind the collision objects to the skeleton. This would make then ineffective in a rigid body simulation. We're going to parent each object to an appropriate joint.

Step one - Select the hip collision object and then the root joint (when parenting these collision objects, always select the collision object and then the joints; if you don't do it in this order, it will mess up the joint's connection with the rest of the skeleton). Now go to edit>parent, or hit P on your keyboard.

click to enlarge

Step two - Do the same with all the joints and collision objects, only remember that the joint that you're creating a parent of your collision object needs to be the nearest joint, not the bone (the bone is the object that spans between two joints).

click to enlarge

Now when you move your skeleton, all your collision objects should follow your skeleton.

click to enlarge

Note On Animation

I've created a simple animation of the character walking and hitting a wall of boxes (yes, I know this animation is bad, but since this isn't an animation tutorial, I don't think it's required that it looks good).

Creating The Rigid Bodies

To follow this section exactly, you'll need to download this scene file. This file contains a wall of boxes, a floor, and the animated rig. If you don't understand rigid bodies, you should read this tutorial. Link:

click to enlarge

Step one - Select the box wall and, on the dynamics menu set, got to fields>gravity. This will automatically turn these boxes into active rigid bodies and assign a gravity field to them.

Step two - Select your floor and go to soft/rigid body>create passive rigid body.

Step three - Now, select all the collision objects and go to soft/rigid body>create passive rigid body. Now, you can't just stop right here, because rigid bodies connect to the translation of an object. They will be troublesome since the objects are parented to another object. Select each one and open the attributes editor (window>attributes editor). Go to their translations tab and right click on the translation attributes that are in yellow; this means that they are connected to the rigid body solver. Right click on the attributes and go to break connection. Do this for all the attributes in yellow for all the objects.

click to enlarge

Now play your animation and you should see the rig walk into the boxes and the boxes will be pushed aside.

turbosquid
Visit The3dStudio.com
Home Tutorials About the Author Site Map
User Agreement Privacy Policy ©2015