Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Mechanical fan with expression

  • Mechanical fan with expression

    Posted by Mio Tanaka on January 2, 2012 at 4:51 pm

    I made a mechanical fan whose blades start rotating and keeps the same speed after 1.5 seconds using AE at work.
    Although I am still a novice at Expressions, I managed to make two versions of basically the same thing.

    Below is the expressions I made.

    (to blades’ rotation)

    1:non-split layer

    if (time <= 1.5)
    {
    thisComp.layer(“null1”).effect(“Slider Control”)(“Slider”)
    }
    else
    {
    value + time*900

    2:split layer (in point is at 1.5 seconds)
    this layer is split in two at 1.5 seconds and the expression is applied to the latter half.

    thisComp.layer(“wing01_01”).transform.rotation + (time- 1.5)*900

    Although I managed to make it, I don’t understand why I needed to subtract 1.5 seconds in the latter parentheses in the second expression.
    At first I did the opposite since the layer starts from 1.5 seconds.

    It might be pretty basic, but anyone care to explain?
    Thanks in advance.

    Mio Tanaka replied 14 years, 4 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    January 2, 2012 at 5:53 pm

    I think it might be a happy coincidence. If you wanted to make the rotation match the slider at the transition point, I think I’d do it like this:


    s = thisComp.layer("null1").effect("Slider Control")("Slider");
    tSwitch = 1.5;

    if (time <= tSwitch)
    s.value
    else
    s.valueAtTime(tSwitch) + (time-tSwitch)*900

    Dan

  • Mio Tanaka

    January 3, 2012 at 6:04 am

    Yes, it seems to be just a coincidence…
    Thank you for the clearer and wiser expression.
    It looks much more flexible.

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