Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions link to position in parent composition

  • link to position in parent composition

    Posted by Mike Dziennik on January 24, 2008 at 9:36 am

    I want to link the 3d position of a solid to the 3d position of a solid in a parent composition. The compositions are different dimensions and if I link the position attritbutes of the layers using the pickwhip, the solid in the child composition moves but does not appear on top of the solid in the parent composition – it is offset.

    How can I make sure that a solid in a child composition will maintain a position relative to a solid in the parent composition? Both solids are 3d.

    Cheers.

    Mike Dziennik replied 18 years, 3 months ago 2 Members · 2 Replies
  • 2 Replies
  • Trent Armstrong

    January 24, 2008 at 7:43 pm

    Cheers!

    I think there are three ways to approach this. First, if it doesn’t destroy your project, you could make the two comps the same size.

    Second, you could use sliders to take care of the offset. Add an X, a Y, and a Z expression slider to the “parent” layer in the final comp and pickwhip the expression in the position of your layer in the child comp.

    Something like:
    —————————–
    xOffset = {pickwhip to X offset slider};
    yOffset = {pickwhip to Y offset slider};
    zOffset = {pickwhip to Z offset slider};

    x = value[0] + xOffset;
    y = value[1] + yOffset;
    z = value[2] + zOffset;

    [x, y, z]
    —————————–
    This would allow you to correct the position in the parent comp and hopefully would only be one-time tweaks instead of lots of animating.

    THIRD, (Dan Ebberts would know better than me) but you might be able to use fromWorld(toWorld())

    He has a good example at motionscript.com. I’m just changing “Comp” to “World” since “World is what you use when you are using a camera:
    https://www.motionscript.com/design-guide/threeD-corner-pin.html

    target = thisComp.layer({pickwhip this to your parent layer});
    fromWorld(target.toWorld(target.anchorPoint));

    A fourth option might be to make your child comp into a 3D and rasterized layer in the parent comp. (TRY THIS ONE FIRST!)

    Good Luck!
    Trent

    Trent Armstrong – Creative Cow Leader
    https://www.dallasaeug.com

  • Mike Dziennik

    January 30, 2008 at 2:46 pm

    Cheers. Using a combo of your advice I have achieved my desired result. Thanks.

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