Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Parenting position of null object to position of another layer

  • Parenting position of null object to position of another layer

    Posted by Sean Worsell on May 4, 2009 at 1:57 pm

    I’ve come across a little confounding problem in my project. I have a null object (Layer 2) that is parented to a layer containing some tracking data (Layer 3). On layer 1, I want to add an adjustment layer containing an effect (a re-light). But when I parent the entire adjustment layer to the null object, the effect’s position isn’t changed. So I thought maybe I needed to parent the adjustment layer’s position directly to the null object. In this case, the re-light now matches the position exactly of the null object…which isn’t quite what I want either. Because now my re-light is “moved” to be EXACTLY where the null object position is (e.g., if my relight is in the middle of the frame, and the null’s position tracks data from a corner of the frame, my re-light effect is now moved to the corner of the frame too, and then follows the tracking data from there–whereas I just wanted the re-light to use the tracking data, but retain its original anchor position.

    How can I parent this re-light/adjustment layer to the null object’s tracking data without moving the entire effect from the desired original position?

    Ole Sturm replied 11 years, 2 months ago 3 Members · 2 Replies
  • 2 Replies
  • Carl Larsen

    May 4, 2009 at 3:00 pm

    It sounds like you’re trying to accomplish what I demonstrated in my last two tutorials: Tracking a Child in After Effects.

    To track the position of a child layer (layer 2), use this expression on the layer you want to effect (the effect position on Layer 1).

    L = thisComp.layer(”child_layer”);
    P = L.toWorld(L.anchorPoint);

    where P[0] gives x, P[1] gives y, and P[2] gives z.

    Carl Larsen

    TelescopeMediaGroup.net

  • Ole Sturm

    February 7, 2015 at 6:24 am

    How would I go about setting this up so that there is a delay ie. the co-ordinates returned are from n second earlier?

    Thanks in advance.

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