Return-Path: Received: from qmta01.emeryville.ca.mail.comcast.net ([76.96.30.16] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP id 5053902 for ae-list@media-motion.tv; Mon, 29 Apr 2013 00:10:12 +0200 Received: from omta09.emeryville.ca.mail.comcast.net ([76.96.30.20]) by qmta01.emeryville.ca.mail.comcast.net with comcast id VXcU1l00C0S2fkCA1aJgE2; Sun, 28 Apr 2013 22:18:40 +0000 Received: from HPZ200 ([76.20.32.7]) by omta09.emeryville.ca.mail.comcast.net with comcast id VaGf1l00l09DSM08VaGgiz; Sun, 28 Apr 2013 22:16:40 +0000 Message-ID: <94C4C01D7BCE42E9A292F015C1B0B082@HPZ200> From: "Dan Ebberts" To: "After Effects Mail List" References: In-Reply-To: Subject: Re: [AE] Offset along motion path? Date: Sun, 28 Apr 2013 15:16:38 -0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0065_01CE4423.6174ED00" 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=1367187520; bh=1quISlmld+tdfuBi4WPW36bn0OqCaCISSoz8/2PZkw4=; h=Received:Received:Message-ID:From:To:Subject:Date:MIME-Version: Content-Type; b=q57h/mewGbVyQQzDji+1qU9RyV+FU1u63B+1CQDwAXgWkwLcXIdDlWqbfFTHRG2IS m3G4zt4RhIlK8Ht4Z9Rg07jE72q02hsJAWK/5OcQWlYWVkxvsQbDnfYmgtVOsLSGeg jrX4Hm3sGTIwdadeFmgrKDnue+wBTRHBAttjsAZ0eXQ8VRzeD+E7v89iegE0X6KLfd WZiPZCtVMu9yYZeqPGKSnokCvk82zxLC4zCD86poIYkbi52QartADEFt4T+IDVVWuY rAbzFDHTm7fwlM38qrXQI6jg7aXYstPs+SwlzEywTyc/xtx1wmZaL+yj1Z9T71axg2 A8RtWYYg2+rsg== This is a multi-part message in MIME format. ------=_NextPart_000_0065_01CE4423.6174ED00 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hmmm... To get that expression to work, I=92m guessing you=92d need to = use the optional time parameter for the layer space transforms and = specify the same time you=92re using to sample the null=92s position. = So, for example, if you=92re getting the null=92s position with = valueAtTime(t), you=92d have to do the same calculation for t in your = orientation expression and then modify all the transforms to use it, = like this: =20 fromWorldVec(L.toWorldVec([1,0,0],t),t); Hard to say for sure without seeing how you have it set up. Dan From: Brian Behm=20 Sent: Sunday, April 28, 2013 2:16 PM To: After Effects Mail List=20 Subject: Re: [AE] Offset along motion path? OK. I've got that up and working. I gave the null object motion path a = loopOutDuration so that I could have the driver go around and around the = track. Now the next problem I'm trying to squash is how to get the = object to auto-orient around the path. Normal auto orientation doesn't = seem to be working since it's grabbing it's position from the slider = instead of position. =20 Dan, I'm looking at your auto-orientation script here = http://forums.adobe.com/message/5196644 (pasted for convenience) L =3D thisComp.layer("other layer"); u =3D fromWorldVec(L.toWorldVec([1,0,0])); v =3D fromWorldVec(L.toWorldVec([0,1,0])); w =3D normalize(fromWorldVec(L.toWorldVec([0,0,1]))); sinb =3D clamp(w[0],-1,1); b =3D Math.asin(sinb); cosb =3D Math.cos(b); if (Math.abs(cosb) > .0005){ c =3D -Math.atan2(v[0],u[0]); a =3D -Math.atan2(w[1],w[2]); }else{ a =3D (sinb < 0 ? -1 : 1)*Math.atan2(u[1],v[1]); c =3D 0; } [radiansToDegrees(a),radiansToDegrees(b),radiansToDegrees(c)] I'm not sure how to pass the value from the original expression over to = the auto-orientation expression. My initial thought was to pass the = value derived from the first expression over to L in the second = expression. But watching what happens to L in the equation it seems like = it wants the layer itself to pull coordinates from After Effects world = space. Any suggestions?=20 Brian Behm | Art Director Rooster Teeth Productions 636 Ralph Ablanedo Austin, TX 78748 office 512-480-0336 mobile 512-965-7914 On Sun, Apr 28, 2013 at 3:43 PM, Brian Behm = wrote: that makes sense. Hadn't thought about driving it through an = expression/slider combo. =20 Thanks, Dan.=20 Brian On Sun, Apr 28, 2013 at 3:38 PM, Dan Ebberts = wrote: If you paste the path into a Null=92s position, you=92ll get a = motion path with a duration of 2 seconds. Then if you have a slider = going from 0 to 100 to represent percentage of travel along the path, = you can you use an expression like this for your triangle: s =3D (your slider value); thisComp.layer(=93Null 1=94).transform.position.valueAtTime(2*s/100) Something like that. Dan From: Brian Behm=20 Sent: Sunday, April 28, 2013 1:28 PM To: After Effects Mail List=20 Subject: [AE] Offset along motion path? Hey everybody,=20 quick question that's been confounding me. I have a race track = simulation I'm developing for an info graphic and I have two = representative triangles that I want to animate along the path. Because = they're going different speeds, I want to be able to parent them to the = path but not lock them into a specific time so that I can animate the = offset along the path. Sort of like how Trapcode 3D stroke can animate = along a portion of the path.=20 I know I can paste motion paths into After Effects, but that doesn't = solve what I want it to do. Is there a way to constrain motion to a path = without constraining it to a specific time?=20 Brian Brian Behm | Art Director Rooster Teeth Productions 636 Ralph Ablanedo Austin, TX 78748 office 512-480-0336 mobile 512-965-7914 --=20 not getting enough of my blather? check out http://flabbyironman.blogspot.com or my portfolio at http://behmcreative.com --=20 not getting enough of my blather? check out http://flabbyironman.blogspot.com or my portfolio at http://behmcreative.com ------=_NextPart_000_0065_01CE4423.6174ED00 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable
Hmmm... To get that expression to work, I=92m guessing you=92d need = to use the=20 optional time parameter for the layer space transforms and specify the = same time=20 you=92re using to sample the null=92s position. So, for example, if = you=92re getting=20 the null=92s position with valueAtTime(t), you=92d have to do the same = calculation=20 for t in your orientation expression and then modify all the transforms = to use=20 it, like this: 
 
fromWorldVec(L.toWorldVec([1,0,0],t),t);
 
Hard to say for sure without seeing how you = have it set=20 up.
 
Dan
 
From: Brian Behm
Sent: Sunday, April 28, 2013 2:16 PM
Subject: Re: [AE] Offset along motion = path?
 
OK. I've got that up and working. I gave the null object = motion=20 path a loopOutDuration so that I could have the driver go around and = around the=20 track. Now the next problem I'm trying to squash is how to get the = object to=20 auto-orient around the path. Normal auto orientation doesn't seem to be = working=20 since it's grabbing it's position from the slider instead of = position. =20
 
Dan, I'm looking at your auto-orientation script here http://forums.adobe.com/= message/5196644
(pasted for convenience)
 
L=20 =3D thisComp.layer("other layer");

u=20 =3D fromWorldVec(L.toWorldVec([1,0,0]));

v=20 =3D fromWorldVec(L.toWorldVec([0,1,0]));

w=20 =3D normalize(fromWorldVec(L.toWorldVec([0,0,1])));

sinb=20 =3D clamp(w[0],-1,1);

b=20 =3D Math.asin(sinb);

cosb=20 =3D Math.cos(b);

if=20 (Math.abs(cosb) > .0005){

 =20 c =3D -Math.atan2(v[0],u[0]);

 =20 a =3D -Math.atan2(w[1],w[2]);

}else{

 =20 a =3D (sinb < 0 ? -1 : 1)*Math.atan2(u[1],v[1]);

 =20 c =3D 0;

}

[radiansToDegrees(a),radiansToDegrees(b),radiansToDegre= es(c)]

 
I'm not sure how to pass the value from the original expression = over to the=20 auto-orientation expression. My initial thought was to pass the value = derived=20 from the first expression over to L in the second expression. But = watching what=20 happens to L in the equation it seems like it wants the layer itself to = pull=20 coordinates from After Effects world space. Any suggestions?
 
Brian=20 Behm | Art DirectorRooster=20 Teeth Productions636=20 Ralph AblanedoAustin,=20 TX  78748office=20 512-480-0336mobile=20 512-965-7914


On Sun, Apr 28, 2013 at 3:43 PM, Brian Behm = <flabbyironman@gmail.com> wrote:
that makes sense. Hadn't thought about driving it = through an=20 expression/slider combo. =20
 
Thanks, Dan.
 
Brian


On Sun, Apr 28, 2013 at 3:38 PM, Dan Ebberts = <debberts@comcast.net> wrote:
If you paste the path into a Null=92s position, you=92ll get a = motion path=20 with a duration of 2 seconds. Then if you have a slider going from 0 = to 100=20 to represent percentage of travel along the path, you can you use an = expression like this for your triangle:
 
s =3D (your slider value);
thisComp.layer(=93Null = 1=94).transform.position.valueAtTime(2*s/100)
 
Something like that.
 
Dan
 
Sent: Sunday, April 28, 2013 1:28 PM
Subject: [AE] Offset along motion = path?
 
Hey everybody,=20
   quick question that's been confounding me. I have = a race=20 track simulation I'm developing for an info graphic and I have two=20 representative triangles that I want to animate along the path. = Because=20 they're going different speeds, I want to be able to parent them to = the path=20 but not lock them into a specific time so that I can animate the = offset=20 along the path. Sort of like how Trapcode 3D stroke can animate = along a=20 portion of the path.
 
I know I can paste motion paths into After Effects, but that = doesn't=20 solve what I want it to do. Is there a way to constrain motion to a = path=20 without constraining it to a specific time?
 
Brian
 

Brian Behm | Art Director
Rooster Teeth Productions
636 = Ralph=20 Ablanedo
Austin, TX  78748
office 512-480-0336
mobile 512-965-7914

=

 
--
not getting enough of my blather?
check out = http://flabbyironman.blogspot.com
or my = portfolio at http://behmcreative.com

 
--
not getting enough of my blather?
check out = http://flabbyironman.blogspot.= com
or=20 my portfolio at http://behmcreative.com
------=_NextPart_000_0065_01CE4423.6174ED00--