I’ve managed to “eyeball it” to a solution. But I was hoping for future reference if anyone has a better technique to apply that would be greatly appreciated.
I have a top down (birds eye view) shot of someone lying on the ground, with the camera spinning. I tracked the shot and applied a bunch of masks to cut out various foreground elements. And now I want to replace the background. The trouble comes in applying the tracking data.
As my shot is rotating, any layer that matches the comp’s dimensions will rotate and leave black information. I solved this by precomposing the bg replacement layer, and making it much larger than the 1920x1080 final comp. This way when rotating it there is data to reference that is “off screen”. But I can’t get this effect without precomposing the layer, and then applying transform data, and then using collapse transformations. This brings back in the data from the lower layer, but keeps the transform information. The problem here I found, is that the recorded camera has some sheer and perspective change while it’s recording, and that turns the transform data to be close, but has an obvious “just not right” quality to it (the outer parts of the bg are moving too fast compared to the inner parts, and you can tell it’s a cut out on top of a bg element). My solution was to use the corner pin data to get the better movement with the sheer and perspective adjustments. The problem then goes back to the comp sizes, and showing no information as the BG element rotates. So in mocha I expanded the “show planar surface” tool, so that it was ‘eyeballed’ about the right size as the size of the background layer. Then went back to AE. Hit create tracking data. Saw it needed to be bigger / smaller, and went back in and adjusted until it was almost the same (the bg element is atleast 2x bigger in both dimensions, and I couldn’t figure out how to make it so the show planar tool would line up with those corner points). This creates the problem that the size of the image isn’t matchable. So I precomposed the BG element, so that I could adjust the scale property without affecting the track data layer. This I again had to eyeball so that the layer seemed right.
The next problem was after I applied this I saw my whole layer shift up and to the left. I figured out that this is because the corner pin data being created is in reference to the original clip, which is 1920x1080 with 0,0 at the top left corner. When it applies to the new clip, I get -2000,-2000 or what ever for the new top left. The problem is this is now in reference to the larger background element, which already has a top left coordinate of say -1000,-1000. So to fix it, I again, “eyeballed it” so that the underlying layer corner and the 1920x1080 layer top left corners aligned. This I got within atleast a pixel or two accuracy, but it took some fidgeting. After writing this, I think I could have simplified this using the align tool.
The whole process as a thing seems pretty wonky as I don’t have precise control of where the BG element will end up, and the exact size of it. Just not “pixel perfect” for something that is just getting things to align perfectly. I think there might be a way that I could have carried through measurements or something and ensured it was exactly correct? But I’m not sure.
I was wondering if anyone would be able to give some advice as to how they would approach this problem and solve it, with this tool, or with any others. Just looking for alternate ideas. Happy to answer any follow up questions if I haven’t explained my issue clear enough.
Thanks very much for any help you can provide!