ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Fade/change IF variable over time

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Luke CutforthFade/change IF variable over time
by on Dec 15, 2013 at 7:50:31 pm

Hello!

I'm working on a project with IF Variables and have the following:

if (thisComp.layer("Null 8").transform.rotation<103) 1.4 else 0


Basically, I want the ELSE variable '0' to fade. Rather than simply flicking to 0, i want it to quickly fade is 0 after the if statement is no longer true. Anyone know how this can be done? :)

Thanks

Luke


Return to posts index

Walter SoykaRe: Fade/change IF variable over time
by on Dec 16, 2013 at 3:39:07 pm

[Luke Cutforth] "Basically, I want the ELSE variable '0' to fade. Rather than simply flicking to 0, i want it to quickly fade is 0 after the if statement is no longer true. Anyone know how this can be done? :) "

Expressions don't quite work the way you think they work. Expressions are not evaluated cumulatively. They have no idea what happened on the frame before.

Expressions are calculated anew, every single frame. If you want to quickly fade to 0, you have to figure out a generalized way to do it.

In this case, you can use an interpolation function. You have this now:

if (thisComp.layer("Null 8").transform.rotation<103) 1.4 else 0

but if you a softer "out" for that returned value, you can use an interpolation function:

linear(thisComp.layer("Null 8").transform.rotation,103,110,1.4,0)

Translation to English: as the rotation value of Null 8 goes from 103 to 110, change my output from 1.4 to 0 linearly. (You can replace linear() with ease() for a softer in and out.)

Walter Soyka
Principal & Designer at Keen Live
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
RenderBreak Blog - What I'm thinking when my workstation's thinking
Creative Cow Forum Host: Live & Stage Events


Return to posts index

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