Lens Distort

Apply barrel, fisheye, or anamorphic lens distortion to images.

What it does

Lens Distort simulates camera optics: the barrel or pincushion bulge of a wide lens, the curve of a fisheye, the horizontal squeeze of an anamorphic. It works in screen space, remapping every pixel along a radial curve out from the optical centre.

Undistort runs the same model in reverse, which straightens footage that already carries lens distortion before an effect that expects a flat image.

When to use it

ParameterTypeDefaultWhat it does
content_inRaster——
modeString"Barrel"Lens distortion model. One of: Barrel, Fisheye, Anamorphic.
fisheye_modelString"Equidistant"Fisheye lens projection model. One of: Equidistant, Equisolid, Stereographic.
k1Number0Primary radial distortion coefficient (positive=barrel, negative=pincushion)
k2Number0Secondary radial distortion coefficient
k3Number0Tertiary radial distortion coefficient
fovNumber180Field of view in degrees
squeezeNumber2Horizontal squeeze ratio (2.0 = standard anamorphic)
center_xNumber0Horizontal offset of the optical center
center_yNumber0Vertical offset of the optical center
edge_modeString"Transparent"How to handle pixels sampled outside image bounds. One of: Transparent, Clamp, Repeat, Mirror.
undistortBooleanfalseUndistort: reverse the lens distortion to straighten the image
spatial_strengthField—Spatial field controlling where the effect applies (0=bypass, 1=full)
strengthNumber1Effect strength / wet-dry (0 = no effect, 1 = full). Editable, wirable, keyframable.

Gotchas

Mode picks the whole distortion model and hides the controls that do not apply. Barrel shows k1, k2 and k3; Fisheye shows Fisheye Model and Field of View; Anamorphic shows Squeeze. Switching Mode does not clear the hidden values, it takes them out of play until you switch back.

Edge Mode decides what happens where a remapped sample falls outside the image. Black cuts it to transparent or black, Clamp stretches the edge pixels, Repeat tiles, Mirror reflects. A strong barrel or fisheye warp can pull a lot of the frame past its bounds, so the choice matters more as distortion increases.

For Barrel and Pincushion, k1 alone carries most of the look: positive bulges outward (barrel), negative pinches inward (pincushion). k2 and k3 refine the curve further out toward the edges. Leave them at 0 until finer control is needed.

Worked example

  1. Add a Lens Distort node and wire an image into Content In.

  2. Set Mode to Fisheye, raise Field of View toward 180°, and try each Fisheye Model to compare the projection curve.

  3. If the result crops out too much of the frame, switch Edge Mode to Clamp or Mirror instead of Black.

  4. To reverse the effect, for instance to undo a real fisheye lens on footage, enable Undistort and match Mode and coefficients to the original lens.

See also

Displace · Warp · Panoramic · Rasters (images)