Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE AFTER EFFECTS: HomeForumBasicsExpressionsTutorialsPodcastsMotion GraphicsTrainingCinema 4DFAQ

Linking CC sphere to camera motion

Cow Forums : Adobe After Effects Expressions

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>
Linking CC sphere to camera motion
by Steve Dorsey on Jan 12, 2009 at 8:59:35 pm



lookAt(thisComp.activeCamera.position, position)[0]
lookAt(thisComp.activeCamera.position, position)[1]
lookAt(thisComp.activeCamera.position, position)[2]


Okay, please bear with me here. I'm (clearly) not an expressions guy, but I need to get this done asap.

I have a comp where I'm using CC sphere to "be" inside a spherical background. I want the background to move when the camera moves.

I posted to the adobe forums, and I got back a reference to a YouTube movie

http://www.adobeforums.com/webx/.59b77e3d/1

That script got me half way there.

My camera is parented to a null which is animated. The camera actually has no keyframes or expressions applied to it.

The current expression is applied to the CCsphere X Y and Z rotation attributes and links to the camera position:

lookAt(thisComp.activeCamera.position, position)[0]
lookAt(thisComp.activeCamera.position, position)[1]
lookAt(thisComp.activeCamera.position, position)[2]

This is great, but I need it to be linked to the rotation of the camera's null, not the position of the camera. I'm trying to figure this out with no success. Any ideas?

Thanks

----------S




Respond to this post   •   Return to posts index

cowcowcow
Re: Linking CC sphere to camera motion
by Dan Ebberts on Jan 12, 2009 at 11:03:33 pm

Try changing your expressions to this:

lookAt(thisComp.activeCamera.toWorld([0,0,0]),position)[0]

lookAt(thisComp.activeCamera.toWorld([0,0,0]),position)[1]

lookAt(thisComp.activeCamera.toWorld([0,0,0]),position)[2]


Dan



Respond to this post   •   Return to posts index

Re: Linking CC sphere to camera motion
by Trent Armstrong on Jan 14, 2009 at 6:33:11 pm

cam = -thisComp.layer("Camera 1").transform.xRotation;

nul = -thisComp.layer("Null 2").transform.xRotation;
cam + nul


Not trying to interfere with the genius of Dr. Ebberts, but the following code worked for me pretty well.

Trent

Trent Armstrong - Creative Cow Leader
http://www.dallasaeug.com

Respond to this post   •   Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSTUTORIALSMAGAZINETRAININGVIDEOS - REELSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]