Mailing List AE-List@media-motion.tv ? Message #42310
From: Darby Edelen <dedelen@gmail.com>
Subject: Re: [AE] script or expression help
Date: Sat, 25 Feb 2012 19:11:07 -0800
To: After Effects Mail List <AE-List@media-motion.tv>
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 <rachelmax@mac.com> 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

 
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to ListMaster