Discussion:
Using 'Blink', but eliminating middle values
(too old to reply)
N***@adobeforums.com
2006-09-08 17:28:29 UTC
Permalink
I earlier need help with random blinking using wiggle. Now I need uniform blinks.
I'm trying to make a layer blink at regular intervals. I've been using:

blinkSpeed =2;
lowOpacity =0;
highOpacity = 100;
opNormal = (Math.cos(blinkSpeed * time * Math.PI *2)+1)/2;
linear(opNormal,0,1,lowOpacity,highOpacity);

BUT... this expression goes through the middle values 1-99% so low blinkSpeed values fade on and off. Is there a way to have it blink regularly at 0 and 100% opacity (or between two values x & y), but nothing inbetween?
d***@adobeforums.com
2006-09-08 18:16:01 UTC
Permalink
This post might be inappropriate. Click to display it.
D***@adobeforums.com
2006-09-08 21:26:02 UTC
Permalink
Lots of ways to do it. Here's one:

blinkSpeed =2;
lowOpacity =0;
highOpacity = 100;
if(Math.sin(blinkSpeed * time * Math.PI *2) < 0) lowOpacity else highOpacity;

Dan
D***@adobeforums.com
2006-09-08 21:30:52 UTC
Permalink
Here's another favorite :-)

period = .25;
if (Math.floor(time/period)%2) 0 else 100

Dan
N***@adobeforums.com
2006-09-08 22:24:57 UTC
Permalink
Wow... thanks guys! Really interesting ways to go about it.

Didgi -- where do I put the loopOut expression? Is it with Time Remap?

Dan, in your last expression, how is period defined? It seems to be 1/2 second. (which doesn't make it as easily understood as the others)
D***@adobeforums.com
2006-09-08 22:41:17 UTC
Permalink
Yeah, it just means it's on for .25 sec, off for .25 sec, etc.

For Didgi's solution, you'd put the loopOut expression in the value of the CheckBox.

Dan

Continue reading on narkive:
Loading...