Mailing List AE-List@media-motion.tv ? Message #43526
From: Byron Nash <byronnash@gmail.com>
Subject: Re: [AE] Expressions: Decay after trigger
Date: Wed, 9 May 2012 13:30:37 -0400
To: After Effects Mail List <AE-List@media-motion.tv>
With the amount of layers I have that sounds like it might become taxing to go back to every frame. I want to have a null that moves over layers revealing them. When it gets close, I'd like the opacity to increase and then as it leaves I'd like to have a defined falloff on the opacity instead of distance. I guess I could bake the keyframes and extend out the back of the animation. But where's the fun in keyframes? ;)

On Wed, May 9, 2012 at 12:38 PM, Dan Ebberts <debberts@comcast.net> wrote:
If there isn’t a direct relationship between distance and opacity, you’re going to need a more complex expression. For example, you may want to trigger a fade in when you get within a certain distance and trigger a fade out (at a different rate) when it moves a certain distance away. In that type of expression, you have to loop back in time, frame-by-frame, to find the most recent triggering event. It’s hard to say exactly what you need without more detail though.
 
Dan
 
From: Byron Nash
Sent: Wednesday, May 09, 2012 7:42 AM
Subject: [AE] Expressions: Decay after trigger
 
I am writing an expression to bring the opacity of a layer up when it another layer comes close to it. I'd like to have it decay at a different rate than it builds. Here's what I have going on:
 
o = transform.opacity;
s = thisComp.layer("center").transform.scale[0]/100; //use the scale to affect the radius of influence of the null
l = length(transform.position, thisComp.layer("center").transform.position);
lprev = length(transform.position.valueAtTime(time-thisComp.frameDuration), thisComp.layer("center").transform.position.valueAtTime(time-thisComp.frameDuration));
if(lprev > l){
  l = lprev;
}
o - (l/s);
 
 
My attempt to look at the previous frame doesn't seem to be working.

 
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to ListMaster