Workflows
Lens Distortion and Comp
Straighten the plate, give yourself overscan, and build the delivery comp that bends the render back.
Real lenses bend straight lines. Blender's camera doesn't, and neither does any other CG renderer. So somewhere in the pipeline the two have to be reconciled.
The usual way to do it: straighten the plate, do all your 3D work on the straightened version, then bend the render back to match the original before you comp it. The plate you deliver is always the untouched original with CG sitting on top of it.
The Full Pipeline
Footage
-> Convert Footage -> Import as Footage
-> Auto Track (solve, which gives you the lens)
-> Lens Distortion (Undistort + overscan)
-> Output 3D -> Import to Scene
-> Output Comp -> Setup Compositor
Both output nodes take the same Scene track, so they hang off the same socket.
Solve first. The solve is what produces the distortion values, so Lens Distortion has something to work from.
Straightening The Plate
Add Lens Distortion and connect the Auto Track from your solve. Set Mode to
Undistort, then press Process Footage.
Use Preview Current Frame first to check a single frame before committing to the whole shot.
If you have lens values from somewhere else, feed a Lens Data input instead of the
Auto Track. Connecting one hides the other, since they're two ways of answering the
same question.
Overscan
Straightening a plate pushes the corners outward. With Same Size, anything that moves past the frame edge is simply gone, and you'll see it later when your CG has nothing to sit on near the edges of the re-distorted render.
| Fit Mode | What it does |
|---|---|
| Same Size | Keeps the original frame size. You lose whatever the warp pushes outside. |
| Auto Overscan | Works out how far the warped pixels go and grows the canvas to fit. |
| Manual Overscan | Grows it by a fixed percentage per side. |
Auto Overscan is the safe default. Use Manual when you need a specific number, usually because someone downstream asked for one.
Overscan isn't only about not losing pixels. It gives your CG somewhere to exist outside the original frame, which matters once the render gets bent back and the edges pull in.
The Overscan Camera
When you press Import to Scene on the Output 3D node, and there's an undistorting Lens Distortion in the chain, the camera comes in set up for the overscanned plate:
- Sensor width scaled by the overscan factor
- Lens shift set from the principal point, so the optical center stays put
- The undistorted sequence loaded as the camera background
- Render resolution set to the overscan size
So your renders come out bigger than the plate, on purpose. That extra edge is what gets consumed when the render is re-distorted.
Building The Comp
On the Output Comp node, press Setup Compositor.
You get a compositor tree that takes the original plate, not the undistorted intermediate, puts the render through a re-distort warp, and lays it over the top at the plate's own resolution.
The warp lives in a node group called Re Distort, with an image in and an image out. You can drop that group into any other comp you build. A second group, Un Distort, is created alongside it but left unwired, for whenever you need to straighten something by hand.
Rebuilding reuses groups of the same name and only repoints their maps, so any tweaks you made inside them survive. If your compositor already has nodes that Dope Track didn't create, it asks before replacing anything.
Warnings You Might See
"The render only covers X% of the plate." The lens is wide enough that the straightened frame can't reach the plate edges. Raise the overscan if you need CG out there.
"Camera zooms but the lens pipeline uses one static distortion." The shot has more than one keyed focal length, and the distortion is solved once for the whole shot. Frames furthest from the solve will be approximate.
"Reformat changed the aspect." The ST map assumes a uniform resize, so a resize that changes the aspect ratio will stretch the result.
Other Settings
Interpolation matters more than it looks. Bicubic is the standard for plate warps. Lanczos keeps the most detail but can ring on hard edges. Linear is fast and slightly soft. Use Nearest for masks and data images, where blending pixel values would be wrong.
Output format is PNG for lossless, JPEG for smaller files, EXR for float.
Fisheye (Equidistant) switches how the coefficients are read, for genuine fisheye lenses.
Focal px, CX, CY let you override what the solve worked out, if you have better numbers.
Reformat resizes the result after the warp and overscan are done, not before.
Going The Other Way
Set Mode to Distort to apply distortion to an already-straight sequence. That's
the manual version of what the comp's Re Distort group does, useful when you're
delivering frames rather than a Blender comp.