Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Puppet Pin Control Outside Comp

  • Puppet Pin Control Outside Comp

    Posted by Greg Digenti on March 25, 2009 at 12:09 am

    Dan was able to help me before when I was using IK for my puppet, but now I’m using the puppet tool and the same expression doesn’t seem to work.

    I want to control the position of a puppet tool pin using a null located in the comp that I’ve dropped the puppet comp into. The problem is that when I use this expression, the null is quite a bit up and to the left of the pin position, making it difficult to control with any precision:

    L = comp(“OutsideCompName”).layer(thisComp.name);
    L. fromCompToSurface(comp(“OutsideCompName”).layer(“Null 1”).position);

    I’ve also tried this “fromWorld” version to no avail:

    L = comp(“OutsideCompName”).layer(thisComp.name);
    L.fromWorld(comp(“OutsideCompName”).layer(“Null 1”).position);

    Any help would be appreciated

    Greg Digenti replied 17 years, 5 months ago 2 Members · 6 Replies
  • 6 Replies
  • Filip Vandueren

    March 25, 2009 at 1:03 am

    I know, it’s confusing…

    You don’t want to use the POSITION of the null, but want a fixed point ON the null and translate that point to a new coordinate system.
    Usually we use a layer’s anchorpoint, so try this:

    L = comp(“OutsideCompName”).layer(thisComp.name);
    L. fromCompToSurface(comp(“OutsideCompName”).layer(“Null 1”).anchorPoint);

  • Greg Digenti

    March 25, 2009 at 1:10 am

    If this helps, what I’m trying to animate is a person I’ve made out of several pieces (arms, head, torso, legs, etc) and it appears that the position of each puppet tool pin is based on the size of the part that it’s attached to, rather than the overall comp. Not sure how to compensate for this?

  • Greg Digenti

    March 25, 2009 at 1:11 am

    Sorry, my last response was made before I realized anyone had responded to my post. Let me try your suggestion and I’ll get back to you. Thanks!

  • Greg Digenti

    March 25, 2009 at 1:18 am

    Okay I tried that, and unfortunately it’s even worse. It pushes the puppet pin so far down and to the left of the location of the Null, I can barely control its movement.

    Any other thoughts?

  • Filip Vandueren

    March 25, 2009 at 1:28 am

    Is the null in another comp an the puppet on a 3D layer ?
    If not you can simply use this on the pin:


    n=thisComp.layer("Null");

    nullpos=n.toComp(n.anchorPoint);
    fromComp(nullpos);

    or even (if the null has no parents):


    n=thisComp.layer("Null");
    fromComp(n.position);

  • Greg Digenti

    March 25, 2009 at 1:49 am

    Well, your last instructions seemed a bit incomplete since none of the code pointed outside the current comp, so what I did was add a null within the puppet comp which would control the pin (using your last expression), then used the first expression I posted to control that NULL using the null outside the comp (which is maybe what you intended in the first place).

    It seems kind of like a long way to go, but so far it appears to be working exactly as I wanted it to.

    Thanks!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy