Back to Node List

Region Neighbor Select

region_neighbor_select

Selects RegionMap areas by neighboring ids or edge contact

Reviewed
Guide available
The node name and summary are available in English. Port, parameter, and article details are currently shown in Japanese.

Input Ports

NameTypeDescription
領域
regions
RegionMap
Required
選択元の RegionMap です

Output Ports

NameTypeDescription
領域
regions
RegionMap
選択結果の RegionMap です
マスク
mask
Image
選択領域を白にしたマスクです
プレビュー
preview
Image
選択領域のプレビューです
ラベル
labels
Map
Inspector に重ねるIDラベル位置です

Parameters

NameTypeDefaultRangeDescription / Options
方式
mode
Enum
NeighborsOfId

領域の選択方法です

  • IDの隣接NeighborsOfId
    指定IDに接する領域を選択します
  • ID範囲の隣接NeighborsOfRange
    指定ID範囲に接する領域を選択します
  • 外側に接するTouchesOutside
    OUTSIDE ピクセルに接する領域を選択します
  • 画像端に接するTouchesEdge
    画像端に接する領域を選択します
  • 内側のみInteriorOnly
    外側や画像端に接しない領域を選択します
領域ID
region_id
Int
00–2147483647

領域ID

最小ID
min_id
Int
00–2147483647

最小ID

最大ID
max_id
Int
2550–2147483647

最大ID

隣接段数
depth
Int
11–32

何段階隣まで含めるかです

起点を含む
include_source
Bool
false

隣接選択で起点IDも選択に含めます

出力方式
output_mode
Enum
KeepSelected

選択領域をどう出力するかです

  • 選択を残すKeepSelected
    選択領域だけを残します
  • 選択を除くRemoveSelected
    選択領域を取り除きます
プレビューシード
seed
Int
10–99999

プレビュー色だけを変更し、選択領域とマスクの結果には影響しません

ID表示
show_ids
Bool
false

Inspector のプレビュー上に領域IDラベルを表示します

  • 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 depth expands the selection like ripples. Use it for concentric coloring such as two levels outward from a center.
  • Use region_filter for 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 selection
  • region_adjacency — numeric view of adjacency data
  • region_fill — fills the selected result
  • region_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.

Back to Node List
Region Neighbor Select — PixPipeline Node Reference