Return-Path: Received: from mail-wi0-f180.google.com ([209.85.212.180] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 5291634 for AE-List@media-motion.tv; Tue, 19 Nov 2013 22:01:54 +0100 Received: by mail-wi0-f180.google.com with SMTP id hm4so550253wib.13 for ; Tue, 19 Nov 2013 13:03:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=q18VjNMT31Ki/O3H3Kn0cfIHSSRYgJ2nPZTGCEelKMg=; b=uzKhn6mFOUwC/RLvjMEC1DWCHkxdOAeAawqDVpLfij/nPxdXHzjwUx66rfRYqKvCBn Sxd2l3hK5rBtDQkXa+OUTfKWv3T859BaaUnAbz3vlIGQEld8AuqG2kW2wAvLOUBPuj7f 9HEU03U9sim0qM1lyYbIZ5yqOLc4O/uwD4rxR6Be6oIr3HIWzqgZeQtOMRVvW+AjLS3U kbe4VzhehcLqa9/XOx5AIymmchLLQYSY4+DonmiXP002MLu/PvHaq6Q8JIA7UeqqwldR bmx4uSlPfp5i4DzLEolmZag4pLVTlmjkcCra/1Ya8rxPR0YpY7j8NaL0qY4n+wxnbAbL QKLQ== MIME-Version: 1.0 X-Received: by 10.194.1.139 with SMTP id 11mr22291242wjm.33.1384895034030; Tue, 19 Nov 2013 13:03:54 -0800 (PST) Received: by 10.194.71.163 with HTTP; Tue, 19 Nov 2013 13:03:53 -0800 (PST) In-Reply-To: References: Date: Tue, 19 Nov 2013 16:03:53 -0500 Message-ID: Subject: Re: [AE] Expression to orient a layer to same direction a Camera From: rendernyc To: After Effects Mail List Content-Type: multipart/alternative; boundary=047d7b3a8c308e00de04eb8e001b --047d7b3a8c308e00de04eb8e001b Content-Type: text/plain; charset=ISO-8859-1 you can parent a null to your camera and then L=thisComp.layer("Null "); L.toWorld(L.anchorPoint) will give you the position On Tue, Nov 19, 2013 at 3:49 PM, Robert Kjettrup wrote: > Ok... i got the paralell orientation to work like i wanted, but have now > stumbled over another problem related to this. > > I now need it to work with the camera parented to a null. Should be > relatively simple, right? > use toWorld to get the absolute position of the camera set as a child of > the 3d null, or that is how i understood that toWorld worked. But i cant > get it to return the correct values. > Put the following expression on a 3d Point Control on any layer, and have > a 3d camera parented to a 3d null. > > cam = thisComp.activeCamera; > cam.toWorld(cam.position) > > this gives back some position that seems totally wrong. > I have tried toWorld, fromWorld, toWorldVec... etc and nothing gives back > the absolute position of the camera in the world space. > Is there something i just dont understand with this, or??? > > - Robert > > > > 2013/11/18 Robert Kjettrup > >> doh...!!! >> Dead simple when i figured it out. >> >> Just use the built in expression function LookAt, but put in the camera >> position and its target into the fromPoint and atPoint instead of the >> layers own position and the camera position. >> Of course i figure this out soon after i had sent the mail before after >> having struggled with way too complex expressions :-D >> >> just a head-up to anyone that might find this useful info :-) >> >> - Robert >> >> -- danny princz vimeo.com/rendernyc --047d7b3a8c308e00de04eb8e001b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
you can parent a null to your camera and then

L=3DthisComp.layer("Null ");

L.toWorld(L.anchorPoint)


will give you the position


On Tue, Nov 19, 2013 at 3:49 PM, Robert Kje= ttrup <robert@stvmayday.dk> wrote:
=
Ok... i got the paralell orientation to work like i wanted, but have = now stumbled over another problem related to this.

I now need it to work with the camera parented to a n= ull. Should be relatively simple, right?
use toWorld to get the absolute position of the camera set as a child= of the 3d null, or that is how i understood that toWorld worked. But i can= t get it to return the correct values.=A0
Put the following expression on a 3d Point Control on any layer, and = have a 3d camera parented to a 3d null.

cam =3D thisComp.activeCamera;
cam.toWorld(cam.position)

this gives back some position that seems totally wrong.
I have tried toWorld, fromWorld, toWorldVec... etc and nothing gives back t= he absolute position of the camera in the world space.
Is there = something i just dont understand with this, or???

- Robert



2013/11/18 Robert = Kjettrup <robert@stvmayday.dk>
doh...!!!
Dead simple when i figured it out.

Just use th= e built in expression function LookAt, but put in the camera position and i= ts target into the fromPoint and atPoint instead of the layers own position= and the camera position.
Of course i figure this out soon after i had sent the mail before afte= r having struggled with way too complex expressions :-D

just a head-up to anyone that might find this useful info :-)

- Robert

<= /div>



--
--047d7b3a8c308e00de04eb8e001b--