PDA

View Full Version : Motion Tracking


Cobra8472
05-10-2008, 09:06 PM
I'm creating a lot of layers that basically need the same motion tracking applied to them. So, i basically motion track the base layer, and apply it to the first layer. Then copy that, delete the keyframes and apply the motion tracking again.

Rinse repeat for all layers.

I'm wondering if there is an easier way to do this? The problem with just C/P it (I think anyways) is because they're going to play at diffirent times, so if I just move the layer along the timeline the motion tracking applied to it isnt going to be correct?

Is there a way to get the keyframes for the motion tracking to kind of "offset" themselves based on where I on the timeline I put the layer?

Kind of hard to formulate, so I'm unsure if you'll understand :D



Thanks!

Mylenium
05-11-2008, 09:48 AM
Kind of hard to formulate, so I'm unsure if you'll understand :D


Use expressions. Something with .valueAtTime() will do al lyou want. All you need to define is a time offset. So assuming your master layer always starts at the composition star time, something like this might work:

mTrack=thisComp.layer("Master").motionTracker("Tracker 1")("Track Point 1").featureCenter
tOffset=thisLayer.inPoint-thisComp.DisplayStartTime;

X=mTrack.valueAtTime(tOffset)[0];
Y=mTrack.valueAtTime(tOffset)[1];

[X,Y]

Should give you all you need and alow you to slide your layers wherever you want without ever copying a keyframe. Just adjust the references to the master layer according to you current setup.

Mylenium

dwigfor
05-17-2008, 07:13 AM
Create a null ("BG_TRACKER", for instance), and target the null for your motion tracking. Then you simply parent the layers to the null.

kerbouci
05-17-2008, 07:49 AM
Create a null ("BG_TRACKER", for instance), and target the null for your motion tracking. Then you simply parent the layers to the null.

That seems more easy, but if the layers are 3d, they all must be aligned with the null along the Z axis.

Cobra8472
05-17-2008, 02:09 PM
Ugh, this really seems overly complicated. Is there really no default function in After Effects to achieve such a thing?

I haven't even began to touch the After Effects scripting language..

dwigfor
05-17-2008, 06:44 PM
Cobra, have you tried my method? It's super easy and very flexible. It's how I always do my tracking. Create null, motion track to the null, parent layers to null, done. You can offset your layers however you want.


If you do have 3D layers, I think changing the null to 3d layer handles that.

Cobra8472
05-18-2008, 12:11 AM
Cobra, have you tried my method? It's super easy and very flexible. It's how I always do my tracking. Create null, motion track to the null, parent layers to null, done. You can offset your layers however you want.


If you do have 3D layers, I think changing the null to 3d layer handles that.

I shall try it in a second!



Thanks to everyone for the tips btw!!

mackdadd
05-18-2008, 12:54 AM
I agree, parenting to a null is the way to go. Then you can slide your parented layers around all you want, and the motion won't shift.

CGTalk Moderation
05-18-2008, 12:54 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.