Return-Path: Received: from atl4mhob06.myregisteredsite.com ([209.17.115.44] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP id 5356073 for AE-List@media-motion.tv; Fri, 24 Jan 2014 00:49:23 +0100 Received: from atl4webmail05 ([10.30.71.162]) by atl4mhob06.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id s0NNrTqG012684 for ; Thu, 23 Jan 2014 18:53:29 -0500 Received: from 220.233.147.134 (chris@chriszwar.com [220.233.147.134]) by atl4webmail05 (Netsol 11.2.30) with WEBMAIL id 30419; Thu, 23 Jan 2014 23:53:29 +0000 From: "Chris Zwar" To: "After Effects Mail List" Importance: Normal Sensitivity: Normal Message-ID: X-Mailer: Network Solutions Webmail, Build 11.2.30 X-Originating-IP: [220.233.147.134] X-Forwarded-For: [(null)] X-Authenticated-UID: chris@chriszwar.com Date: Thu, 23 Jan 2014 23:53:29 +0000 Subject: Re: [AE] distribute layers in Z space - but keep =?windows-1252?Q?=22relative=22?= positions MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit 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 "relative" 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