Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Scaleable Exponential Scale?

  • Scaleable Exponential Scale?

    Posted by Ocean Byrne on January 6, 2023 at 10:35 am

    Any tips on the best way to play with the timing of an Exponential Scale?

    I like/need the visually smooth progression of exponentially scaling objects up, and I have a pretty lengthy and complex scene with the need to scale lots of objects…

    Getting the timing right is real tricky using the keyframe assistant exponential scale tool. As is figuring out how big each object needs to get to disappear.

    What I would prefer is a keyframeable RATE of Exponential Scale. So I’d have it set to 1 and things would grow nice and smoove for a while, and then I’d slowly animate the rate to 5 and things would fly on by… and then back again.

    I’d also like more flexibility with adjusting the center of the scale which probs can be set up with nested nulls, but I’m having trouble wrapping my head around it.

    Ideas welcome.

    Thanks,

    Ocean

    Filip Vandueren replied 3 years, 4 months ago 3 Members · 3 Replies
  • 3 Replies
  • Graham Quince

    January 8, 2023 at 2:28 pm

    I think you could probably use a slider which powers an expression on the scale, in a way that the slider is the mutiplier, something like:

    value*time*slider

    When slider is 1, the objects are going at a rate connected to time, but when you increase the slider to 5, the objects scale up 5 times as quickly.

  • Filip Vandueren

    January 12, 2023 at 9:27 am

    I do this all the time:

    Create a slider on your layer then use this expression for scale:

    value * 2 ** (effect(“Slider Control”)(“Slider”).value/100);

    You can change /100 to +10 or whatever, just what gives you the best control. Not dividinng it at all makes it hard to finetune the scaling by scrubbing the slider as the values get huge quickly)

    Now keyframe the slider for true exponential scaling.

  • Filip Vandueren

    January 12, 2023 at 9:56 am

    Here’s another method, that works more like the animation assistent:

    Just keyframe your scale (I’m assuming 2D scales here) and apply this expression:

    if (numKeys>2) {
    nk = nearestKey(time);
    prevKeyIndex = (1, nk.index - (nk.time>time ? 1 : 0))||1;
    nextKeyIndex = Math.min(numKeys, prevKeyIndex+1)||1;
    prevValue_X = key(prevKeyIndex).value[0]||0.001;
    prevValue_Y = key(prevKeyIndex).value[1]||0.001;
    nextValue_X = key(nextKeyIndex).value[0]||0.001;
    nextValue_Y = key(nextKeyIndex).value[1]||0.001;
    expGrowth_X = Math.log(nextValue_X/prevValue_X);
    expGrowth_Y = Math.log(nextValue_Y/prevValue_Y);
    [
    prevValue_X * (Math.E ** linear(
    value[0],
    key(prevKeyIndex).value[0],
    key(nextKeyIndex).value[0],
    key(prevKeyIndex).value[0]< key(nextKeyIndex).value[0] ? 0 : expGrowth_X,
    key(prevKeyIndex).value[0]< key(nextKeyIndex).value[0] ? expGrowth_X : 0))
    ,
    prevValue_Y * (Math.E ** linear(
    value[1],
    key(prevKeyIndex).value[1],
    key(nextKeyIndex).value[1],
    key(prevKeyIndex).value[1]< key(nextKeyIndex).value[1] ? 0 : expGrowth_Y,
    key(prevKeyIndex).value[1]< key(nextKeyIndex).value[1] ? expGrowth_Y : 0))
    ];
    } else {
    value;
    }

    This has some of the limitations as the animation assistent: doesn’t handle negative scale (O scale is caught by changing it to a very small value 0.001)

    But this version respects the easing/velocities of your keyframes, so you can do exponential scale, with easing.

    The code can probably be a bit shorter.

    (note, since it uses ** as a shorthand for Math.pow() it needs the modern Javascript engine to work)

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