random appearance of layers

Moderators: Disciple, zlovatt

Post Reply
to299
Posts: 7
Joined: January 7th, 2008, 1:57 pm

i have for example 150 layers (like a pattern) that i want to appear randomlike on different time and stays. does anybody has a script for that?
thanks alot.

p.s.: i just found a script:

seedRandom(index, true);
theStart = random(0,2);
linear(time, theStart, theStart+1, 0, 100);

but how can i change that the layer fades in? i´d like to have visible from one frame to the other...
and can i set the startpoint framewise? (begin fade in on frame 15)?

sorry for this maybe stupid questions...
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

Code: Select all

fadeDurationInFrames = 1;
startRangeInFrames = 15;
endRangeInFrames = 60;

sr=startRangeInFrames*thisComp.frameDuration;
er=endRangeInFrames*thisComp.frameDuration;
seedRandom(index, true);
theStart = random(sr,er);
numFrames = fadeDurationInFrames*thisComp.frameDuration;
linear(time, theStart, theStart+numFrames, 0, 100); 
to299
Posts: 7
Joined: January 7th, 2008, 1:57 pm

yeah. thanks alot. working great.
Post Reply