Occasionally, but not often enough I need undistorted plates for tracking, 3D and compositing. Because of this
I noted down this little workflow to help out my memory when it was again too long ago…
The undistorted grid. Using the ,LensDistortion‘ node in NukeX with Grid Analysis.
This undistorted sequence gets cropped, ignoring that some pixels are cut off at all edges. to 1920×1080 and
passed over to the 3D tracking software.
One workaround is to adjust the horizontal and vertical aperture of the tracked camera and multipy it by a factor. For this
example I use the factor of 1.1. If your fov was 35mm, it now becomes 35/1.1=31.818181818mm.
Also increase the render size in the 3D application with the same factor. The new render size will be 2112×1188 pixels.
Applying again the lens distortion in Nuke will stretch the edges of the frame, but not in the important 1920×1080 area.
Then use a 2D transformation after the distortion to match the frame center of the 1920×1080 and the 2112×1188 rendering. The center of the HD frame is at 960×540. A transform of x= – 96 and y=- 54 pixels is needed when using a overscan factor of 10%.