Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions randomizing scale parameters over timeintervals

  • randomizing scale parameters over timeintervals

    Posted by Simon Robbrecht on January 25, 2008 at 3:27 pm

    Hi,

    I am trying to animate the yscale of a layer so that it varies between 100 and 125 percent every 46 frames (25 fps). The first animation should take place @ 00:00:04.
    The animation should look like this:

    00:00:04 – yScale = 100
    00:00:06 – yScale = varying between 100 and 125
    00:00:08 – yScale = 100

    00:02:00 – yScale = 100
    00:02:02 – yScale = varying between 100 and 125
    00:02:04 – yScale = 100

    00:03:24 – yScale = 100

    I have an idea (albeit a vague one) how to randomize the scale between 100 and 125 but i am puzzled how to code the time interval.

    Could anyone help me on the way, please?

    Thanks a lot!

    simon

    Simon Robbrecht replied 18 years, 3 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    January 25, 2008 at 3:54 pm

    Something like this should do the trick:

    min = 100;
    max = 125;
    strt = 4;
    dur = 2;
    interval = 46;

    f = timeToFrames(time)%interval;
    s = random(min,max);
    if (f >= strt && f <= (strt + dur)) [s,s] else value Dan

  • Simon Robbrecht

    January 28, 2008 at 11:51 am

    that worked very well.

    thanks a lot!

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