Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions AE Expression to change a single value every X seconds.

  • AE Expression to change a single value every X seconds.

    Posted by James Mccavana on August 29, 2012 at 8:07 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

    James Mccavana replied 13 years, 8 months ago 2 Members · 3 Replies
  • 3 Replies
  • James Mccavana

    August 29, 2012 at 10:11 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

  • Dan Ebberts

    August 29, 2012 at 5:27 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

  • James Mccavana

    August 30, 2012 at 10:58 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

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy