Return-Path: Received: from mail-vw0-f41.google.com ([209.85.212.41] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 4637624 for AE-List@media-motion.tv; Sun, 26 Feb 2012 04:04:33 +0100 Received: by vbip1 with SMTP id p1so2621917vbi.28 for ; Sat, 25 Feb 2012 19:11:08 -0800 (PST) Return-Path: Received-SPF: pass (google.com: domain of dedelen@gmail.com designates 10.52.22.69 as permitted sender) client-ip=10.52.22.69; Authentication-Results: mr.google.com; spf=pass (google.com: domain of dedelen@gmail.com designates 10.52.22.69 as permitted sender) smtp.mail=dedelen@gmail.com; dkim=pass header.i=dedelen@gmail.com Received: from mr.google.com ([10.52.22.69]) by 10.52.22.69 with SMTP id b5mr4279606vdf.32.1330225868555 (num_hops = 1); Sat, 25 Feb 2012 19:11:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=/+QSXJFLLRp1IThuXoPNXjHjEWpNPD5eT5Hu1QY3vxU=; b=Dkt6mE0yyZ+4XHm1QpDVq8Cqi1M9+j/R4ol3iQ1udH7K/dTBXwDOzq+qKqQw1JAaNg IaovbQZ9/2EPKfCvPVCbWGLnINT32KLuBSZ712FlQDiNncdVL4s3VnDNbzoE1OfOzR5m DnW7nLRxQXADatwrbEGc9wrRUlHU8b4vanK2g= MIME-Version: 1.0 Received: by 10.52.22.69 with SMTP id b5mr3436158vdf.32.1330225867610; Sat, 25 Feb 2012 19:11:07 -0800 (PST) Received: by 10.220.32.207 with HTTP; Sat, 25 Feb 2012 19:11:07 -0800 (PST) In-Reply-To: References: Date: Sat, 25 Feb 2012 19:11:07 -0800 Message-ID: Subject: Re: [AE] script or expression help From: Darby Edelen To: After Effects Mail List Content-Type: multipart/alternative; boundary=20cf307abcaf4f5c1604b9d5584d --20cf307abcaf4f5c1604b9d5584d Content-Type: text/plain; charset=ISO-8859-1 Just in case anyone wants to play with an expression. This one requires an active comp camera and can be applied to the layer's scale: c = thisComp.activeCamera; cp = c.toWorld([0,0,0]); cv = c.toWorldVec([0,0,1]); z = c.cameraOption.zoom; p = toWorld(anchorPoint); d = Math.abs(dot(cv, cp - p)); value * d/z; This would keep the layer scaled to the same size regardless of both its position as well as the camera's. If you'd like the camera animation to affect the perceived distance to the layer then you could base the scale on a reference time, in the below example the reference time (rt) is 0: rt = 0; c = thisComp.activeCamera; cp = c.toWorld([0,0,0], rt); cv = c.toWorldVec([0,0,1], rt); z = c.cameraOption.zoom.valueAtTime(rt); p = toWorld(anchorPoint); d = Math.abs(dot(cv, cp - p)); value * d/z; -D On Sat, Feb 25, 2012 at 1:29 PM, Rachel Max wrote: > Thanks! These are exactly what I am looking for. > > > On Feb 25, 2012, at 1:26 PM, scott.aelist wrote: > > Here's a script Paul Tuersley wrote: > http://aescripts.com/pt_multiplane/ > > > > > On Feb 25, 2012, at 1:21 PM, Chris Meyer wrote: > > In addition to standalone solutions others may propose (it's not too hard > of an expression), it's also part of Zaxwerks Layer Tools: > http://zaxwerks.com/layertools/details.shtml > > - Chris > > > > On Feb 25, 2012, at 1:20 PM, David Torno wrote: > > There is actually a plugin that does that called Layers Tools by Zaxwerks. > zaxwerks.com/layertools/index.shtml > > David Torno > Visual Effects Artist & Supervisor > http://www.ghosttownmedia.com > O: 213.739.2290 > C: 818.391.6060 > --------------------- > http://www.sydefxink.com > http://aeioweyou.blogspot.com > http://mactex.blogspot.com > > "The most useless day is that in which we do not laugh" > -Charles Field > > --20cf307abcaf4f5c1604b9d5584d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Just in case anyone wants to play with an expression.=A0 This one requires = an active comp camera and can be applied to the layer's scale:

<= div style=3D"margin-left:40px">c =3D thisComp.activeCamera;
cp =3D c.toW= orld([0,0,0]);
cv =3D c.toWorldVec([0,0,1]);
z =3D c.cameraOption.zoom;
p =3D toWorl= d(anchorPoint);
d =3D Math.abs(dot(cv, cp - p));
value * d/z;

= This would keep the layer scaled to the same size regardless of both = its position as well as the camera's.=A0 If you'd like the camera a= nimation to affect the perceived distance to the layer then you could base = the scale on a reference time, in the below example the reference time (rt)= is 0:

rt =3D 0;
c =3D thisComp.activeCamer= a;
cp =3D c.toWorld([0,0,0], rt);
cv =3D c.toWorldVec([0,0,1], rt);z =3D c.cameraOption.zoom.valueAtTime(rt);
p =3D toWorld(anchorPoint);=
d =3D Math.abs(dot(cv, cp - p));
value * d/z;

-D

On Sat, Feb = 25, 2012 at 1:29 PM, Rachel Max <rachelmax@mac.com> wrote:
Thanks! =A0These are exactly what I am = looking for.


On Feb 25, = 2012, at 1:26 PM, scott.aelist wrote:

He= re's a script Paul Tuersley wrote:
http://ae= scripts.com/pt_multiplane/



On Feb 25, 2012, at 1:21 PM, Chris Meyer wrote:

In addition to standalone solutions others may pro= pose (it's not too hard of an expression), it's also part of Zaxwer= ks Layer Tools:
= http://zaxwerks.com/layertools/details.shtml

- Chris



O= n Feb 25, 2012, at 1:20 PM, David Torno wrote:

There is actually a plugin that does tha= t called Layers Tools by Zaxwerks. zaxwerks.com/layertools/index.shtml
David Torno
Visual Effects Artist & Supervisor
http://www.ghosttownmedia.com=
O: 213.739.2290
C: 81= 8.391.6060
---------------------
http://www.sydefxink.com
http://aeioweyou.blogspot.com http://mactex.blog= spot.com

"The most useless day is that in which we do not l= augh"
-Charles Field

--20cf307abcaf4f5c1604b9d5584d--