After Effecs Tutorials: Series 2 - Character Rigging with Puppet Pins

Part 3: Rigging the Upper Body

Published: 22 Feb 2017 through 1 Mar 2017

Part 3 is in two installments. In the first installment we will rig her arms and hand positions with Duik’s help. The second installments adds a slider controller so Angie can place her arms behind her back. We’ll also write expressions to enable a cloth response to her shirt when she bends her arms.

What you should know before beginning this tutorial

You should have completed Parts 1 & 2 if you plan to follow along with these installments.

2.3a Rigging Angie’s arms and hand controls

The arms are a basic Duik rig with the added feature of switch layers for the hands. The rigging of the arms is very much like the previous rigging of the legs.

Video Published: 22 Feb 2017

2.2b Shoe Controls and Rigging Angie’s Spine

We’ll be working with transparency of the shirt layers to allow Angie to place her arms behind her back. Unlike Stickman’s rig, we’ll be using a slider controller instead of checkboxes to achieve this. Then we’ll create special masks to enable a cloth response in Angie’s shirt as she moves her arms upward.

Video Published: 1 Mar 2017

More about the cloth response expression in tutorial 2.3b

Edited For Clarity: 24 Jul 2017

I used the linear expression in tutorial 2.3b to create the cloth response of Angie’s shirt when she moves her arms. The resulting expression for the left arm shirt cloth as explained in the tutorial is:

R=thisComp.layer(“B_L Upper Arm”).transform.rotation;

if(R>=180.8 && R<=258.3){

X=linear(R,180.8,258.3,-50,0);

Y=linear(R,180.8,258.3,-25,0);

P=[X,Y];

}else{

P=[0,0];

}

P

As I’ve mention before, I don’t try to compress my expression code to it’s simplest form. Instead, I try to lay it out so it it is very clear what’s going on in each line. It’s easier, at least for me, to find coding errors when they pop up – and they will pop up. However, I want to mention that the above code could be written with fewer lines. The last two variables (P1, P2) in linear(V, Vmin, Vmax1, P1, P2) don’t need to be written separately. These variables, as with all JavaScript variables, can hold arrays as well.

So, instead of separating the (X, Y) values for the puppet pin that controls the cloth location, we can enter them in as arrays, or (X, Y) coordinate pairs. Arrays are placed in brackets, so in this case an array with (X,Y) values would be written [X,Y].

This:

X=linear(R,180.8,258.3,-50,0);

Y=linear(R,180.8,258.3,-25,0);

P=[X,Y];

Can be compressed into this:

P=linear(R,180.8,258.3,[-50,-25],[0,0]);

The variable P is an arbitrary choice (standing for position) and will be expressed as an array containing both the X and Y results in both forms of the expression above.

The array range is based on [0, 0], which is the starting position of the cloth puppet pin when the bone rotation is at 258.3, through [-50,-25], the (X, Y) position of the puppet pin when the bone rotation is at 180.8.

So the script could be written like so:

R=thisComp.layer(“B_L Upper Arm”).transform.rotation;

if(R>=180.8 && R<=258.3){

P=linear(R,180.8,258.3,[-50,-25],[0,0]);

}else{

P=[0,0];

}

P

*Don Q Media  and Jared Mark Graham have no affiliation with Adobe Systems Inc.