Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Processing inverted opacity values

  • Processing inverted opacity values

    Posted by Ryan Daily on September 13, 2017 at 7:25 pm

    I am sad that after 15 years of AE my expression skills are still pretty rudimentary.

    I have an adjustment layer controlling a “lights out” effect. When the opacity of the Lights Out layer is at 0 the effect is basically hidden. When the value is at 60 the room looks dark. Because I want the light sources in the image sequence to stay visible I am only raising the value to 60.

    So what I am in effect trying to do is link the opacity of the Lights Out adjustment layer to the opacity of other layers but in reverse. I want the opacity value of 60 on my adjustment layer to equal 0 as an opacity. I want the opacity value of 0 on my adjustment layer to equal 100 as an opacity.

    This is my sad attempt:

    Thanks for being such a supportive community.

    x= thisComp.layer("LIGHTS OUT").transform.opacity;
    if (x = 60) x=100;

    Dan Ebberts replied 8 years, 8 months ago 2 Members · 4 Replies
  • 4 Replies
  • Ryan Daily

    September 13, 2017 at 7:57 pm

    I am getting closer but my low value will only go as low as 40 and I want it at 0.

    linear(value, 0, 60, 0, 100)-thisComp.layer("LIGHTS OUT").transform.opacity;

  • Dan Ebberts

    September 13, 2017 at 8:14 pm

    Like this maybe?

    x= thisComp.layer(“LIGHTS OUT”).transform.opacity;
    linear(x,0,60,100,0)

    Dan

  • Ryan Daily

    September 13, 2017 at 8:21 pm

    Nailed it! Thank you so much.
    Do you have a tip jar set up anywhere?
    I think this is like the 4th time in 10 years that you have saved my day.

  • Dan Ebberts

    September 13, 2017 at 8:32 pm

    My site does have a tip jar:

    https://motionscript.com

    Thanks for asking. ☺

    Dan

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