Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression related rotation to opacity

  • Expression related rotation to opacity

    Posted by Desi Diaz on January 17, 2017 at 8:45 am

    Hello! I’m relentlessly looking for an expression to get a layer to reach a rotation of -7% its opacity is turns to 0% and when I get to -6% rotation return to an opacity of 100%, I’m doing cut-out animation of One wing and I would like it to change automatically when it reaches a certain rotation.
    The idea is to disappear completely from one frame to another and not gradually.
    I had thought a formula like that
    If object x reaches rotation -7% then opacity 0%
    If object x reaches rotation -6% then opacity 100

    But I know very little of expressions and I do not know if it can be done. Can anyone help me? I would be eternally grateful!
    Im sorry my english is quite bad 🙁

    Coen Rens replied 9 years, 3 months ago 2 Members · 1 Reply
  • 1 Reply
  • Coen Rens

    January 30, 2017 at 4:01 pm

    It can be done with a linear function, which interpolates in a linear fashion between a minimum and maximum value.

    See the attached code, which should be entered to your opacity property
    .
    Replace ‘object x layer name’ with the layer name of your object x, but leave both the ” quotation marks.

    linear( thisComp.layer("object x layer name").rotation, -7, -6, 0, 100 )

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