2 Replies Latest reply on Jul 20, 2008 6:38 PM by idolum

# Poor man's matchmove

I've been racking my brains trying to figure out a way to make this work. I seem to vaguely remember that there is a way to do it, but I can't figure it out.

I've got great cornerpin data for a square TV screen in a orbiting dolly shot . I can track an image onto the screen just fine, but what if I want to make it appear as though the image were floating *in front* of the screen. It doesn't help that the distance between the screen and the camera does change over the course of the shot.

Can this be done with what amounts to a 2D cheat? Or is there alternatively a way to deduce 3D data from the corner-pins? Or am I up a creek? :-)

Cheers!
• ###### 1. Re: Poor man's matchmove
No, not really. Without the camera actually being 3D, there is no way to logically deduce a projection matrix. Ergo you would have to mimic the camera motion using a Null and possibly have a reference point in the middle of the screen that would allow to calculate an offset along the view axis. Still, you should be able to get a sufficient illusion by offsetting the corner pins along an imaginary motion vector, which would be the inverse of the camera motion in 2D screen space. Something as simple as:

//===begin expression===

cPoint=effect("Corner Pin")("Upper Left");//reference point

cOffset=effect("Offset")("Slider"); //slider expression control

X=cPoint[0]+Math.sin(cAngle)*cOffset;
Y=cPoint[1]+Math.cos(cAngle)*cOffset;

[X,Y]

//===end expression===

You can then simply animate the expression controls. You may also wish to add a multiplier for the offset, so you can make it a little less on the points facing aways from the camera to improve the perspective experience.

Mylenium
• ###### 2. Re: Poor man's matchmove
A simple cheat would be to make sure your anchor point is in the middle of the TV as it relates to the dolly move and scale your image up -- easiest to do by parenting your track layer to a null, getting it's anchor point set (and offsetting the position in the opposite direction) and scaling it up a bit.

I'd have to try it but I can't immediately think of a reason why it wouldn't probably suffice.