Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions changing opacity based on scale of layer

  • changing opacity based on scale of layer

    Posted by Ben Christie on July 12, 2016 at 10:53 pm

    Hello all,

    Another brain buster.

    I am scaling a layer from 100 – 120 every so often and rather than animate the opacity I want to use an expression.

    When scale is 100 I want the opacity to be at 100, when scale is at 120 I want the opacity to be at 45.

    I’m sure there is an fairly simple way to do this.

    Any help would be much appreciated.

    Thanks!

    Dan Ebberts replied 9 years, 10 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    July 12, 2016 at 11:07 pm

    This should work:

    linear(scale[0],100,120,100,45)

    Dan

  • Ben Christie

    July 12, 2016 at 11:16 pm

    This works perfectly!

    Why do I start the expression with linear? Just curious to understand how it actually works.

    Thanks!

  • Dan Ebberts

    July 13, 2016 at 12:30 am

    linear() is an easy way to convert one range to another in a linear relationship. There are other interpolation methods available: ease(), easeIn(), and easeOut()–but linear() seemed best suited to your needs.

    Dan

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