Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions start with a random frame of a loop sequence

  • start with a random frame of a loop sequence

    Posted by Will Gan on June 28, 2013 at 11:33 am

    I’ve got a loop animation, 2 seconds long @ 25fps, thus 50 frames total, now I need to play that loop at a random frame to make those animations more dynamic, I’ve tried this code with remapping:

    seedRandom(index,true);
    time + random(outPoint)

    unfortunately, the comp goes blank after finishing playing the rest of the frames, I tried to import that loop as png sequence, it doesn’t work either, after finishing the loop, the png sequence freezes at the last frame, what I want is to start with a random frame and keep playing the loop, so once it reaches the end, it’ll start at the beginning of the loop, how can I do this?

    seedRandom(index,true);
    time + random(outPoint)

    Dan Ebberts replied 12 years, 10 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    June 28, 2013 at 5:17 pm

    I think this will work for time remapping:

    seedRandom(index,true);
    d = source.duration;
    offset = random(d);
    (time + offset)%d

    Dan

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