Rigid-Body Dynamics


For both rigid and soft bodies, you can connect dynamic properties to geometry. Define an object as a rigid body when you want it to collide with another object without yielding; if you want your object to behave with flexibility or elasticity, make it a soft body.

By using Maya's rigid-body dynamics, you can simulate what occurs when one or more objects collide.

Imagine trying to animate a bowling ball crashing into 10 pins at the end of the alleyit would take a lot of time and talent to make that action appear realistic. Maya solves this problem by letting you define objects that you want to interact with (or hit) each other; Maya can then simulate what happens when they make contact (Figure 18.31).

Figure 18.31. A rendering from a rigid-body simulation. The ball collides with the pins, which in turn collide with the back wall, floor, and each other.


You can create active rigid bodies, which react to collisions and fields (Gravity, Air, and so on), or you can create passive rigid bodies, which are unaffected by collisions or fields. You use passive rigid bodies for things like floors and wallsbasically, any unmovable object.

To create a rigid-body simulation:

1.

Create a NURBS sphere.

2.

Translate the sphere in the positive Y direction.

3.

Create a NURBS plane and scale it up to create the floor (Figure 18.32).

Figure 18.32. A plane is used as a rigid surface for the ball to bounce off of.


4.

Select the sphere.

5.

From the Soft/Rigid Bodies menu, select Create Active Rigid Body (Figure 18.33).

Figure 18.33. From the Soft/Rigid Bodies menu, select Create Active Rigid Body.


6.

Select the plane.

7.

From the Soft/Rigid Bodies menu, select Create Passive Rigid Body.

8.

Select the sphere.

9.

From the Fields menu, select Gravity.

This attaches a Gravity field to the sphere to make it fall to the ground.

10.

Play back the animation to see the result (Figure 18.34).

Figure 18.34. A rigid sphere bouncing off a slightly rotated plane (to make the motion more visible).




    Maya for Windows and Macintosh
    MAYA for Windows and MacIntosh
    ISBN: B002W9GND0
    EAN: N/A
    Year: 2004
    Pages: 147
    Authors: Danny Riddell

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net