Skip to main content
Participant
October 17, 2023
Question

Blending/linking between two tracks from mocha

  • October 17, 2023
  • 2 replies
  • 477 views

Can anyone tell me if this is possible?  I need to link an overlay to the motion of a phone. At the same time the director wants me to dynamically link the movement of the phone and the handheld motion of the camera. Ideally I would be able to use a slider to control the amount of handheld motion and phone motion. 

This topic has been closed for replies.

2 replies

Mylenium
Legend
October 17, 2023

It would probably make a lot more sense if you massaged your tracks in mocha's own graph editor rather than trying to do this in AE then for the simple reason that every time you change one item you need to compensate the other one to prevent drifting. You could end up having a ton of keyframes on your sliders and the math could get complicated. Start with the camera, have the director pin down the motion and based thereon track the screen.

 

Mylenium

Mylenium
Legend
October 17, 2023

That probably doesn't make a lot of sense since you get weird inbetween motions when combining a 3D camera track and a 2D track, but technically it would be simple. Something like this:

 

mBlend=thisComp.layer("XYZ").effect("Slider");

mCam=thisComp.layer("Camera").transform.position;

mPhn=thisComp.layer("Phone").motionTracker("Tracker 1")("Track Point 1").featureCenter;

 

linear(mBlend,0,100,mCam,mPhn);

 

You probably need to accoundt for the 3D vs. 2D stuff and of course you would need to repeat it for every point and other properties such as rotation.

 

Mylenium

paulcarpAuthor
Participant
October 17, 2023

Thanks for the answer, 

I fear this is way above my paygrade! Would it make it easier if I just did a 2d camera track. I think the effect the director wants is to balance out any jerky hand movements by increasing the influence of the camera track of the background (if that makes any sense.)