Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions How to loop a linear function

  • How to loop a linear function

  • Kyle Maven

    June 10, 2021 at 11:09 pm

    I have an image of a car tire rim. The lighting is different on all the “spokes”. Ultimately, I want the tire to look like the lighting is the same as it rotates. I am trying to set it up so that when I rotate the tire, the opacity of a duplicated layer, that is rotated at -72degrees (there are 5 rims, 5/360=72), changes from 0 to 100 and then loops as the rotation of the layer continues. I am not sure if this is possible or if I am just not using the right combination of expressions in the correct order. This is what I have >

    s = transform.rotation;
    linear(s, -72, 0, 0, 100)

    I hope this makes sense and that I provided as much information as I could. Thanks in advance!!!

  • Arne Münch

    June 15, 2021 at 12:19 pm

    i think instead of the loop function you need a modulo.

    so replace the loopout with something like

    s= s%72 – 72

    not exacly sure what you really want but this may help

Viewing 1 - 2 of 2 posts

Log in to reply.

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