Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Changing Scale of Child relative to Parents H/W

  • Changing Scale of Child relative to Parents H/W

    Posted by Sean Dunn on June 21, 2017 at 2:09 pm

    This is the effect I’m looking for https://imgur.com/a/EubDf

    I created it using 4 precomps, keyframed the first 4 frames with the correct scales I wanted. Then in a master comp, using time remap on all precomps linked to a slider to animate between the preset keyframes.

    This idea works for static images, but I’m looking for a way to get the same slider control to drive all four panels without messing with time so I can add secondary animation to the objects within each box.

    View post on imgur.com

    Sean Dunn replied 9 years, 1 month ago 2 Members · 3 Replies
  • 3 Replies
  • Philip Neves

    June 21, 2017 at 5:57 pm

    That’s a cool effect and I want to steal it. ☺

    I played with it and put something together that might be similar what you want. (You may have to adapt things for your project layout though — mostly because I didn’t understand what your slider was doing.)

    In a comp with a 1920×1920 (or other square) solid and a centered text layer as a child:

    1. Add two Slider controls to the solid named “h” and “w” with values of 100.
    2. Add this expression to the solid’s scale:


    h = effect("h")("Slider");
    w = effect("w")("Slider");
    [w,h]

    3. Add this expression to the text layer’s scale:


    w = parent.scale[0];
    h = parent.scale[1];
    xfac = (w)/100;
    yfac = (h)/100;
    q = Math.min(xfac,yfac)

    s1 = 100*value[0]/w*q;
    s2 = 100*value[1]/h*q;

    [s1,s2]

    The text layer will scale uniformly with the smallest dimension of the solid and retain its position relative to the solid. You can shift the solid’s anchor point to have it scale from a side instead of the center.

    Helpful, or missing the point?

  • Philip Neves

    June 21, 2017 at 6:13 pm

    Missed the cross-post, anyway.

    Dan Ebbert’s solution is probably better (not a huge surprise)… mine has issues when you animate and it crosses over from scaling based off one dimension to scaling based on the other.

    https://forums.creativecow.net/thread/227/36108

  • Sean Dunn

    June 21, 2017 at 6:18 pm

    Sorry about that, but thank you so much for the help!

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