- type_id:
region_neighbor_select - category:
Generate/Region/Select
Uses RegionMap adjacency to select regions that touch a specified ID, outside pixels, or an image edge. Region Adjacency outputs information, while this node outputs a RegionMap and mask that can flow into downstream processing.
Usage tips
- It excels at effects around a source. Select regions adjacent to a water ID to obtain a shoreline, or those next to lava to obtain scorched ground.
- Increasing
depthexpands the selection like ripples. Use it for concentric coloring such as two levels outward from a center. - Use
region_filterfor simple conditions such as area or ID; use this node when the condition depends on what a region touches.
Related nodes
region_filter— condition-based selectionregion_adjacency— numeric view of adjacency dataregion_fill— fills the selected resultregion_distance— surrounding effects based on distance rather than adjacency
Key parameters
| ID | Contents |
|---|---|
mode |
Neighbors of an ID, neighbors of an ID range, touching outside, touching an image edge, or interior only |
region_id / min_id / max_id |
Source for adjacency selection |
depth |
Number of adjacency steps to include |
include_source |
Include the source ID in the selection |
output_mode |
Keep or remove the selected regions |
show_ids |
Display ID labels in the Inspector preview |
TouchesOutside selects regions that actually touch OUTSIDE_ID. Use
TouchesEdge when you specifically need regions touching the image edge.
How to use
To process only the area around a specified ID, start with
mode = NeighborsOfId and depth = 1. Increase depth to expand through two or
more levels of neighbors. Enable include_source only when the starting ID should
also be selected.
The regions output is a RegionMap containing only the selected regions. Use
mask as a regular image mask, or regions to continue Region processing.
When the input RegionMap wraps horizontally or vertically, adjacency also accounts for connections across those edges. This is useful for selecting neighbors across the seams of a tile asset.
Preview Seed changes only the region colors in the inspector preview. It does not
affect the selected regions or mask.