Expressions/Scripts/Presets

Moderators: Disciple, zlovatt

 
to299
Topic Author
Posts: 7
Joined: Mon Jan 07, 2008 1:57 pm

random appearance of layers

Wed Jan 30, 2008 6:05 am

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: Thu Jun 17, 2004 9:27 am
Location: New York City, NY
Contact:

Re: random appearance of layers

Wed Jan 30, 2008 12:27 pm

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
Topic Author
Posts: 7
Joined: Mon Jan 07, 2008 1:57 pm

Re: random appearance of layers

Wed Jan 30, 2008 12:40 pm

yeah. thanks alot. working great.

Who is online

Users browsing this forum: No registered users and 2 guests