Back to Node List

Region Scatter

region_scatter

Sprinkles small region blobs across the canvas with fully random centers or a guaranteed minimum gap - useful for ore, stains, bubbles, stones, and other surface spots

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
321–2048

散布する小領域の数です

最小半径
min_radius
Float
20.5–128 / step 0.5

小領域の最小半径です

最大半径
max_radius
Float
50.5–128 / step 0.5

小領域の最大半径です

シード
seed
Int
10–99999

散布を再現するためのシードです

配置
placement
Enum
Random

密集も起こるランダム配置か、中心間隔を保証する配置かを選びます

  • ランダムRandom
    従来どおり完全ランダムに置きます。小領域が密集・重複する場合があります
  • 間隔を空けるKeepApart
    近すぎる中心を除外します。鉱石・小石・泡・表面の斑点を自然に散らす時に向きます
中心の最小間隔
min_distance
Float
81–512 / step 0.5

中心同士を何px以上離すかです。重なりを減らすなら最大半径の約2倍から始め、個数が置けない時は下げます

shape
Enum
Circle

散布する小領域の形です

  • Circle
    丸い小領域です
  • ひし形Diamond
    ひし形の小領域です
  • 四角Square
    四角い小領域です
背景領域
background
Bool
true

空き部分を外側ではなく領域0にします

左右ループ
wrap_x
Bool
false

小領域を左右端でまたがらせます。間隔を空ける配置では左右端をつないで中心間隔も測ります

上下ループ
wrap_y
Bool
false

小領域を上下端でまたがらせます。間隔を空ける配置では上下端をつないで中心間隔も測ります

ID順
id_order
Enum
SeedOrder

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

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

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

Overview

Creates a RegionMap by scattering small spot-shaped regions. It places ground accents such as stones, bubbles, leaves, ore, or grime. Because placements remain regions, they can later be recolored individually or converted to masks.

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

It directly generates scattered small areas as a RegionMap, suited to accent regions such as stones, bubbles, leaves, grime, or ore speckles.

Usage tips

  • It is commonly paired with region_compose to place spots over strata. On its own, use region_mask → mask_scatter to place stamps at spot locations.
  • Use placement=Random when occasional clusters are useful, or KeepApart when ore, bubbles, and stones should stay separated. Random remains the default, preserving existing project placement.
  • min_distance is the center gap. Start near twice max_radius to reduce blob overlap. If Count does not fit, lower the gap or reduce count.
  • Change only seed to batch-produce placement variants; it pairs well with batch_render.
  • Limit the scatter area with the mask input, such as stones only on ground. A mask from region_mask completes the region-based workflow.

Main parameters

ID Description
width / height Pixel dimensions of the RegionMap
count Number of small regions to scatter
min_radius / max_radius Radius range of small regions
placement Fully random placement / keep centers apart
min_distance Center gap in KeepApart mode; twice max radius is a useful starting point
shape Circle / diamond / square
background Treat empty space as region 0 or outside
wrap_x / wrap_y Allow scatter to cross an edge

Combine it with a compositing node that mixes into an existing RegionMap to use the result as an asset accent.

With KeepApart, wrap_x / wrap_y also measures centers across opposite edges as neighbors. This prevents a seamless tile from becoming unusually dense only at its seam.

When mask is connected, scattering occurs only in its valid range and the outside is treated as OUTSIDE. Even with background on, background region 0 exists only inside the mask. Mask pixels satisfy 明度 * アルファ >= 0.5. The arbitrary mask shape takes priority, so wrap_x / wrap_y are disabled for both painting and spacing.

If all requested centers do not fit in KeepApart mode, the node outputs those that fit and warns on min_distance. It never silently shrinks the requested gap.

If max_radius is smaller than min_radius, evaluation swaps the effective bounds and displays a warning. The stored parameter values are not rewritten.

To add ore, grime, bubbles, or stones after creating a base region, use Region Scatter -> Region Compose. To pass only scattered regions into image processing, connect Region Mask downstream.

Related nodes

  • region_compose — overlay onto base regions
  • region_mask — convert scattered regions to a mask
  • mask_scatter — scatter image stamps directly instead of regions
  • path_array — scatter along or inside a path in Scatter mode
Back to Node List
Region Scatter — PixPipeline Node Reference