Skip to content

Edge Detect

Detects edges in an image using Sobel convolution, producing a line-art or outline effect.

Category: Effects Menu path: Effects > Edge Detect

Ports

PortTypeDirectionDescription
inimageRgba16finputInput image
outimageRgba16foutputEdge-detected result

Parameters

ParamTypeDefaultDescription
strengthscalar1.0Edge intensity multiplier. Higher values make faint edges more visible. Keyframeable.
modeenumLuminanceDetection mode. Luminance: single-channel Sobel on perceptual brightness. RGB: independent Sobel per color channel.

Expose Channels

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

PortTypeOverrides
strength_inscalarstrength

How It Works

The shader samples a 3x3 neighborhood around each pixel and applies the Sobel operator in both X and Y directions to compute horizontal and vertical gradients. The edge magnitude is sqrt(gx^2 + gy^2), scaled by the strength parameter.

In Luminance mode, the Sobel is computed once on the perceptual luminance (Rec. 709), producing a grayscale edge map. In RGB mode, each color channel gets its own Sobel pass, so edges between colors of similar brightness (e.g. red/green) are still detected.

Usage Examples

Basic: Line-art outline

  1. Add an Edge Detect node after your image source
  2. Set strength to 1.0 and mode to Luminance
  3. The result is a white-on-black edge map

Creative: Colored edge glow

  1. Use RGB mode to detect color-boundary edges
  2. Feed the result into a Glow node to make the edges bloom
  3. Composite over the original with Merge (Add) for a neon outline look

Advanced: Animated edge reveal

  1. Keyframe strength from 0 to 2 to progressively reveal edges
  2. Use Invert to get dark edges on a white background
  3. Feed into a Matte node to use edges as a compositing mask

Tips

  • Blur the input slightly before edge detection to suppress noise and get cleaner edges
  • Strength values above 2-3 can cause clamping -- the shader clamps output to [0, 1]
  • RGB mode produces color edges; Luminance mode produces grayscale -- choose based on downstream usage
  • Sharpen -- enhances existing detail without extracting edges
  • Blur -- pre-blur input to get cleaner edge detection
  • Invert -- flip edge colors (dark edges on light background)

Caddis — professional motion design.