Publishers of technology books, eBooks, and videos for creative people

# Animating Realistic Cloth

1. Animating Cloth
2. Soft Bodies
3. Creating a Soft-Body Cape
• Print
From the author of

## Creating a Soft-Body Cape

Soft bodies might not be great for a complex garment such as a puffy shirt or a Chanel dress, but they can be employed to create simple clothing, such as a superhero cape or a simple skirt. Here's an easy way to make a cape using soft-body dynamics in Maya.

First, model a simple cape out of a 12x12 NURBS plane. Adjust the vertices so that the cape hangs around the shoulders somewhat naturally. Be sure to model in a few natural folds and irregularities in the surface, which will help keep the cape looking natural when the simulation is run.

Next, turn the cape into a soft body. This is done by pressing the Create Soft Body button under the Bodies menu. Bring up the dialog box and make sure that Enable Goal Weights is toggled on, which will keep each particle in place relative to the others.

Add some wind to the equation. From the Fields menu, select Create Air. Move the air away from the cape and make sure that the air is blowing toward it. To make the air affect the cape, select the cape and then the air icon; pull down Connect to Field from the Connect menu.

You can run the simulation by pressing the Play button. This will cause the entire cape to blow away. This is because all the vertices are weighted the same. Obviously, we need to find some way pin the cape to the shoulders. This is done by adjusting the individual goal weights of the particles so that the ones at the shoulders are rigid and the rest flap freely.

Rewind the animation and then select the cape. From the attribute editor, go to the particle page. In the goalPP (goal Per Particle) field, right-click and pull up the Connection Editor. This allows us to adjust the goals on a per-particle basis. Change the selection mask to Components and Particles. Now select the particles that need to be pinned to the shoulders. Set the Component Value to 1, which will make the points rigid. Next, select the row of vertices just outside this area, and set their Component values to 0.9 (see Figure 3). Work your way out from the shoulders, adjusting the weights accordingly. For those with Maya Artisan, the Script Paint tool can be used to paint the weights as well.

Figure 3 Weight the vertices in the cape so that the ones near the shoulders are stiffer.

Run the animation. The cape should stay in place at the shoulders, while the rest of it flaps in the breeze (see Figure 4). You'll also probably notice that the cape is stretching quite a bit. This can be fixed by adding springs, which, as mentioned, will help maintain the volume of the cloth. Highlight the cape and, from the Bodies menu, select Create Springs. Highlight the springs from the Outliner and hide them.

Figure 4 Adding some wind will make the cape flap in the breeze.

Now the cape should flap convincingly. You can always go back and adjust the goal weights to fine-tune the behavior. To further refine the animation, you could add a gravity field and also make the body of the superhero a collision object so that the cape never goes through the body once the wind dies down. Rendering the animation should give a nice result (see Figure 5). Other simple garments, such as a skirt, could be created in a similar manner.

Figure 5 Render the final animation.

Still, for more complex garments, sophisticated cloth plug-ins are the best bet. These will certainly help make animation more life-like and convincing than ever before.