Happy Tuesday, loyal readers. Here's a quick one relating to a problem that popped up a few times for the students last week. This is for anyone taking who has tracked footage into Maya and finds their tracking markers don't line up, because they've forgotten one simple step.
Once you've got a ‘solve’ in 3D Equalizer the next step is to boot up Warp 4 to warp your footage in accordance to the lens distortion you've calculated. This program takes the backplate and reverses the distortion to create a flattened plate. We do this because Maya doesn't create lens distortion, so we need a flattened plate to create our CG. When we've finished the shot, we reapply that distortion to the CG meaning it will fit into the original plate.
The important thing to remember is that when you warp the original footage via Warp 4, it pulls the footage out along its side and corners, literally stretching the footage until its flat. This means you end up with a larger plate.
Now, the camera you solved in 3DE was tracking the original, unwarped, footage. So when you export that camera to Maya, then add your warped footage to the image plane, the tracking markers points won’t match up. This is because the scale of the camera no longer matches the scale of the footage after it has been warped.
So our camera is exported off the original footage, but we've warped the footage to get rid of the distortion, which makes it bigger. The bigger footage doesn't match the tracking points, so how do we solve this conundrum?
We have to scale the camera up to match the size of the new footage. To find out what number to scale it by, we need to know the size of the original backplate, and the new warped plate. For example, our original backplate may be 1920 x 1080, however our warped footage might be 2028 x 1140. If you divide the size of the warped footage by the size of the unwarped footage, you will get the scale rate, for example, 2028 divided by 1920 equals 1.05625. So if you select the camera you exported into Maya in the shape node you will see a 'Camera Scale' attribute, which will be 1 by default. Simply replace this with the number you just calculated (1.05625, or whatever your number was) and you will see that now your tracking points line up with your footage.
So just to recap - to allow your points to add up, you need to adjust the camera scale of your exported camera. You do this by dividing the size of your warped plate by your unwarped plate, then adding that number to 'Camera Scale'. Sorted!
If you have any ideas or problems you want to see blogged in the next Studio Workshop, sound off in the comments below. The first five go into a draw to win an Escape goodie bag full of long waits and headlight bulbs. (Please note; these goodie bags do not exist. You will win nothing but my affection. Buy your own damn bulbs.) Have a cracking week!