Overview
Selects regions by a condition such as ID, area, randomness, or edge contact. Unselected pixels become outside pixels. It can keep only large islands, remove regions that touch an edge, or randomly thin regions into a pattern while preserving the RegionMap type.
- Category: Generate / Region / Select
- Uses: keeping only small regions, removing edge-touching regions, and randomly thinning regions
Usage tips
Randomthinning is visually useful: thin Voronoi regions into scattered stones, or noise islands into isolated shrubs.- Think of it as the Region counterpart to
list_filter, retaining elements that meet a condition. - The output remains a RegionMap, so fill, boundary, and distance nodes work
downstream. If you only need a black-and-white mask,
region_maskis more direct.
Related nodes
region_mask— extracts the result as a mask imageregion_neighbor_select— selects by adjacencyregion_grow_shrink— fills outside pixels after filteringregion_merge_small— merges regions instead of removing them
Modes
| Value | Description |
|---|---|
All |
Keep every region |
Id |
Keep only the specified ID |
IdRange |
Keep the specified ID range |
AreaRange |
Keep regions within the specified area range |
Random |
Keep regions using a stable random value per region |
EdgeTouch |
Keep regions that touch an image edge |
Interior |
Keep interior regions that do not touch an image edge |
How to use
Connect nodes such as
Region Cells.regions -> Region Filter.regions -> Region Fill.regions.
To remove regions that are too small, set mode = AreaRange and raise min_area.
To remove edge-touching regions, use mode = EdgeTouch with invert = true.
When the input RegionMap wraps horizontally or vertically, edges in that direction
connect to the opposite side instead of outside. In a tile that wraps both ways,
a region is not treated as EdgeTouch merely because it lies at an edge.
Enable compact_ids only when needed. It is off by default so the original IDs
remain aligned with upstream selections.
Region Mask differs in its output type. Region Filter returns the selection as a RegionMap, allowing further use of Region Fill, Region Border, Region Distance, and other region nodes. Use Region Mask when you need only a regular image mask.