Overview
Turns the number of pixels from a RegionMap boundary or specified region into a grayscale image. It creates helper maps for distance-based effects from a boundary, such as a bright shoreline edge, shadows along rock outlines, or an inward gradient.
Usage tips
- The go-to edge effect uses
source=Boundary, steppedfalloff, andmax_distance=1–3to make a mask covering a band N pixels from the boundary. Pass it to downstream color adjustment or compositing for effects such as a bright strip along a shoreline. - For gradual shading, use linear or smooth
falloffwith a largermax_distance. Multiplying by the distance image directly creates shading that darkens toward the boundary. - Enable
inside_onlywhen the effect should remain inside the material, preventing it from leaking beyond the silhouette. - Pass
distanceormaskdownstream. Do not usepreview, which is a combined image for inspection.
Related nodes
region_border— produce the line itself instead of distanceregion_fill— combine with the base fillregion_mask— turn a particular region into a maskblend— composite shading using the distance map
Outputs the distance from RegionMap boundaries, the outside, or specified IDs as a grayscale image. It is suited to helper maps for shorelines, rock edges, shading near boundaries, and inward gradients.
Key parameters
| ID | Description |
|---|---|
source |
Distance origin: region boundary, outside, specified ID, or ID range |
region_id / min_id / max_id |
Target for a specified ID or ID range |
metric |
Distance metric: Manhattan, Chebyshev, or standard distance |
max_distance |
Maximum distance used for the grayscale conversion |
falloff |
Linear, smooth, or stepped |
invert |
Invert light and dark |
inside_only |
Keep OUTSIDE pixels transparent |
show_ids |
Show ID labels in the Inspector preview |
Enabling inside_only prevents the distance image from leaking outside the
silhouette, making it convenient for processing edges inside an asset.
The distance output is not a numeric value; it is an Image that visualizes
distance in grayscale. Hovering over the pin shows only metadata such as image size.
To inspect the actual distances, connect distance to a Preview node or view this
node's input/output port display.
This node's own preview combines two images vertically for inspection. The top half
color-codes the input RegionMap, and the bottom half is the same distance image as
distance. Downstream nodes should use distance or mask, not the combined
preview.
Preview Seed changes only the region colors in the top half. It does not affect
distance, mask, or the calculated distances.
How to use
To add a uniform shadow or edge color near boundaries, set source = Boundary,
falloff = Step, and max_distance = 1–3, then pass mask or distance to a
downstream composition or color-adjustment node. Use linear or smooth falloff when
the effect should weaken with distance from the boundary.
Use source = ID or ID Range to calculate how many pixels lie from particular
regions. This produces helper maps for effects such as shorelines, rock edges, or
darkening only around a particular material.