Studio Yotsuba
Back to Node List

Histogram Scan

histogram_scan

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

Reviewed
Guide available

Input Ports

NameTypeDescription
Image
input
Image
Required
Image to scan

Output Ports

NameTypeDescription
Mask
output
Image
Grayscale mask image

Parameters

NameTypeDefaultRangeDescription / Options
Source
source
Enum
OKLCH-L—

Which value of each pixel to scan

  • OKLCH-LOKLCH-L
    Use perceived brightness. Good when you want the result to match how bright it looks.
  • OKLCH-COKLCH-C
    Use how colorful the pixel is.
  • HSV-SHSV-S
    Use HSV saturation.
  • HSV-VHSV-V
    Use HSV value.
  • RGB-RRGB-R
    Use the red channel.
  • RGB-GRGB-G
    Use the green channel.
  • RGB-BRGB-B
    Use the blue channel.
  • AlphaAlpha
    Use alpha.
  • LuminanceLuminance
    Use Rec.709 RGB luminance.
Position
position
Float
0.50–1 / step 0.01

Center value of the scan — pixels above become white

Softness
softness
Float
0.250–1 / step 0.01

0 makes a hard edge, larger values make a wider gradient edge

Invert
invert
Bool
false—

Swap white and black

Alpha From Mask
alpha_from_mask
Bool
false—

Use the mask as transparency too. Black becomes transparent, white stays visible

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