Overview
A cleanup node that absorbs fragment regions that are too small into their
neighbors. Generated regions often contain a few-pixel fragments that make the image
look noisy when filled directly. Insert this between the generator and region_fill
to clean up the surfaces.
- Category: Generate / Region / Edit
- Use cases: reduce small fragment regions so fills, boundaries, and masks are easier to work with
Usage tips
- Its standard position is immediately after generation:
region_cells(or another generator) →region_merge_small→region_fill. It is nearly essential afterregion_noise, which readily produces fragments. min_areais a pixel count. Start with the default, which removes areas smaller than 4, enable ID display, and raise it while inspecting the result.- Excessive merging also removes the character of the surfaces. The trick is to stop once the noise blends into its surroundings.
Related nodes
region_cells/region_noise/region_voronoi— generators that can produce fragmentsregion_fill— color the cleaned regionsregion_split_islands— the reverse operation, separating islandsregion_filter— select regions by conditions
Merge target
| Value | Description |
|---|---|
LongestBorder |
If a neighboring stable region meets the minimum area, merges into the one sharing the longest boundary. If all neighbors are small, first merges small regions together. |
LargestNeighbor |
Merges into the largest adjacent region. |
How to use
Connect nodes as in Region Cells.regions -> Region Merge Small.regions -> Region Fill.regions.
Raising min_area reduces the number of small fragment regions. Applying it too
strongly also removes surface detail, so enable ID display and adjust while checking
the merged result.
If the input RegionMap loops horizontally or vertically, the node also treats
opposite edges as adjacent when selecting merge targets. A small region at a seam in
tiled material can therefore merge naturally into the region on the opposite side.
min_area is a pixel area. Raising it increases the number of merge candidates, but
the goal is not to turn everything into large masses; it is to blend overly small
noise into its surroundings. Use LargestNeighbor for strong absorption into large
surfaces, or the default LongestBorder to preserve a natural boundary flow.