ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

shifting the point of interest

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mark Doctor
shifting the point of interest
on Aug 27, 2018 at 9:01:18 pm
Last Edited By Mark Doctor on Aug 28, 2018 at 5:02:13 am

I've placed a 3D-cube in front of AE's camera and it lines up with the 2D-background by using the 3D-camera-tracking. Now I want to zoom in on the cube

By turning the background into a 3D-layer and parent it to the camera-position, I've succeeded to pan and tilt the camera and zoom towards the cube. But...

Once zoomed-out, I need to set the point of interest towards the (constant moving) background. And zoomed-in I need to set the point of interest towards the 3D-cube.

So i was thinking of an expression which gradual transforms between both positions. Like a position-A to -B transformation with a percentage slider that can be key-framed.

But I guess it has been done before and i'm not that great at expressions. Also I maybe overlooked some simpeler solution.

Thanks for any input, Mark


Return to posts index

Kalleheikki Kannisto
Re: shifting the point of interest
on Aug 29, 2018 at 12:22:04 pm
Last Edited By Kalleheikki Kannisto on Aug 29, 2018 at 12:22:46 pm

How about using a position-keyframed 3D null object for the point of interest, pick-whipping the camera POI to it?

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Mark Doctor
Re: shifting the point of interest
on Aug 29, 2018 at 7:11:21 pm

Solved! Key-framing a null wasn't an option; The null would need a key-frame at every frame just like the camera, to keep up with the background parented to the camera.



//3D point expression:

A = thisComp.layer("BackGround");
AW= A.toWorld(A.anchorPoint);

//vector expression:
A = effect("Point A")("3D Point");
B = effect("Point B")("3D Point");

//vector to B
C = B - A;

// 1% vector
D = effect("Slider Control")("Slider")*C/100;

// point A & vector added
E = A + D;


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]