Page 1 of 1

random appearance of layers

Posted: January 30th, 2008, 6:05 am
by to299
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...

Re: random appearance of layers

Posted: January 30th, 2008, 12:27 pm
by lloydalvarez

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); 

Re: random appearance of layers

Posted: January 30th, 2008, 12:40 pm
by to299
yeah. thanks alot. working great.