Vision node
Mask Grow
Grow or shrink the coverage of any mask or matte. Mask Grow is a morphological dilate/erode with an optional feather, computed on the GPU with a separable distance transform so edges stay smooth with no banding. Use it to thicken a thin silhouette, pull a matte in to hide fringing, or build a soft falloff around a shape.
Inputs
| Port | Type | Default |
|---|---|---|
| ImageThe mask or matte to morph — a segmentation silhouette, an image used as a mask, or any generator texture. | image | — |
| EnableOff passes the source mask through unchanged. | bool | true |
| AmountPositive expands the mask edge outward, negative eats it inward, 0 leaves it alone. Not clamped, but the reach saturates near ±2 of the frame height. | float | 0 |
| FeatherSoftens the resulting edge. Negative values are treated as 0; useful roughly 0…2, and it shares the same reach limit as Amount. | float | 0 |
| QualitySampling density of the edge scan, Low through Ultra. Clamped to those four steps; higher looks smoother and costs more GPU. | int | 1 |
| ShapeThe brush the edge grows with — Round keeps corners soft, Square keeps them boxy. Clamped to those two. | int | 0 |
| ChannelWhich channel counts as coverage: Alpha for real mattes, Luminance for black-and-white pictures used as masks. Clamped to those two. | int | 0 |
| OpacityFades the resulting matte. Not clamped, but only 0…1 is meaningful. | float | 1.0 |
Outputs
| Port | Type |
|---|---|
| ImageThe mask or matte to morph — a segmentation silhouette, an image used as a mask, or any generator texture. | image |
| Width | float |
| Height | float |
Overview
Feed Mask Grow any image used as a mask — a Person Segmentation silhouette, a hand-painted matte, or any generator texture — and it expands or contracts the masked region by a signed Amount. Positive Amount pushes the outer edge outward (dilate); negative Amount pulls it inward (erode). The distance is measured in Grafit units against the source, so the effect is consistent regardless of resolution.
Under the hood the node computes a true distance transform in two separable passes (horizontal then vertical), which is why the result is smooth and round rather than blocky. The Shape control selects the distance metric: round produces circular, evenly rounded growth, while square produces axis-aligned, boxy growth. The grow always holds the frame edge — content that reaches the border is not clipped or pulled away artificially as the mask expands.
Examples
- Thicken a silhouette — Set a small positive Amount on a Person Segmentation matte to bulk out the subject before colouring it.
- Choke fringing — Use a small negative Amount to pull a matte inward and hide a halo or colour fringe around a cut-out edge.
- Soft falloff — Pair a positive Amount with a Feather to create a gradual glow region around a shape.
- Boxy expansion — Switch Shape to Square for hard, axis-aligned growth on UI or grid-like masks.
- Luminance masking — Set Channel to Luminance to grow a mask defined by brightness rather than alpha.
- Smooth edges — Raise Quality to Ultra when you need the cleanest possible rounded edge with no banding.
Open Mask Grow in the interactive catalog →
Mask Grow 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.