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

ParameterTypeDefault
content_inOneOf([FieldOf(Raster)])
modeString"Barrel"
fisheye_modelString"Equidistant"
k1Number0
k2Number0
k3Number0
fovNumber180
squeezeNumber2
center_xNumber0
center_yNumber0
edge_modeString"Transparent"
undistortBooleanfalse
spatial_strengthField
strengthNumber1

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)