Soft-Body Dynamics


Unlike rigid bodies, Maya's soft bodies have elasticity. Each CV, or vertex, has an associated particle, which can be affected by other dynamics (such as fields) or by particle collisions, thereby deforming the object (Figure 18.35).

Figure 18.35. An Air field pushing part of a soft-body plane down in the negative Y direction.


With particles affecting the surface, we can make flags wave in the wind, gelatin cubes wiggle when they hit the ground, or a belly jiggle as a character walks.

Soft bodies can also use non-soft objects as goal shapes. A goal shape represents a target shape for the soft body to settle into. The particles affecting the soft body are attracted to the CVs, or vertices, of the goal objectalmost as if they were attached by springs. This means that you can animate the original geometry, and the soft body will lag behind it, overshooting the original geometry before finally settling into that shape. An overweight man with a double chin that jiggles and lags behind the chin bone's movement is one example of this.

To create a soft body:

1.

Create a NURBS sphere.

In the timeline at frame 1, set a keyframe on the sphere by pressing .

2.

Move to frame 40 in the timeline.

3.

Translate the sphere 10 units in the negative Y direction (Figure 18.36). Set another keyframe by pressing .

Figure 18.36. Setting a keyframe at frame 40 in the timeline.


4.

Move back to frame 1 and select the sphere.

5.

From the Soft/Rigid Bodies menu, select the box next to Create Soft Body to open the options.

6.

From the pop-up menu, select Duplicate, Make Copy Soft.

7.

Check the boxes next to Hide Non-Soft Object and Make Non-Soft a Goal (Figure 18.37).

Figure 18.37. The options for creating a soft body.


This will duplicate and hide the original geometry and make the duplicate a soft body. The goal then will be the original animated geometry that is hidden.

8.

Click Create.

If you play back the animation now, the soft body will simply follow the original animation of the sphere. This is because the goal weights on the soft body are all set to 1.

Goal weights can be adjusted, even painted, on a soft body so that you can get just the right amount of movement from your object. In the next task, we'll make the top of the sphere lag behind and wiggle as the sphere stops.

To adjust goal weights for a soft body:

1.

Select the soft-body sphere.

2.

From the Soft/Rigid Bodies menu, select the box beside Paint Soft Body Weights Tool.

The Paint Attributes tool opens, and our soft body turns white (Figure 18.38).

Figure 18.38. You use the Paint Attributes tool to paint soft-body goal weights.


3.

In the Tool Settings window for the Paint Attributes tool (which looks like the Attribute Editor), click the Reset Tool button at the top right.

4.

In the Paint Attributes section, change Value to 0.5.

5.

Paint the top of the sphere by clicking and dragging.

The color on the top should turn gray (Figure 18.39).

Figure 18.39. The Paint Attributes tool lets you interactively paint weight values on your objects.


6.

Play back the animation.

You should see the top jiggle as the sphere stops at frame 40 (Figure 18.40).

Figure 18.40. As the original sphere stops at frame 40, the soft body will jiggle on the top until it comes to rest in its original shape.




    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