Back to Node List

Histogram Scan

histogram_scan

Creates a mask by scanning a value position with adjustable edge softness

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
画像
input
Image
Required
マスクの元にする画像です

Output Ports

NameTypeDescription
マスク
output
Image
白黒のマスク画像です

Parameters

NameTypeDefaultRangeDescription / Options
判定基準
source
Enum
OKLCH-L

どの値を基準に切り出すかです

  • OKLCH 明度OKLCH-L
    見た目の明るさで判定します。影やハイライトなど、目で見た明暗に合わせたい時に使います。
  • OKLCH 彩度OKLCH-C
    色の鮮やかさで判定します。くすんだ色と鮮やかな色を分けたい時に使います。
  • HSV 彩度HSV-S
    HSV の鮮やかさで判定します。一般的な色相・彩度・明度の感覚で選びたい時に使います。
  • HSV 明度HSV-V
    RGB の一番明るいチャンネルを基準にします。光った色や原色の強さを見たい時に使います。
  • RGB 赤RGB-R
    赤の強さで判定します。赤みだけを抜き出したい時に使います。
  • RGB 緑RGB-G
    緑の強さで判定します。緑成分だけを抜き出したい時に使います。
  • RGB 青RGB-B
    青の強さで判定します。青成分だけを抜き出したい時に使います。
  • アルファAlpha
    透明度で判定します。不透明な形だけをマスクにしたい時に使います。
  • 輝度Luminance
    RGB から計算した明るさで判定します。OKLCH より単純な白黒変換に近い結果が欲しい時に使います。
位置
position
Float
0.50–1 / step 0.01

切り出しの中心値です。これより上の値が白になります

柔らかさ
softness
Float
0.250–1 / step 0.01

0でくっきりした境界、上げるほどフチが広いグラデーションになります

反転
invert
Bool
false

白と黒を入れ替えます

マスクを透明度にする
alpha_from_mask
Bool
false

マスクを透明度にも使います。黒い部分は透明、白い部分は表示されます

Overview

An advanced version of Threshold. Threshold produces only black or white, while Histogram Scan can create a gradient around the boundary. It is the go-to node for extracting masks from noise.

Usage tips

  • The golden pattern for turning noise into a mask is noise_generate → histogram_scan. It extracts high areas as masks for islands, clouds, or grime. position controls the covered area, while softness controls edge softness.
  • Promote position to an input pin 📌 and drive it over time to create a spreading reveal. This resembles reveal, but performs the effect while generating the mask.
  • In pixel art, soft edges are often passed through downstream dither or threshold-like quantization instead of being used as-is.

Related nodes

  • threshold — when a binary result is enough
  • noise_generate — the go-to upstream source
  • mask / blend — common mask consumers
  • remap — adjusts values before extraction

Technical details

  • Values across position ± softness/2 are interpolated with smoothstep.
  • With softness = 0, the result is the same hard binary output as Threshold.
  • Promote position to an input pin and connect Time Source to animate a mask spreading outward.

Examples

  1. Terrain mask from noise: Noise(Perlin) → Histogram Scan extracts only the high areas as an island mask.
  2. Soft grime mask: use a mask extracted with softness: 0.5 as the opacity of Blend(Multiply).
  3. Wipe effect: animate position in Gradient → Histogram Scan to wipe the screen.
Back to Node List
Histogram Scan — PixPipeline Node Reference