Cloth in AM ~ How AM Cloth Works

Dec 3, 2003 at 2:32 PM

We will first have to familiarize ourselves with the functionality and behavior of AM Cloth. Start by creating a new model and making a simple grid. Right click on the model’s name and go down to Plug-ins>Wizards>Grid. At the dialog box, make a grid of 50×50 cm with a Step Height and Width of 10 cm. Add a bone and add all the geometry of the model to the bone. Next, open a new Action and animate the bone moving around, changing its position, orientation, whatever, and have it do so for about 40 frames. AM Cloth runs in simulation, which means that it needs something in the Action to be moving (by the way, a Choreography will do just as well, but let’s stick to Actions for now and get to the Choreographies later). It also means that editing and tweaking it with keyframes is a very difficult task, but more on that later.

As unexciting as this is, it will be invaluable to demonstrate the main feature of how Cloth is generated and behaves. Right now, the geometry should simply be flying around maintaining its original relative position to its bone. This is the simplest example of the geometry obeying the bone during animation. It is also the simplest example of geometry control through bone animation. Now let’s add some AM Cloth to see what happens.

Go to Frame 0 and go into Muscle Mode by hitting the F7 key. Drag a bounding box around the entire model to make a new group out of that. Right Click on the group and go down to the Cloth Wizard option.

Selecting the cloth wizard

In Muscle Mode of the Action, Right Click on the group to call up the Cloth Wizard.

AM has now created and applied Cloth to your model. You can see what it has done by clicking on the Dynamics Mode button, which is at the top of the interface next to Muscle and Bones Mode.

Look carefully at your model in Dynamics Mode. Things seem very similar to Muscle Mode, but what is being represented is quite different. In Muscle Mode, a CP is a little red pixel, and a spline is white line. Here in Dynamics Mode, a little red pixel is actually a Mass and every white line is a Spring that connects one Mass to another. What’s deceptive about this representation is that the Masses are in precisely the same location as a CP. If you open the Splines folder in the Action, you can see that all those CPs have been constrained to particular Masses. This is the guts of the Cloth Wizard: It creates a Mass at every CP of the group and binds the Mass to surrounding Masses via Springs. So the ultimate animation paradigm is when Masses move, the constrained CPs follow them and the Masses react to each other as they push and pull on the Springs that bind them to one another.

Dynamics mode

The Springs and Masses of Dynamics Mode.

Go back into Muscle mode. I find that for the purposes of running the simulation, Muscle or Bones mode is the fastest redraw rate making the process go a bit faster. If you scrub through the Action now, nothing has changed. The plane still moves around with the bone. This is because the simulation has not yet been run. Go back to Frame 0, and Right Click on the name of the Action and scroll down to “Simulate Spring Systems”. The animation will play and AM calculates in real time where the Cloth should go based on the parameters, objects and forces present in the Action.

You should see the plane simply fall away into oblivion. This is because the Cloth really only has one force to react to in the entire Action. If you look at the Properties of the Action, under dynamics, you should see that gravity is turned on by -100 being in the Y value (this is the default value). The other things that Cloth could react to are absent in this simple example. Most important to notice however that it doesn’t pay the slightest bit of attention to the bone movement. Whatever your bone may be doing has no impact on this animation. This is what I meant earlier by uncontrollable movement – whatever bone or muscle movement you put in has no impact whatsoever on the resulting Cloth simulation.

Here is the list of things that you can use to control the behavior of Cloth:

  • Its Mass, Spring, and collision detection settings in the Properties Panel
  • Other objects (to collide with)
  • Forces in the Action.
  • Parts of the model that are not part of the Cloth group.