Return-Path: Received: from mail-bk0-f41.google.com ([209.85.214.41] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 4710390 for AE-List@media-motion.tv; Wed, 09 May 2012 19:29:21 +0200 Received: by bkcjm19 with SMTP id jm19so537668bkc.28 for ; Wed, 09 May 2012 10:30:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=/0qJWtdh70n+u/SV7Mlpat/J91rrrB77jIYKF1g3IJ8=; b=qtca/ppsYUNK2FfwegOnaCHlDpM4w7braBNCqaEu0OXCRWlVval1LF38iQKfaBp+7F MQD4PZDJXjs3UKClXWcAOdZhAPjSpdcws5YN0bIhObz8uSBLAe9i/JuiYxtgO3KMvekR 6vQIWHTMMoJxynATdz9kzBp8jutoK2NWzJwrUbxEUjLp12ubZx6zCPEAs/EzujeDbxPv YWaz+wXWk+0uyoWRQHfiB8WPLe/lMBC1h5YWHlZZAJOCrlC0aJOQudlgk7R6H4AinpXv 1bYWCOZVkJCPPP/6XVRAxk84c93waBoXqDzvEBeG2zCcfQ20cMt4W5AW3czD9qSEJYrZ fxSQ== Received: by 10.204.155.148 with SMTP id s20mr361876bkw.56.1336584657688; Wed, 09 May 2012 10:30:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.232.81 with HTTP; Wed, 9 May 2012 10:30:37 -0700 (PDT) In-Reply-To: References: From: Byron Nash Date: Wed, 9 May 2012 13:30:37 -0400 Message-ID: Subject: Re: [AE] Expressions: Decay after trigger To: After Effects Mail List Content-Type: multipart/alternative; boundary=000e0cdf7408bbd9d004bf9ddd10 --000e0cdf7408bbd9d004bf9ddd10 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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 wrote: > If there isn=92t a direct relationship between distance and opacity, > you=92re going to need a more complex expression. For example, you may wa= nt > 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, t= o > find the most recent triggering event. It=92s hard to say exactly what yo= u > need without more detail though. > > Dan > > *From:* Byron Nash > *Sent:* Wednesday, May 09, 2012 7:42 AM > *To:* After Effects Mail List > *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 =3D transform.opacity; > s =3D thisComp.layer("center").transform.scale[0]/100; //use the scale to > affect the radius of influence of the null > l =3D length(transform.position, > thisComp.layer("center").transform.position); > lprev =3D > length(transform.position.valueAtTime(time-thisComp.frameDuration), > thisComp.layer("center").transform.position.valueAtTime(time-thisComp.fra= meDuration)); > if(lprev > l){ > l =3D lprev; > } > o - (l/s); > > > My attempt to look at the previous frame doesn't seem to be working. > --000e0cdf7408bbd9d004bf9ddd10 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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 revea= ling them. When it gets close, I'd like the opacity to increase and the= n as it leaves I'd like to have a defined falloff on the opacity instea= d of distance. I guess I could bake the keyframes and extend out the back o= f 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=92t a direct relationship between distance and opacity, y= ou=92re=20 going to need a more complex expression. For example, you may want to trigg= er a=20 fade in when you get within a certain distance and trigger a fade out (at a= =20 different rate) when it moves a certain distance away. In that type of=20 expression, you have to loop back in time, frame-by-frame, to find the most= =20 recent triggering event. It=92s hard to say exactly what you need without m= ore=20 detail though.
=A0
Dan
=A0
From: Byron Nash
Sent: Wednesday, May 09, 2012 7:42 AM
Subject: [AE] Expressions: Decay after trigger
=A0
I=20 am writing an expression to bring the opacity of a layer up when it another= =20 layer comes close to it. I'd like to have it decay at a different rate = than it=20 builds. Here's what I have going on:=20
=A0
o =3D transform.opacity;<= /div>
s =3D=20 thisComp.layer("center").transform.scale[0]/100; //use the scale = to affect the=20 radius of influence of the null
l =3D length(transform.position,= =20 thisComp.layer("center").transform.position);
lprev =3D=20 length(transform.position.valueAtTime(time-thisComp.frameDuration),=20 thisComp.layer("center").transform.position.valueAtTime(time-this= Comp.frameDuration));
if(lprev > l){
=A0 l =3D lprev;
}
o - (l/s);
=A0
=A0
My attempt to look at the previous frame doesn't seem to be workin= g.=20

--000e0cdf7408bbd9d004bf9ddd10--