FORUMS: list search recent posts

Changing Scale of Child relative to Parents H/W

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Sean Dunn
Changing Scale of Child relative to Parents H/W
on Jun 21, 2017 at 2:09:32 pm
Last Edited By Sean Dunn on Jun 21, 2017 at 2:23:45 pm

This is the effect I'm looking for http://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.


Return to posts index

Philip Neves
Re: Changing Scale of Child relative to Parents H/W
on Jun 21, 2017 at 5:57:26 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 1920x1920 (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?


Return to posts index

Philip Neves
Re: Changing Scale of Child relative to Parents H/W
on Jun 21, 2017 at 6:13:21 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


Return to posts index


Sean Dunn
Re: Changing Scale of Child relative to Parents H/W
on Jun 21, 2017 at 6:18:11 pm

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


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]