Back to Node List

Region Cells

region_cells

Generates a reusable RegionMap made from pixel-space cells

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
マスク
mask
Image
領域を生成する範囲を制限する任意の画像マスクです。マスクは 明度 * アルファ >= 0.5 のピクセルを有効範囲として扱います。マスク外は OUTSIDE_ID になります。

Output Ports

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

Parameters

NameTypeDefaultRangeDescription / Options
width
Int
641–2048

RegionMap のピクセル幅です

高さ
height
Int
641–2048

RegionMap のピクセル高さです

領域数
count
Int
241–1024

配置する領域の種点数です

シード
seed
Int
10–99999

領域配置を再現するためのシードです

ゆらぎ
jitter
Float
0.80–1 / step 0.01

各種点をセル内でどれだけランダムにずらすかです

距離
distance
Enum
Manhattan

ピクセルを領域へ割り当てる距離の測り方です

  • 通常距離Euclidean
    丸みのある通常のボロノイ風セルです
  • マンハッタンManhattan
    斜め方向に偏りやすいドット絵向けセルです
  • チェビシェフChebyshev
    四角くブロック寄りのセルです
左右ループ
wrap_x
Bool
false

左右の端がつながっているものとして領域を生成します

上下ループ
wrap_y
Bool
false

上下の端がつながっているものとして領域を生成します

ID順
id_order
Enum
SeedOrder

生成した領域IDの並べ替え方法です

  • 種点順SeedOrder
    元の種点生成順を使います
  • 左上からTopLeft
    外接矩形の上端、次に左端の昇順で小さいIDを割り当てます
  • 右下からBottomRight
    外接矩形の下端、次に右端の降順で小さいIDを割り当てます
  • 面積昇順AreaAsc
    面積が小さい領域から小さいIDを割り当てます
  • 面積降順AreaDesc
    面積が大きい領域から小さいIDを割り当てます
ID表示
show_ids
Bool
false

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

Overview

The standard first choice among Region nodes, dividing the canvas into cell-shaped working regions. Process its RegionMap output—intermediate data containing region IDs—with downstream fill, boundary, and merge nodes to build collections of surfaces such as paving stones, rocky ground, or terrain faces.

  • Category: Generate / Region / Create
  • Use cases: divide water, rock, terrain surfaces, or part candidates into regions before drawing them by hand

Usage tips

  • Start with the standard three-part setup: region_cellsregion_fill (add colors) + region_border (boundaries). This is the easiest introduction to the Region workflow.
  • distance strongly affects the pixel-art texture. Manhattan (default) and Chebyshev create angular, pixel-art-like cracks; Euclidean creates rounder, more natural ones.
  • For repeating tile material, enable wrap_x / wrap_y. Regions then connect across edges, reducing seams when tiled.
  • See the comparison at the end for when to choose another generator: voronoi is point-centered, bands creates bands, strata creates layers, and noise creates uneven patches.

Related nodes

  • region_fill — color the regions, the go-to next step
  • region_border — extract boundaries
  • region_merge_small — clean up regions that are too small
  • region_voronoi / region_bands / region_strata / region_noise — alternative generators

How to use

  1. Create a RegionMap with Region Cells.
  2. Connect regions to Region Fill to make colored surfaces.
  3. If needed, extract boundaries as a separate image with Region Border.

A RegionMap is not an ordinary image; it is intermediate data containing region IDs and region information. Future isometric-specific nodes are intended to use this type's space information for surfaces such as top, left, and right faces.

ID Display is a UI overlay for inspection. It does not change the downstream preview image or the regions data itself.

When horizontal / vertical looping is enabled, opposite edges are treated as adjacent when calculating distance. Use it to create regions that connect when repeated in all directions for a tile map. The loop information is stored in the RegionMap, so downstream nodes for merging small regions, boundaries, grow/shrink, and adjacency also treat opposite edges as adjacent.

When mask is connected, seed points are placed and regions generated only inside the active mask area. Pixels where lightness * alpha >= 0.5 are active. Arbitrary mask shapes do not combine well with edge looping, so horizontal / vertical looping is disabled in the output while a mask is connected.

ID ordering determines how IDs are arranged for downstream use by ID or ID range in Region Mask.

Region Cells is the general-purpose region generator to choose first. It suits workflows that divide the whole canvas into rough working surfaces, then color them, draw boundaries, or merge small regions. For point-centered bubbles or stones, use Region Voronoi; for banded terrain, use Region Bands; for cracked strata or rock faces, use Region Strata; and for natural levels derived from noise values, use Region Noise.

Value Description
SeedOrder Original seed-point generation order. This is the default and matches the previous behavior.
TopLeft Assigns lower IDs starting with regions nearest the top left.
BottomRight Assigns lower IDs starting with regions nearest the bottom right.
AreaAsc Assigns lower IDs starting with smaller regions.
AreaDesc Assigns lower IDs starting with larger regions.
Back to Node List
Region Cells — PixPipeline Node Reference