Shrink Node
- Category: Masking
- Edition: All editions
- Output type: Mask
- Typical place in a graph: after a mask, to pull its edges inward before texturing or spawning
Shrink pulls a mask inward. Each iteration, the selected area loses a little ground along its edges, so islands get smaller, thin strips and specks disappear, and narrow links between areas break. Use it to keep something away from an edge: trees that stop short of the forest border, grass that leaves a gap before the rock, snow that stays off the lower rim of a slope.

When to use it
- Pull a texture or spawn area back from its border, leaving a margin.
- Remove specks, thin strips and small islands from a patchy mask.
- Split areas that touch only through narrow necks.
- Not for: a soft fade at the edge (use Blur after Shrink, or instead of it); growing a mask (use Expand); making a whole mask darker (use Levels).
Inputs
| Slot | Type | Required | What to connect |
|---|---|---|---|
| Input | Mask | Yes | The mask to shrink, best a clean on and off mask, such as one from Threshold, Range Select or a hand painted mask. With nothing connected, the input is empty and so is the output. |
Outputs
| Slot | Type | What it holds |
|---|---|---|
| Output | Mask | The shrunk mask, from 0 to 1. Its edges are a little soft, a few texels wide. |
Properties
| Property | Default | Range | What it does |
|---|---|---|---|
| Ratio | 0.1 | 0 to 1 | How fast the mask shrinks in each iteration. Higher values shrink it further for the same number of iterations. 0 does nothing. |
| Iteration | 10 | 0 and up | How many shrink steps to run. More iterations pull the edge further in. At the default Ratio, each iteration moves the edge about 0.4 texels, so 10 iterations take about 4 texels off and 200 take about 80. 0 passes the mask through unchanged. |
| Iteration Per Frame | 10 | 1 and up | Only used with Split Execution: how many iterations run before the node waits for the next frame. Higher finishes sooner; lower keeps the editor smoother. It does not change the result. |
The shrinking is counted in texels, not meters. On a biome where one texel is 1 m, 200 iterations pull the edge in about 80 m; at a lower resolution, or on a larger biome, the same settings reach further in meters.
How it shrinks
In each iteration, every spot loses a share of how empty its four neighbors are, set by Ratio, and stops at 0. Next to empty ground that eats into the selected area step by step, which is what moves the edge. Two side effects follow:
- The biome border counts as empty. Shrink eats in from the edges of the biome as well, so a mask that reaches the border pulls away from it. In the examples below, the top row of the biome is already cleared after 10 iterations.
- Grey parts of a mask fade out on their own. A spot at about 0.8 surrounded by the same value drops to 0 in about 5 iterations at the default Ratio. A soft or gradual mask therefore loses everything that is not at full strength, not just its edge. Shrink works best on clean masks.
Common properties
| Property | What it does |
|---|---|
| Id | The node's unique name in this graph, shown for reference. You cannot edit it. Scripts and the AI workflow CLI use it to find the node. |
| Resolution | How detailed this node's result is, in texels across the biome. Relative To Main Input (default) matches the mask connected to Input, times the multiplier below it. Relative To Graph follows the biome's Canvas Resolution instead. Absolute sets an exact size. Since the shrinking is counted in texels, changing the resolution changes how far the mask shrinks in meters. Absolute is limited to 32 to 512 in Vista Personal and 32 to 4096 in Vista Indie and Pro. |
| Split Execution | Lets this node run over several frames so the editor stays responsive during long generations, with Iteration Per Frame iterations per frame. It only works when Allow Split Execution is on in the graph settings. Worth turning on for hundreds of iterations at high resolution. |
| Bypass | Skips the node. The input mask passes through unchanged. |
Examples
All examples shrink the same mask: the high ground above 140 m of eroded mountains (Noise, Scale 600, then Hydraulic Erosion 2), cut with Threshold at 0.35. The biome is 1024 × 1024 m at 1024 texels, so one texel is 1 m, with a terrain height of 400 m. The 2D view shows the mask from black to red; the 3D view shows it in red over the terrain.
| Setting | 2D | 3D |
|---|---|---|
| Input mask (before Shrink) | ![]() |
![]() |
| Default: Ratio 0.1, Iteration 10 | ![]() |
![]() |
| Iteration 200 | ![]() |
![]() |
The defaults are gentle: 10 iterations move the edge only about 4 m, and the mask covers 47% of the biome instead of 48%, though the strip along the top border is already gone. At 200 iterations the edge moves about 80 m and the mask covers 28%. The small patches at the bottom disappear completely, and the large area pulls away from the left and top borders of the biome.
Recipes
- Trees that stop short of the forest edge: forest mask → Shrink → Scatter for the large trees; use the full mask for the bushes, so the border is lower growth.
- Clean up a patchy mask: mask → Shrink → Expand with the same settings. Specks and thin strips vanish while the larger areas come back to about their old size.
- Margin between two textures: rock mask → Shrink → rock texture, so the grass around it shows a little further up the edge.
Tip
Shrink followed by Expand with the same settings is a quick way to clean up a mask: anything thinner than the distance vanishes and does not come back. The reverse, Expand then Shrink, closes small holes and gaps instead.
Warning
The biome border counts as empty ground, so Shrink pulls a mask away from it. On a biome that tiles with its neighbors, this leaves a visible gap along every edge. Avoid Shrink near the border on tiled biomes, or use another way to narrow the mask, such as Levels after Blur.
Note
Growth is measured in texels. If you change the biome size or resolution, recheck the Iteration count: the same value covers a different distance in meters.
Note
On a soft mask, Shrink does more than narrow it: anything below full strength fades out within a few iterations. Cut the mask into a clean shape with Threshold first if you only want the edge to move.
Performance
Cost grows with Iteration times the number of texels. A few dozen iterations are very cheap; hundreds at 2048 texels and above take noticeably longer. Split Execution spreads them over frames without changing the result.
Related nodes
- Expand: the opposite, pushes the edge outward.
- Blur: softens the edge instead of moving it.
- Threshold, Range Select: make the clean masks Shrink works best on.
For AI agents
- Type name:
ShrinkNode. Slot ids: Input =0, Output =100(both Mask). - Properties for
vista_graphitor_node_set:ratio(0 to 1),iterationCount(≥ 0),iterationPerFrame(keep ≥ 1). - Per iteration, in place: value = saturate(value − ratio × ((1 − left) + (1 − right) + (1 − top) + (1 − bottom))). Outside the texture reads 0, so the border acts as empty and the mask recedes from it.
- Measured on a 1024 texel biome, ratio 0.1: edge moves about 0.4 texels per iteration (10 iterations about 4 texels, 200 about 80); coverage 48% to 47% (10) and 28% (200); the top border row is cleared after 10 iterations.
- Values below 1 decay exponentially (1 − value grows about ×(1 + 4 × ratio) per iteration), so soft masks vanish.
iterationPerFrame0 makes split execution fail (division by zero); the setter allows 0.- Bypass passes the input through.




