Mailing List AE-List@media-motion.tv — Message #52654
From: Rachel Max <rachelmax@mac.com>
Subject: [AE] distribute layers in Z space - but keep "relative " positions
Date: Thu, 23 Jan 2014 16:00:59 -0800
To: <AE-List@media-motion.tv>
THANK YOU ALL AGAIN!

I love this list.

â¤

- Rachel


On Jan 23, 2014, at 3:53 PM, Chris Zwar <chris@chriszwar.com> wrote:

> Here's the expression I use - apply to a 3D layer's scale value, assuming your camera is called "Camera 1"
>
> campos=thisComp.layer("Camera 1").toWorld([0,0,0]); // camera position //
> zoom=thisComp.layer("Camera 1").cameraOption.zoom; // camera zoom //
> lpos=thisLayer.toWorld(thisLayer.anchorPoint); // layer position //
> lscl=thisLayer.transform.scale; // layer scale //
>
> d=length(campos,lpos); // distance from layer to camera //
>
> xscl=lscl[0];yscl=lscl[1];zscl=lscl[2];
> x=(d/zoom)*xscl;
> y=(d/zoom)*yscl;
> z=(d/zoom)*zscl;
>
> [x,y,z]
>
>
> Basically, the camera's lens is measured in pixels and called "zoom".  A layer will appear 100% of it's size (i.e. normal) when its distance from the camera is the same as the "zoom" value.
>
> That expression calculates the distance in world space, so not affected by parenting, and takes into account the scale values already applied to the layer.
>
> -Chris
>
> -----Original Message-----
> From: Rachel Max [mailto:rachelmax@mac.com]
> Sent: Friday, January 24, 2014 10:16 AM
> To: 'After Effects Mail List'
> Subject: [AE] distribute layers in Z space - but keep &quot;relative&quot; positions
>
> Hi again, in the vein of the anamorphic illusions - is there a script or trick to affect the Z of a layer, but have it appear as if it hasn’t moved by scaling it and changing it’s position?
>
> I’ve been eyeballing it but that has to be an easier way or some math I can do.
>
> Thanks,
> Rachel
>
>
>
>
> +---End of message---+
> To unsubscribe send any message to <ae-list-off@media-motion.tv>


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