Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE AFTER EFFECTS: HomeForumBasicsExpressionsTutorialsPodcastsMotion GraphicsTrainingCinema 4DFAQ

Randomize the Index...

Cow Forums : Adobe After Effects Expressions

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>
Randomize the Index...
by Barry Brimley on Sep 10, 2009 at 3:52:30 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 http://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)


Respond to this post   •   Return to posts index

Re: Randomize the Index...
by Dan Ebberts on Sep 10, 2009 at 12:57:11 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



Respond to this post   •   Return to posts index

Re: Randomize the Index...
by Barry Brimley on Sep 10, 2009 at 11:28:15 pm

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

It did exactly what I wanted. Thank you!

Respond to this post   •   Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSTUTORIALSMAGAZINETRAININGVIDEOS - REELSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]