FORUMS: list search recent posts

AE Expression to change a single value every X seconds.

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
James McCavana
AE Expression to change a single value every X seconds.
on Aug 29, 2012 at 8:07:54 am

Hello there,

I've been trying to write a simple expression that changes a single value, in this particular case the 'Glow Intensity' in the 'Glow' effect, every couple of seconds.

I'm failing miserably and I can't find what I desire on the numerous websites i've searched.

Can anybody help me?

Here's a bit more detail:

I have a sci-fi type corporate company (fictional) , and I've done a simple animated sting of the company logo, and within the logo there are some subtle details that I've applied the glow effect to. I just want the glow to 'throb' every few seconds, giving it a bit of life.

So, the main value is 1, but then every couple of seconds it smoothly (but quickly) increases to 2 (or 3, or whatever), then returns to 1 with a gentle decay. Imagine the red eye of HAL in 2001 Space Odyssey.

I'd be really grateful if somebody could help me, as I'm sure it would be a very useful expression that I could apply to numerous other things in future.

I know I could achieve the desired result by simply key-framing the value, but I'd really like to avoid that as it seems like a bit of a cop-out.

Thanks in advance for your help.

Kind regards,

James.

Senior Editor
ichi london


Return to posts index

James McCavana
Re: AE Expression to change a single value every X seconds.
on Aug 29, 2012 at 10:11:21 am

I've used this expression:

loopOut(type = "cycle", numKeyframes = 0);

to loop a few simple keyframes, which is working well.

Anyone know of an expression that eliminates keyframes altogether?

J.

Senior Editor
ichi london


Return to posts index

Dan Ebberts
Re: AE Expression to change a single value every X seconds.
on Aug 29, 2012 at 5:27:44 pm

Try setting the glow to 1 and then add this expression:

period = 2
maxVal = 3;
ramp = .25;

t = (time-inPoint)%period
if (t < ramp)
ease(t,0,ramp,value,maxVal)
else
ease(t,ramp,2*ramp,maxVal,value)


Dan



Return to posts index


James McCavana
Re: AE Expression to change a single value every X seconds.
on Aug 30, 2012 at 10:58:51 am

Thanks Dan,

I haven't had a moment to try your expression yet, as I'm juggling a few different projects. I'll let you know as soon as I try it out.

Cheers.

James.

Senior Editor
ichi london


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]