Home · Lab · Tracking & Matchmove

TR5 Lens distortion: undistort, then redistort only the CG

Straighten the lens, then send the CG through the same lens as the plate

Tracking & Matchmove · ~9 min · In pack $15

1 Your mission

~9 min

solve the lens so the line bend is at most 0.5 px, then redistort the CG so the edge cones are off by no more than 1 px over the shot.

Watch the grid lines near the frame edge against the dashed straight reference line, not the centre. Turn on View undistorted to see what k does, then judge by the edge cones while the shot plays.

SkyVFX Lab · TR5interactive · 1001

2 Why it works

Every lens distorts: straight lines bend more the closer they are to the frame edge. CG rendered from a camera with no lens fits the plate in the centre but slides at the edges.

Set Picture to Grid chart (same lens) and move k until the line bend is close to 0. Then go back to the plate, set CG path to Redistort CG with your k and play the shot. Compare the edge-cone readout with the centre one: with no lens, the edge cones are off by up to about 12 px and the centre cone by about 0.6 px.

plate → undistort (track only) · CG → redistort → over untouched plate

Where the numbers come from: A 48-frame handheld shot (640×360) rendered in Blender (Cycles) through our desert set, with a green screen on a pole and a drone flying across. Frame 1 is the still plate’s camera. Every true position comes from the scene’s own 3D. Computed in your browser. The distortion is a teaching lens we applied ourselves (one radial term, k = 0.06, scaled so the corners stay inside the render); real lenses need the solver’s own model. The “no lens” CG uses a camera whose focal absorbed the lens’s central magnification, as a solve without a lens model would (a teaching approximation). The cones’ true positions come from the camera of our own rendered scene.