Return-Path: Received: from qmta10.emeryville.ca.mail.comcast.net ([76.96.30.17] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP id 5372726 for ae-list@media-motion.tv; Mon, 10 Feb 2014 23:42:34 +0100 Received: from omta05.emeryville.ca.mail.comcast.net ([76.96.30.43]) by qmta10.emeryville.ca.mail.comcast.net with comcast id QggD1n0070vp7WLAAmnEf8; Mon, 10 Feb 2014 22:47:14 +0000 Received: from HPZ200 ([24.10.59.135]) by omta05.emeryville.ca.mail.comcast.net with comcast id QmnD1n00v2v3gNo8RmnEaf; Mon, 10 Feb 2014 22:47:14 +0000 Message-ID: <5F63963ACA9146D7B08F5F41A252569E@HPZ200> From: "Dan Ebberts" To: "After Effects Mail List" References: In-Reply-To: Subject: Re: [AE] Fwd: [AE] scale expression Date: Mon, 10 Feb 2014 14:47:14 -0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0122_01CF266E.FCDCF1B0" X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 15.4.3555.308 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3555.308 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1392072434; bh=jUpovz9en1ZcSwXozHn7SfECxrA1UjYtODC8JE9EpGA=; h=Received:Received:Message-ID:From:To:Subject:Date:MIME-Version: Content-Type; b=d6g8wptpaQaA70TjIkLF53cCaeWh4nKtVv8JorZFkx62GJt3tEOVQEwUrP2mIvsCA 4TTmijWK/FIWNxB+yfggLcnoEAtiLB0t3tnFrpg2Hz2WGV+R9FLGqifN6hCrr+ASjl aKcDjkMzi8B93Tg9RsDWfEi9s7MRfnS+0OE3Tl2KVS6oqg2gimU5oQPuJSGoWCb6YC S3FRYsjliKnlfxnIIeXa0t+I1r6FqhMubv9eMt9APREzNKQZrc6xUbmsQ/q+EJpZCm /iR52Z5qLBhqrgubuufhVZNMeXeaxPwFI2vUn4PunCReAVWz7xwr8flPEXFY151UFG F+hkglfcEil1Q== This is a multi-part message in MIME format. ------=_NextPart_000_0122_01CF266E.FCDCF1B0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Something like this then: s =3D thisComp.layer("Layer A").transform.scale; if (s.numKeys > 0){ if (time > s.key(s.numKeys).time) s else value; }else value Dan From: Rachel Max=20 Sent: Monday, February 10, 2014 2:37 PM To: After Effects Mail List=20 Subject: [AE] Fwd: [AE] scale expression Yes!=20 It has 2 keyframes - 0 and then100 with the decay expression: amp =3D .03; freq =3D 3.0; decay =3D 7; n =3D 0; if (numKeys > 0){ n =3D nearestKey(time).index; if (key(n).time > time){ n--; }} if (n =3D=3D 0){ t =3D 0; }else{ t =3D time - key(n).time; } if (n > 0){ v =3D velocityAtTime(key(n).time - thisComp.frameDuration/10); value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t); }else{value} On Feb 10, 2014, at 2:30 PM, Dan Ebberts wrote: Does Layer A have scale keyframes? If so, would it make sense for = Layer B to follow Layer A after a particular keyframe (like last or = next-to-last)? Dan -----Original Message----- From: Rachel Max Sent: Monday, February 10, 2014 2:18 PM To: After Effects Mail List Subject: Re: [AE] scale expression That=92s good Dan but the Layer B isn=92t decaying properly because it = needs to go below 100 for that. I was thinking of making it time based but I=92d still be in the same = boat. Thanks, Rachel On Feb 10, 2014, at 12:20 PM, Dan Ebberts = wrote: This should case layer B's scale to follow Layer A, only when A's = scale is larger than B's: s =3D thisComp.layer("Layer A").transform.scale; [Math.max(s[0],value[0]),Math.max(s[1],value[1])] Dan -----Original Message----- From: Rachel Max Sent: Monday, February 10, 2014 12:01 PM To: After Effects Mail List Subject: [AE] scale expression Happy Monday, I have layer A that is scaling from 0 to 100 - and then has a nice = decay thanks to an expression from Dan. I have layer B that I=92d like to be synced up with layer A (going = past 100 and then have the decay) - however layer be is already on the = screen and I only want to the scale past 100 and then bak to 100 with = the decay. What would you suggest dear kind list? Thanks, Rachel +---End of message---+ To unsubscribe send any message to +---End of message---+ To unsubscribe send any message to +---End of message---+ To unsubscribe send any message to =20 +---End of message---+ To unsubscribe send any message to ------=_NextPart_000_0122_01CF266E.FCDCF1B0 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable
Something like this then:
 
s =3D thisComp.layer("Layer A").transform.scale;
if (s.numKeys > 0){
  if (time > s.key(s.numKeys).time) s else value;
}else
  value
 
Dan
 
From: Rachel Max
Sent: Monday, February 10, 2014 2:37 PM
Subject: [AE] Fwd: [AE] scale expression
 
Yes!=20
 
It has 2 keyframes - 0 and then100 with the decay expression:
 
amp =3D=20 .03;
freq =3D=20 3.0;
decay =3D=20 7;
n =3D=20 0;
if=20 (numKeys > 0){
n =3D=20 nearestKey(time).index;
if=20 (key(n).time > time){
n--;
}}
if (n =3D=3D=20 0){ t =3D 0;
}else{
t =3D time=20 - key(n).time;
}
if (n=20 > 0){
v =3D=20 velocityAtTime(key(n).time - thisComp.frameDuration/10);
value +=20 v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{value}
 
 
On Feb 10, 2014, at 2:30 PM, Dan Ebberts <debberts@comcast.net> = wrote:
Does Layer A have scale keyframes? If so, = would it=20 make sense for Layer B to follow Layer A after a particular keyframe = (like=20 last or next-to-last)?

Dan


-----Original = Message----- From:=20 Rachel Max
Sent: Monday, February 10, 2014 2:18 PM
To: After = Effects=20 Mail List
Subject: Re: [AE] scale expression

That=92s good = Dan but the=20 Layer B isn=92t decaying properly because it needs to go below 100 for = that.

I was thinking of making it time based but I=92d still be = in the=20 same boat.

Thanks,
Rachel


On Feb 10, 2014, at = 12:20 PM,=20 Dan Ebberts <debberts@comcast.net> = wrote:

This should case layer B's scale  to = follow=20 Layer A, only when A's scale is larger than B's:

s =3D=20 thisComp.layer("Layer=20 = A").transform.scale;
[Math.max(s[0],value[0]),Math.max(s[1],value[1])]=

Dan

-----Original=20 Message----- From: Rachel Max
Sent: Monday, February 10, 2014 = 12:01=20 PM
To: After Effects Mail List
Subject: [AE] scale=20 expression

Happy Monday,

I have layer A that is = scaling from 0=20 to 100  - and then has a nice decay thanks to an expression = from=20 Dan.

I have layer B that I=92d like to be synced up with = layer A (going=20 past 100 and then have the decay) - however layer be is already on = the=20 screen and I only want to the scale past 100 and then bak to 100 = with the=20 decay.

What would you suggest dear kind=20 list?

Thanks,
Rachel
+---End of message---+
To = unsubscribe=20 send any message to <ae-list-off@media-motion.tv>

+---End=20 of message---+
To unsubscribe send any message to <ae-list-off@media-motion.tv>



+---End=20 of message---+
To unsubscribe send any message to <ae-list-off@media-motion.tv>=20

+---End of message---+
To unsubscribe send any message to = <ae-list-off@media-motion.tv>
 
 
------=_NextPart_000_0122_01CF266E.FCDCF1B0--