Wednesday, August 1, 2012

Trying to Learn: Puppet Pins and Null Objects

Part 2:  Attaching Null objects to the eyes and mouth, then attaching sliders to the null objects. (link)



Part 3: Creating Puppet Pins to distort the face, and attaching null objects to pins to use sliders. (link)

ADD THIS BIT OF CODE to the pins, by right clicking the position "clock" and add this to the expression area. then highlight the layer name (in red) and pick whip to the correct layer:

n = thisComp.layer(“layerToFollow”);
nullpos = n.toComp(n.anchorPoint);
fromComp(nullpos);




EXPLANATION:
The first two lines are just creating variable references:

“n” is referencing the object to follow, in this case the “chin” null object (getting it by name).

“nullpos” uses the “n” (chin reference) to further reference the null object’s anchorpoint

The last line is the one that actually links the null to the pin. “fromComp” transforms a point composition space to layer space. So we’re taking the point from the “pin” in our composition and converting its transform value to the “chin” null layer values.

Videos:
Part 2:
Part 3: