Back to Node List

Image To Regions

image_to_regions

Quantizes an image channel into a RegionMap

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
画像
image
Image
Required
段階化する元マップ画像です

Output Ports

NameTypeDescription
領域
regions
RegionMap
生成された RegionMap データです
プレビュー
preview
Image
生成した領域を色分けした確認用画像です
ラベル
labels
Map
Inspector に重ねるIDラベル位置です

Parameters

NameTypeDefaultRangeDescription / Options
参照値
source
Enum
Luma

領域値として使う画像成分です

  • 輝度Luma
  • Red
  • Green
  • Blue
  • アルファAlpha
  • 色相Hue
  • 彩度Saturation
  • 明度Value
段階数
levels
Int
52–256

画像値を何段階の領域IDへ分けるかです

反転
invert
Bool
false

段階化する前に値を反転します

アルファ扱い
alpha_policy
Enum
IncludeAll

透明ピクセルを領域に含めるか、外側として扱うかです

  • 全ピクセル使用IncludeAll
  • 透明を外側TransparentOutside
左右ループ
wrap_x
Bool
false

下流の領域ノードで左右端をつながったものとして扱います

上下ループ
wrap_y
Bool
false

下流の領域ノードで上下端をつながったものとして扱います

ID順
id_order
Enum
SeedOrder

段階化後の領域IDの並べ方です

  • 値順SeedOrder
  • 左上からTopLeft
    外接矩形の上端、次に左端の昇順で小さいIDを割り当てます
  • 右下からBottomRight
    外接矩形の下端、次に右端の降順で小さいIDを割り当てます
  • 面積昇順AreaAsc
  • 面積降順AreaDesc
  • ランダムRandom
シード
seed
Int
10–99999

ランダムID順とプレビュー色に使うシードです

ID表示
show_ids
Bool
false

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

  • type_id: image_to_regions
  • category: Generate/Region/Create

Overview

The entry point to the region system, converting an image into regions (a RegionMap). The region system first divides the canvas into regions, then fills, scatters, or distorts by region (→ Guide "workflows/Introduction to the Region System"). This node takes the first step by dividing noise or height-map values into bands.

It quantizes luminance, RGB, HSV, Alpha, or other image values into a RegionMap. Use it to build a source map for regions from a saved noise image or height map.

Usage tips

  • The go-to entry is noise_generate → image_to_regions(levels 3〜8), where luminance bands become regions. This maps directly to geological layers, elevation bands, or water depth.
  • Adjust levels while checking region boundaries through the colored preview output and show_ids.
  • Disconnected areas in the same luminance band share an ID. Add region_split_islands downstream when each island needs a separate ID.
  • region_cells / region_voronoi / region_noise create regions directly without an image and make it easier to match the canvas size.

Usage

Load a noise image with Map Asset Load and connect it to Image To Regions. Higher levels values produce finer ID bands, which can be post-processed with Region Merge Small or Region Filter.

Because the node quantizes image values, the same ID can appear in multiple disconnected places. Connect Region Split Islands downstream when each visible island should have its own ID.

When using a saved noise image or map asset, the input dimensions become the RegionMap dimensions. To match the final canvas, resize the image first, or generate at the target size from the start with Region Cells / Region Noise / Region Voronoi.

wrap_x / wrap_y are metadata telling downstream region operations to treat the edges as connected. If the source image itself is not seamless, quantizing its values does not automatically make the seam match.

Related nodes

  • region_voronoi / region_cells / region_noise — generate regions without an image
  • region_split_islands — split disconnected areas with the same ID into separate islands
  • region_fill / region_pattern_assign — assign colors or patterns to regions next
  • region_debug_preview — inspect regions
Back to Node List
Image To Regions — PixPipeline Node Reference