Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Randomize the Index…

  • Randomize the Index…

    Posted by Barry Brimley on September 10, 2009 at 3:52 am

    Hello. I was wondering if there is an expression that would allow me to randomize the index sequence. I’m assuming the manual way would be to rearrange the index, but with 200+ layers, that would take awhile, let alone making it look organic.

    The code comes from a tutorial over at https://www.graymachine.com. The final line is the one I believe would be the one to modify. The whole premise is that a layer will end at a certain position, and the animation of the layers are driven by the index. However, the object (in this case text), is made up of 200+ layers, and they were imported from Illustrator in a structured manor. I want the end result to have a random feel, instead of a very linear left-to-right animation.

    Thank you in advanced.

    seedRandom(index,true)
    start = random([-100, 50, -2000] , [1000, 436, 1000]);
    end = value;

    ease(time, 0, 2 + (index*thisComp.frameDuration), start, end)

    Barry Brimley replied 16 years, 12 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    September 10, 2009 at 12:57 pm

    Try changing the last line to this:

    ease(time, 0, 2 + (random(thisComp.numLayers)*thisComp.frameDuration), start, end)

    Does that do what you want?

    Dan

  • Barry Brimley

    September 10, 2009 at 11:28 pm

    Wow, thank you so much man. You just saved me a headache, or ten. Haha. 🙂

    It did exactly what I wanted. Thank you!

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