Mailing List AE-List@media-motion.tv ? Message #51684
From: Robert Kjettrup <robert@stvmayday.dk>
Subject: Re: [AE] Expression to orient a layer to same direction a Camera
Date: Tue, 19 Nov 2013 22:30:11 +0100
To: After Effects Mail List <AE-List@media-motion.tv>
Hi

thanks, yes that works.

to me it looks like the same i did directly with the camera? But somehow it works with the nulls linked to the camera that is linked to another null, but the cameras own data doesnt return the same toWorld values... hmmm?

Now i just need to use 2 extra nulls in my setup instead of using the position and point of interest directly from the camera. 

thanks again, i can continue work now :-)

- Robert


2013/11/19 rendernyc <rendernyc@gmail.com>
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 <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 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 <robert@stvmayday.dk>
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




--

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