Groups > Multimedia > Adobe After Effects expressions > Re: Asymmetric intervals




Asymmetric intervals

Asymmetric intervals
Mon, 11 Feb 2008 00:36:42 -080
Dan came up with this useful expression to blink a layer's opacity:
blinkSpeed =2;
lowOpacity =0;
highOpacity = 100;
if(Math.sin(blinkSpeed * time * Math.PI *2) < 0) lowOpacity else
highOpacity;

Post Reply
Re: Asymmetric intervals
Mon, 11 Feb 2008 05:27:22 -080
This should work:

lowFrames =10;
highFrames = 15;
lowOpacity =0;
highOpacity = 100;
period = (lowFrames + highFrames)*thisComp.frameDuration;
t = time%period;
if (t >= lowFrames*thisComp.frameDuration) highOpacity else lowOpacity

Post Reply
Re: Asymmetric intervals
Mon, 11 Feb 2008 12:32:50 -080
Post Reply
Re: Asymmetric intervals
Tue, 19 Feb 2008 04:34:37 -080
Just another thought... how to take this to the next level? Like blink X times,
then stay at highOpacity for Y number of frames.

Cycle lowOpacity/highOpacity X number of times with an interval of lowFrames.

Post Reply
Re: Asymmetric intervals
Tue, 19 Feb 2008 23:13:57 -080
You could simply compare the time to the number of cycles (or more corectly the
frames described by the cycles).

if (cycle*x < 250)
 
else
 

There's certainly ways of making this more elegant using loop counters, but
depending on your needs this might suffice.

Post Reply
about | contact