Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Randomising scale between 2 values with hold

  • Randomising scale between 2 values with hold

    Posted by Mark Warner on May 14, 2015 at 3:43 pm

    I’ve search everywhere but need help!

    I have various layers that need to be scaled uniformly picking a random values between 45 and 60% over the course of the timeline. They need to hold for a certain length of time but that hold time needs to vary before jumping to another scale between 45 and 60%. Each layer needs to look different, i.e., a different seed so there’s no obvious sync between layers.

    The closest examples I’ve found have min and max hold times with min and max values and manipulate the seedRandom – but all the layers work together or smoothly animate between values.

    Can someone help?

    Mark Warner replied 11 years ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    May 14, 2015 at 5:15 pm

    Try this:

    minVal = 45;
    maxVal = 60;
    minDur = .5;
    maxDur = 1.5;
    t = inPoint;
    seedRandom(index,true);
    while (t <= time) t += random(minDur,maxDur);
    seedRandom(t,true);
    s = random(minVal,maxVal);
    [s,s]

    Dan

  • Mark Warner

    May 14, 2015 at 5:23 pm

    That’s brilliant Dan, thank you. It looks deceptively simple!!

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