View Full Version : 3D Tracking: Lens Distortion Workflow
09-04-2009, 07:30 PM
I would like to know which kind of workflow do you use when you have lens distortion in your footage? I'm dealing with a shot with a considerable amount of distortion and after solving the lens, I realized that I had no idea of how to distort the plate once more after the 3D was composed.
I discovered a workflow using AE and the Optic Compensation effect, where you have to distort the plate manually using a reference (already distorted) exported from you 3D tracking app. As I'm not a AE user I though that I could ask here before having to dive into this approach.
I'm currently a Shake and PF Track user, but can deal with other apps if necessary.
09-05-2009, 01:05 PM
shake has a built in lens distortion tool, but a lot of people use hype:
09-07-2009, 01:42 PM
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.
2. 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.
3. 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.
4. 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.
5. 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.
09-08-2009, 12:51 AM
Thanks for step-by-step. I'm a bit rusty when it comes about Boujou, but it's nothing that a couple of hors in front of the computer won't solve. I wasn't familiar with the tool that you mentioned on the fifth item, otherwise I would have done it on Boujou straight away.
Now I'm a bit curious, is there any PF Track user around here that could tell me if there's any similar tool in it?
I guess I'll be heading to Boujou then, thanks once more!
04-09-2010, 11:46 PM
Thanks so much for the step-by-step. I was initially trying to skip one step by simply tracking my HD1080 footage before exporting it with the lens correction. Then exporting in a size around 2000x1126 with lens correction to create the 3D elements.
Afterwards I bring the 3D renders back into boujou in at that larger size (2000x1126) to do the Adjust-Lens-Corr export, however I keep getting an error at this stage; "Sensor Invalid". And I can't do the adjust-export at all.
I then tried your method above - exporting the footage right after i do the lens corr and before I actually track anything. then re-importing the foorage to do the tracking - then onto 3d and then import the 3d renders back in again at the larger size. but I still get that funny error. i have no idea what it means, and I can find no documentation of it what so ever. :blush:
Any advice very much appreciated. Thanks in advance! :wavey:
04-09-2010, 11:46 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.