ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Randomly arrange frames

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ron Dangus
Randomly arrange frames
on Jan 3, 2011 at 5:16:55 pm

Hello,

I'm trying to make a movie of several thousands of pictures, each picture one frame. Right now it's very structured, with different categories and kinds of pictures following each other. Is there a way to randomly arrange frames?

Thanks a lot,
Ron


Return to posts index

Todd Kopriva
Re: Randomly arrange frames
on Jan 3, 2011 at 5:29:20 pm

If all of the image frames are on a single layer, then you could apply time-remapping to the layer and then use a random number expression on the Time Remap property to play the frames in a random order.

---------------------------------------------------------------------------------------------------------
Todd Kopriva, Adobe Systems Incorporated
Technical Support for professional video software
After Effects Help & Support
Premiere Pro Help & Support
---------------------------------------------------------------------------------------------------------


Return to posts index

Roland R. Kahlenberg
Re: Randomly arrange frames
on Jan 3, 2011 at 6:06:36 pm

Here's a gem from Dan Ebberts -

----------------------
If you want random pics at random intervals, this would
be one way:

Import your pics into a comp and sequence them (let's
say one second duration for each).

Select all the pics and pre-comp them (move all
attributes..)

Enable time-remapping for the new pre-comp

Alt-click (Opt-click) on the time-remapping stopwatch to
enable expressions.

Paste in this expression:

n=4; //number of stills
seg_start_time = 0; //initial conditions
seg_end_time = 0;
i =1;
tmin = .5; //minimum cycle time
tmax = 2; //maximum cycle time
while (time >= seg_end_time){
i = i+1; seed_random(i,true);
seg_start_time = seg_end_time;
seg_end_time = seg_end_time + random(tmin,tmax);
}
Math.floor(random(0,n)) + .5;

Edit the expression so that n = your number of pics, and
tmin and tmax are the minimum and maximum times you want
one pic on the screen.

Good luck!

Dan
--------

HTH
RoRK

AE Training in South East Asia. AE templates for sale and rental. Click here for more


Return to posts index


Ron Dangus
Re: Randomly arrange frames
on Jan 9, 2011 at 1:18:36 pm

Thanks,

So, if I have 6421 pictures, and I want them all to show once for just a frame, it'll be:

n=6421;
seg_start_time = 0; //initial conditions
seg_end_time = 0;
i =1;
tmin = .5; //minimum cycle time
tmax = 2; //maximum cycle time
while (time >= seg_end_time){
i = i+1; seed_random(i,true);
seg_start_time = seg_end_time;
seg_end_time = seg_end_time + random(tmin,tmax);
}
Math.floor(random(0,n)) + .5;

Is this it?


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]