(Fairly) Quick Lattice Deformer Walk Cycle

Our primitive Miro characters can be animated with an equally primitive walk cycle. Lattice deformers allow us to move regions of a model. If we create a lattice which has a region for each foot and a region of the upper portion of the figure, we can use this to emulate a basic cartoonish walk cycle.

Open Y:\Courses\2012-2014\AC5002_Conroy_AU2013\examples\week_9\lattice_walk_start.ma

Creating the Lattice and Clusters

Switch your Menu Set to Animation

Select fig_1_grp and open the options for

Create Deformers->Lattice

set Divisions: to 4 4 2 and apply:

cluster_group

There are 4 lattice divisions in the X and Y dimensions and 2 in the Z.

RMB click and hold over the lattice to see the lattice components. Select the only component we have, Lattice Points:

Marquee select the upper third lattice points and use:

Create Deformers->Cluster

Notice the "C" object in the workspace. In the Outliner this will be called cluster1Handle. Rename this to head_cluster.

When the head cluster is selected use the move tool to change its position. Notice the stretches the middle portion of the lattice:

Ctrl-Z to return the cluster to its original position. Add clusters to the right foot regions:

Rename to right_foot_cluster.

Repeat process with the left foot region to create a left_foot_cluster.

We should now have 3 clusters that contain all of the lattice points of the cluster.

Group these three clusters and name the group cluster_grp.

Select fig_1_grp, cluster_grp and the ffd1Lattice and ffd1Base (the objects which represent the lattice deformer) and group into a new group. Rename this walking_figure_1

 

Creating the Walk Cycle:

Basing our walk cycle on Richard William's Animators Survival Kit:

We can set the following keys to capture the height of the head.

Select the head_cluster and key

Key:

t=1 ty=0

t=3 ty=-2.5

t=7 ty=1.5

t=11 ty=-2.5

t=15= ty=1.5

t=17 ty=0

For right foot, select the right_foot_cluster and key

t=1 ty=0 tz=4

t=9 ty=0 tz=-4

t=13 ty=2.5

t=17 ty=0 tz=4

For left foot, select the left_foot_cluster and key

t=1 ty=0 tz=-4

t=5 ty=2.5

t=9 ty=0 tz=4

t=17 ty=0 tz=-4

We need to go back and adjust tangents.

Select the head_cluster and view the ty in the graph editor:

To cycle the curve infinitely, use the graph editor menu options:

View->Infinity

Curves->Pre Infinity->Cycle

Curves->Post Infinity->Cycle

Adjust the flat tangents at the start and end of the original curve to smooth:

Set pre and post infinity on the foot cluster ty and tz curves and break tangents on ty to reflect the foot meeting the ground plane:

 

Expand your range slider to 100 and test.

To make the figure move forward 16 units (8 units for each stride) we need to move the entire figure with keys at t=1 tz=0 and t=17 tz=16. But what do we key? If we key the walking_figure_1 group, we notice that the figure actually moved 32 units forward. We also notice that the cluster groups only move half of the distance as the lattice and geometry. In this case can have a double transform. A double transform occurs when we key two different influences on an object. In this case the walking_figure_1 group includes both the lattice and the clusters. We move the lattice, and then move the clusters which moves the lattice again.

To avoid this we only want to key the cluster_group, this in turn movesw the lattice which moves the geometery.

To repeat try Curves->Post Infinity->Cycle. You will notice now that the body snaps back to 0 every 16 frames. We want the movement to build on the previous values. For this we need to use Curves->Post Infinity->Cycle with Offset.

Why not make more?

Select the walking_figure_1 group, and instead of using the regular Duplicate command, open the option box for

Edit->Duplicate Special

and check the Duplicate input graph box. This will duplicate the contents of the group and maintain the key frame information.

If we move the group itself, we see the clusters will separate from the group, due to both the dependancy between cluster and the lattice. This results in a double transformation (we are moving the lattice and the cluster, which in turn adds an additional move to the lattice).

Instead, open the walking_figure_2 group and select it's cluster_group. Move this instead to reposition the figure.

Repeat and create a few walking figures

We can offset and scale the keys of each figure by using the graph editor.