ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Processing inverted opacity values

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ryan Daily
Processing inverted opacity values
on Sep 13, 2017 at 7:25:51 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;




Return to posts index

Ryan Daily
Re: Processing inverted opacity values
on Sep 13, 2017 at 7:57:35 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;



Return to posts index

Dan Ebberts
Re: Processing inverted opacity values
on Sep 13, 2017 at 8:14:28 pm

Like this maybe?

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

Dan



Return to posts index


Ryan Daily
Re: Processing inverted opacity values
on Sep 13, 2017 at 8:21:31 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.



Return to posts index

Dan Ebberts
Re: Processing inverted opacity values
on Sep 13, 2017 at 8:32:56 pm

My site does have a tip jar:

http://motionscript.com

Thanks for asking. ☺


Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]