Studio Yotsuba
Back to Node List

Auto Levels

auto_levels

Automatically stretches the value range so the darkest and brightest areas reach full range

Reviewed
Guide available

Input Ports

NameTypeDescription
Image
input
Image
Required
Image to normalize

Output Ports

NameTypeDescription
Image
output
Image
Normalized image

Parameters

NameTypeDefaultRangeDescription / Options
Source
source
Enum
OKLCH-L—

Which value of each pixel to stretch

  • 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.
Clip %
clip_percent
Float
10–10 / step 0.1

Ignores this percentage of extreme pixels at both ends before stretching

Strength
strength
Float
10–1 / step 0.01

Blend between the original (0) and fully stretched (1) result

Overview

When noise or a height map is clustered around mid-gray, this correction makes the whole image crisp with a single node. To set the range manually, use Levels.

Technical details

  • Fully transparent pixels are excluded from both range calculation and correction.
  • If every pixel has the same value (a zero-width range), the image passes through.
  • clip_percent guards against outliers so a few blown highlights or crushed shadows do not determine the range.

Usage tips

  • When noise or a height map looks flat, insert this node before spending time on parameters. It provides a more stable input for gradient_map or threshold.
  • Use strength to blend the effect (0.5 expands the range halfway). Reduce it if the full effect looks unnatural.
  • clip_percent (1% by default) is insurance against a few extreme pixels. It prevents a single highlight from keeping the rest of the range compressed.

Common pitfalls

  • Brightness varies between variants: automatic correction depends on the input distribution, so every seed can use a different reference when batch-producing. For batch work, fixed values in manual levels produce more consistent results.
  • Nothing changes: the image already uses the full range, or every pixel has the same value and passes through. Use a manual adjustment such as tone_curve if you still need a change.

Examples

  1. Normalize noise: Noise → Auto Levels expands mid-heavy noise to the full range before sending it to Gradient Map.
  2. Adjust a height map: normalize the output from Height From Image to strengthen the shading from Quick Shade.

Related nodes

  • levels — the manual-range version, which is more stable for batch production
  • histogram_scan — when you want to inspect the distribution itself
  • gradient_map / threshold — the go-to destinations after normalization
Back to Node List