Skip to content

Barrel Distortion

Warps an image radially to simulate lens barrel (bulge) or pincushion (pinch) distortion.

Category: Effects Menu path: Effects > Barrel Distortion

Ports

PortTypeDirectionDescription
inimageRgba16finputInput image
outimageRgba16foutputDistorted result

Parameters

ParamTypeDefaultDescription
amountscalar0.0Distortion strength. Positive = barrel (bulge, content pushes outward); negative = pincushion (pinch, content pulls inward). Useful range ~ -1 to 1. Keyframeable.
zoomscalar1.0Scales the result about the center so distorted corners stay in frame. Values above 1 zoom in (crop edges); below 1 zoom out. Keyframeable.

Expose Channels

When enabled (E button on node header), adds input ports that override params via edge connections:

PortTypeOverrides
amount_inscalaramount

How It Works

For each output pixel the shader builds a centered, aspect-corrected coordinate c = uv - 0.5 (with x scaled by the comp's width/height ratio so the warp is radially symmetric on non-square comps). It computes the squared radius r2 = dot(c, c), applies the distortion c' = c * (1 + amount * r2) / zoom, undoes the aspect correction, and samples the input at 0.5 + c'. Pixels whose source coordinate falls outside the frame become transparent. All coordinate math uses the comp resolution (not the render resolution), so the result is identical across Draft / Preview / Full quality. When amount is 0 and zoom is 1 the node is a pure passthrough and the GPU pass is skipped.

Usage Examples

Basic: Lens bulge

  1. Add a Barrel Distortion node after your footage or render
  2. Set amount to ~0.3 for a gentle fisheye-style bulge
  3. Raise zoom slightly (e.g. 1.1) to hide the transparent corners that the bulge pulls in

Creative: Pincushion correction

  1. Set amount to a small negative value (e.g. -0.2) to counteract a barrel-distorted source
  2. Adjust zoom to recover any cropped edges

Advanced: Animated lens breathing

  1. Enable expose channels and connect an Oscillate or Time-driven Math node to amount_in
  2. Animate a subtle ±0.05 wobble for a handheld / organic lens feel

Tips

  • The distortion is strongest at the corners (largest radius) and near zero at the center
  • Increase zoom whenever a positive amount introduces transparent corners
  • Because the effect samples within the existing frame, it does not expand layer bounds — pair with a Transform2D scale-up first if you need more source coverage
  • UVRemap — arbitrary UV-space distortion driven by a map texture
  • ChromaticAberration — per-channel fringing that pairs well with lens distortion for a realistic lens look
  • Transform2D — affine scale/position/rotation without radial warping

Caddis — professional motion design.