Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Invert Opacity between two values with two layers

  • Invert Opacity between two values with two layers

    Posted by Chris Arnold on February 23, 2009 at 3:41 pm

    I am trying to get an expression that will translate the value of one layers opacity to another layer. One layer is keyframed on each frame either being 18% or 0%. I need another layer to look at these values and everytime the keyframed layer’s value is 18 percent this layers opacity should be 0%, and when the other layer is 0% this layer should be 18%.

    Any help would be great!

    Chris Arnold replied 17 years, 2 months ago 2 Members · 2 Replies
  • 2 Replies
  • Trent Armstrong

    February 23, 2009 at 4:18 pm
    temp = <opacity value>;
    
    if (temp == 18) 0 else 18
    
    
    OR
    
    
    temp = <opacity value>;
    Min = 0;
    Max = 18;
    value1 = 18;
    value2 = 0;
    
    linear(temp, Min, Max, value1, value2) 

    If you’re using Hold Keyframes, you could use an IF statement. Otherwise you could use linear().

    Trent Armstrong – Creative Cow Leader
    https://www.dallasaeug.com

  • Chris Arnold

    February 23, 2009 at 4:54 pm

    Thank you, that is helpful.

    It came to me probably an easier way to do this. If you pickwhip the opacity to the layer with keyframes and then subtract 18 from that value it will give what is needed.

    So, (18 – Pickwhip)

    Thanks

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