Back to Node List

Mask Scatter

mask_scatter

Uniformly select stamp centers from pixels that pass a mask threshold, with optional per-stamp flip, rotation, scale, and brightness variation

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
Required
スタンプの中心位置を選ぶマスクです。スタンプ本体は範囲外へはみ出す場合があります
スタンプ
stamp
Image
各点に配置する画像(未接続時は1pxドット)

Output Ports

NameTypeDescription
画像
output
Image
生成された分散画像

Parameters

NameTypeDefaultRangeDescription / Options
count
Int
161–4096

配置するオブジェクト数

シード
seed
Int
00–99999

配置を再現するための乱数シード

しきい値
threshold
Float
0.50–1 / step 0.01

配置対象として扱う最小マスク値

Alphaを使う
alpha_enabled
Bool
true

マスクの明るさではなくアルファを使って判定

反転
invert
Bool
false

マスクの反対側の領域に分散配置

color
Color
[1,1,1,1]

スタンプ未接続時のドット色

ランダム反転
random_flip
Bool
false

スタンプごとにランダムで左右・上下反転します

ランダム回転
random_rotate
Bool
false

スタンプごとに90°単位でランダム回転します

大きさのばらつき
scale_jitter
Float
00–1 / step 0.05

スタンプごとの大きさのばらつきです(0で全部同じ大きさ)

明るさのばらつき
brightness_jitter
Float
00–1 / step 0.05

スタンプごとの明るさのばらつきです(0で全部同じ明るさ)

Overview

Uniformly selects stamp centers from pixels that pass a mask threshold. From one stamp and a range mask, it batch-produces natural distributions of the same asset, such as grass, stars, stones, or splashes.

Usage tips

  • Variation parameters are the key to a natural result. random_flip with scale_jitter around 0.3 and brightness_jitter around 0.2 removes the copied look.
  • The range mask determines the effect. Use path_mask to place grass on the shape of the ground, or threshold a coordinates Y gradient to limit placement to an upper or lower region.
  • Mask values are not density weights. Every candidate that passes the threshold has the same selection probability. Set alpha_enabled=false to use RGB brightness.
  • Drive seed with seed_range to compare different scattering patterns.
  • With no stamp connected, the node uses a 1px dot. That is often enough for stars or gravel.

Related nodes

  • path_mask — the go-to way to define the scatter area
  • seed_range / variant_select — generate different scatter patterns
  • blend — composite the scattered result over a background
  • path_array — regular placement along a path instead of random scattering

How to use

  • Basic use

    • Connect the Path Mask output to mask.
    • Set the amount with count.
    • Change seed to change the distribution.
  • Threshold

    • 0.5 places stamps where the mask value is at least half.
    • A white + alpha mask such as Path Mask works as-is.
    • Values above the threshold do not receive a higher selection probability.
  • Invert

    • When enabled, stamps are placed on the unfilled side.

Examples

Combine with Path Mask

[Multi Path] → [Path Mask] → mask → [Mask Scatter] → [Preview]

Scatter dots without a connected stamp

[Path Mask] → [Mask Scatter(count:32, color:white)] → [Preview]

Use any mask image

[Pixel Canvas] → mask → [Mask Scatter]

Create a natural cluster with variation

When batch-producing grass, stones, stars, or similar assets from one stamp:

[grass stamp] → stamp → [Mask Scatter(random_flip:on, scale_jitter:0.4, brightness_jitter:0.3)]

The same seed always produces the same result (deterministic).

Notes

  • Two stamps are never assigned the same center pixel.
  • The stamp images themselves can overlap.
  • Only the center is guaranteed to lie inside the mask. A larger stamp footprint can extend outside it.
  • The output dimensions match the input mask image.
  • All variation is derived deterministically from seed.
Back to Node List
Mask Scatter — PixPipeline Node Reference