Vision node
Mask Outline
Extract the outline — the contour stroke — of any mask or matte. Mask Outline keeps the band of pixels within Thickness of the mask's edge and outputs it as a clean white, premultiplied matte. It is effectively a morphological-gradient outline with adjustable feather, stroke alignment, and an Invert option, ready to colour, glow, or use as a Canvas mask.
Inputs
| Port | Type | Default |
|---|---|---|
| ImageThe mask or matte to trace — a segmentation silhouette, an image used as a mask, or any generator texture. | image | — |
| EnableOff outputs nothing, so the contour disappears. | bool | true |
| ThicknessWidth of the contour stroke. Negative values are treated as 0; not clamped upward, but the stroke stops widening near 2 of the frame height. | float | 0.05 |
| FeatherSoftens both sides of the stroke. Negative values are treated as 0; useful roughly 0…2. | float | 0 |
| PositionWhere the stroke sits relative to the mask edge — Center straddles it, Inside stays within the shape, Outside hugs it from outside. Clamped to those three. | int | 0 |
| ShapeDistance metric for the stroke — Round follows the silhouette smoothly, Square keeps corners boxy. Clamped to those two. | int | 0 |
| ChannelWhich channel counts as coverage: Alpha for real mattes, Luminance for black-and-white pictures. Clamped to those two. | int | 0 |
| QualitySampling density of the edge scan, Low through Ultra. Clamped to those four steps; higher is smoother and costs more GPU. | int | 1 |
| InvertFlips the result, so the outline becomes a hole in a filled matte instead of a stroke on empty space. | bool | false |
| OpacityFades the resulting matte. Not clamped, but only 0…1 is meaningful. | float | 1.0 |
Outputs
| Port | Type |
|---|---|
| ImageThe mask or matte to trace — a segmentation silhouette, an image used as a mask, or any generator texture. | image |
| Width | float |
| Height | float |
Overview
Connect any image used as a mask — a segmented silhouette, a hand-made matte, or any generator texture — and Mask Outline returns just the edge: a stroke that traces the boundary between masked and unmasked regions. The width of that stroke is set by Thickness, and Feather softens it for a glow-ready falloff.
The Position control sets where the stroke sits relative to the original edge. Center straddles the edge, Inside keeps the stroke entirely within the masked region, and Outside pushes it into the surrounding transparency. Shape selects the round or square distance metric, Channel chooses whether the mask is read from alpha or luminance, and Quality trades GPU cost for edge smoothness. Invert flips the result so everything except the outline is filled.
Examples
- Neon outline — Outline a Person Segmentation silhouette, colour the stroke, and feed it through a Bloom for a glowing rim around the subject.
- Inside vs outside stroke — Use Position = Inside to keep the stroke on the subject, or Outside to draw it in the surrounding space, like a sticker border.
- Soft contour glow — Add Feather to turn the hard stroke into a soft halo following the mask edge.
- Boxy edge — Switch Shape to Square for a hard, axis-aligned outline on UI or grid masks.
- Inverted fill — Turn on Invert to fill everything except the outline, e.g. to knock a thin line out of a solid.
- Luminance contour — Set Channel to Luminance to outline a region defined by brightness rather than alpha.
Open Mask Outline in the interactive catalog →
Mask Outline is one of 381 nodes in Grafit Pro.
Free download. Every feature for 7 days, no card. Then €99.99 once — or keep playing your projects as a Player.