Oh dear my CG render have perfect perspective
So you have the awesome 3D model, texturing and lighting work but then you need to distort the renders to fit into the original plates that is shot using a lens with noticeable lens distortion.
This is where the Lens Distortion node comes in to assist through the process.
I assume you have already undistort the original plates before you tracked it using CameraTracker. Tracking a plate with noticeable distortion will going to skew the accuracy of the actual matchmove camera and scene so be warned.
Here’s the link to the official documentation of using LensDistortion since I’ll not be explaining every single parameters and prefer to share what works and doesn’t works from my experience.
4 ways to analyse
There are a few way to generate the distortion data:
- Image Analysis – Track the footage and let LensDistortion figure out the amount (you need to input a roto mask for moving objects/talents)
- Grid Analysis – Useful if you have shot a checkerboard or grid chart from a tripod. You can print this PDF created by Andersson Technologies LLC aka the creator of SynthEyes 3D tracking software.
- Line Analysis – Manually place a line that traces a known straight line in real life but is distorted in the plate
- Trusting your eyes and judgement – Eyeball the distortion manually aka your last resort if there is no solid straight object to refer (it is meant to be a tongue-in-cheek method but it works if your shot is mainly green/blue screen and you have no absolute way to know the focal length of the lens model)
Distortion Analysis Time!
^The above GIF shows the live action shot that I need to analyse so I can undistort it and ensure the line are straight as possible.
^From there I took the data and use it to undistort the CG render. Observe what happened if we just apply the undistorted information from the live action plate and see it actually become inverted fisheye which is wrong (or unless you desire such effect). Just invert the data and we have the desire result.
Practical uses of distorting CG render
Well it depends on how accurate you want to blend the CG render into your shot. Even if you plan to insert CG character only, it helps to distort it so it fit naturally into the original live action plate. For complete CG background, I recommend applying the lens distortion and with the right amount of chromatic aberration.
Although be warned that distorting the plate will result in less data in the final composition. You will need to ensure that you perform an overscan of your tracked camera so that you have extra safe area that you can use after applying the distortion data.