I use Boujou, so take this with a grain of salt:
1 (Optional) Print a big distortion grid onto paper, have it laminated so it’s rigid, shoot this grid on set using the same focal length as your FX shot, this will be used to figure out the distortion later.
1.5. Import your distortion grid footage (Or just a still from the video) into Boujou, use the lens distortion tool to draw a few lines over my footage, and then adjust until all the grid lines are straight like my drawn lines. Write down the distortion amount.
-
FILE>NEW and import your plate footage. Go to the lens distortion options, but instead of drawing lines, etc, just input the number you wrote down in step 1.5.
-
With the plate distorted (Make sure the RADIAL checkbox is selected in the right-hand pane) click EXPORT> IMAGE SEQUENCE and choose your file format, and directory to save your distorted footage. This is the footage we will be camera tracking in the next step. Exporting the footage distorted may take some time.
-
After Boujou has exported your sequence, FILE>NEW again, and now import the distorted sequence you just created. You’ll notice that because of the correction, your footage frame may be larger than before, so a 1920x1080 clip may resize to 2110x1120 or whatever. This is normal. Simply motion track this footage as you normally would, bring it into your 3D app of choice, and rest easy knowing a straight line in CG will be straight on your plate.
IMPORTANT:: NOTE THE HEIGHT AND WIDTH OF YOUR PLATE AFTER DISTORTING. YOUR CG MUST BE RENDERED OUT AT THIS SAME SIZE. Remember that since your plate is now larger than it was originally, your CG must be rendered out at the SAME RESOLUTION AS THE PLATE AFTER DISTORTION.
- After your CG is rendered, you’re going to need to take each pass and run it through Boujou again, where there is an option to RE-DISTORT footage. Import your CG, and Boujou will distort it the exact opposite of what it did to the plate. This will resize your CG to the proper 1920x1080 frame size, and it can now be composited on top of your original undistorted plate footage.
This is my workflow, you may chose not to use the distortion grid if you’ve got a lot of straight line on set, but for nature shots where there aren’t 90 degree angles everywhere they’re a life saver.
EDIT: I’ve used After Effect’s Optical Compensation before and found it to be inferior to Boujou’s built in tools. Remember to turn all Optical/Electronic image stabilization OFF on your camera before shooting as well, they shift the lens around a tiny bit inside the camera, which affects the optical center of the lens, which will screw with how distorted parts of your scenes are at any one time.