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
| Port | Type | Direction | Description |
|---|---|---|---|
in | imageRgba16f | input | Input image |
out | imageRgba16f | output | Edge-detected result |
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
strength | scalar | 1.0 | Edge intensity multiplier. Higher values make faint edges more visible. Keyframeable. |
mode | enum | Luminance | Detection 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:
| Port | Type | Overrides |
|---|---|---|
strength_in | scalar | strength |
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
- Add an Edge Detect node after your image source
- Set strength to 1.0 and mode to Luminance
- The result is a white-on-black edge map
Creative: Colored edge glow
- Use RGB mode to detect color-boundary edges
- Feed the result into a Glow node to make the edges bloom
- Composite over the original with Merge (Add) for a neon outline look
Advanced: Animated edge reveal
- Keyframe strength from 0 to 2 to progressively reveal edges
- Use Invert to get dark edges on a white background
- 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