Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions postion/scale stretch expression

  • postion/scale stretch expression

    Posted by Eddy Alvarez on December 13, 2007 at 10:07 pm

    i’m trying to create an effect in which a comp is between two fingers. when the fingers separate the left side of the comp sticks to the left finger, as does the right side of comp to the right finger. while it stretches it also scales up..keeping the comp in its proportions (which in this case is 565,160)

    i’ve tracked the left and right fingers…and pickwhipped the position of the comp to the left finger but i would have to constantly move the anchor point and scale every frame in order to keep it in its proportion.

    i’m racking my brains as to how i can make it all work automatically.

    any suggestions???

    many thanks

    Dan Ebberts replied 18 years, 5 months ago 3 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    December 13, 2007 at 10:45 pm

    We probably need more info. If the distance between the points that you’re tracking starts out the same as your comp width, it might just be a simple ratio so that the scale expression for the comp would look like this:

    P1 = (tracking point for left finger);
    P2 = (tracking point for right finger);

    delta = length(P1,P2);
    s = (delta/width)*100;
    [s,s]

    But, if there’s any rotation, or the tracking points are offset from the edges of the comp, it gets more complicated.

    Dan

  • Darby Edelen

    December 14, 2007 at 12:09 am

    I feel like you should be able to apply the tracking data (scale, position and rotation) to a null, parent the comp to the null then tweak it into the proper position at the opening frame, it should line correctly in the following frames as long as the track is good.

    I can’t think of any reason why this wouldn’t work, but if you run into problems feel free to shoot me down =)

    Darby Edelen
    Designer
    Left Coast Digital
    Santa Cruz, CA

  • Dan Ebberts

    December 14, 2007 at 1:58 am

    Sounds good to me. 🙂

    Dan

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