Return-Path: Received: from mail-qe0-f44.google.com ([209.85.128.44] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 5053873 for AE-List@media-motion.tv; Sun, 28 Apr 2013 23:07:37 +0200 Received: by mail-qe0-f44.google.com with SMTP id w7so3739435qeb.3 for ; Sun, 28 Apr 2013 14:16:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=tyf+44FtjjfUdtdufoRqc+yfBXLrhmbIczNZWi6sVMg=; b=tJc3CEI/ti3CORrLBHBI1o/jPYTXMLPOFNG/nt9rcTF2VP7peIb1azrr2FvRcosBmP r4oImh14dJ02BxKoc4WTRK82yv2Vjy9EAJtD9z4teSTU0mycgheYy+SC4jg0Tfc67oHk T55uaOhpr9FMxQvunANu7soP/+Pv+sJAR7Pluqs1kn6I9+uJomUDI7n5oPauEv3x848D kYUzCVkqicXczuwcAINH2B0J47Zpcd3EW2PNI2Bdr2kFCgf1gzw31GgpDI9j3tHTRAkV cj3AI06421hDTbEuUIkeYvL2817Z5AM1aEGLCCEK0azpOkTkMbsxUUCdkidE9zzvooo+ KCgw== MIME-Version: 1.0 X-Received: by 10.49.35.132 with SMTP id h4mr43526032qej.29.1367183765559; Sun, 28 Apr 2013 14:16:05 -0700 (PDT) Received: by 10.229.118.33 with HTTP; Sun, 28 Apr 2013 14:16:05 -0700 (PDT) In-Reply-To: References: Date: Sun, 28 Apr 2013 16:16:05 -0500 Message-ID: Subject: Re: [AE] Offset along motion path? From: Brian Behm To: After Effects Mail List Content-Type: multipart/alternative; boundary=047d7b6778a6b07dbc04db72467e --047d7b6778a6b07dbc04db72467e Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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. 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? 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. > > Thanks, Dan. > > 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 >> *Sent:* Sunday, April 28, 2013 1:28 PM >> *To:* After Effects Mail List >> *Subject:* [AE] Offset along motion path? >> >> Hey everybody, >> quick question that's been confounding me. I have a race track >> simulation I'm developing for an info graphic and I have two representat= ive >> 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 l= ock >> them into a specific time so that I can animate the offset along the pat= h. >> Sort of like how Trapcode 3D stroke can animate along a portion of the >> path. >> >> 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? >> >> Brian >> >> >> Brian Behm | Art Director >> Rooster Teeth Productions >> 636 Ralph 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 > --=20 not getting enough of my blather? check out http://flabbyironman.blogspot.com or my portfolio at http://behmcreative.com --047d7b6778a6b07dbc04db72467e Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable
OK. I've got that up and working. I gave the null obje= ct 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 d= oesn't seem to be working since it's grabbing it's position fro= m the slider instead of position.=A0

Dan, I'm looking at your auto-orientation script here=A0= 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){

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

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

}else{

=A0 c =3D 0;

}

[radiansToDegrees(a),radiansToDegrees(b),radiansToDegrees(c)]


I'm not sure how to pass the value from the original ex= pression 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 e= xpression. 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?=A0

Brian Behm | Art Director
R= ooster Teeth Productions
636 Ralph Ablanedo
Austin, TX =A078748 office=A051= 2-480-0336
mobile=A051= 2-965-7914


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

Thanks, Dan.=A0

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 with=20 a duration of 2 seconds. Then if you have a slider going from 0 to 100 to= =20 represent percentage of travel along the path, you can you use an expressio= n=20 like this for your triangle:
=A0
s =3D (your slider value);
thisComp.layer(=93Null 1=94).transform.position.valueAtTime(2*s/100)
=A0
Something like that.
=A0
Dan
=A0
From: Brian Behm
Sent: Sunday, April 28, 2013 1:28 PM
Subject: [AE] Offset along motion path?
=A0
Hey everybody,=20
=A0=A0 quick question that's been confounding me. I have a race tr= ack=20 simulation I'm developing for an info graphic and I have two representa= tive=20 triangles that I want to animate along the path. Because they're going = different=20 speeds, I want to be able to parent them to the path but not lock them into= a=20 specific time so that I can animate the offset along the path. Sort of like= how=20 Trapcode 3D stroke can animate along a portion of the path.
=A0
I know I can paste motion paths into After Effects, but that doesn'= ;t solve=20 what I want it to do. Is there a way to constrain motion to a path without= =20 constraining it to a specific time?
=A0
Brian
=A0

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




--
not getting = enough of my blather?
check out http://flabbyironman.blogspot.com
or my port= folio at http://behmc= reative.com



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