Quantize

Quantise values to discrete steps.

What it does

Quantize snaps values or positions to a small set of discrete steps, trading smooth gradients for flat bands and pixel colour for a chunky grid. It runs on images, and on shapes and points: a circle's control points can snap to a grid and its fill colour can posterise without the shape ever converting to pixels.

Two effects combine independently. Value quantization reduces colour to a handful of discrete levels. Position quantization snaps positions onto a grid. Turn on either, both, or neither.

On an image, position quantization needs a Cells node to tell it where the cells are. Turn Position quantization on and pick a rule from the Cells dropdown: Grid for classic square blocks, Quadtree for cells that get small wherever the picture has detail, Fill Cells for irregular organic ones. A Cells node appears in the graph already wired in. Its size, seed and detail controls live on that node, so the same cells can drive several effects at once and every one of them agrees about where a cell edge is.

When to use it

ParameterTypeDefaultWhat it does
content_inRaster or Volume or Collection——
quantize_valueBooleantrueQuantize color values to discrete levels (posterize effect)
value_levelsNumber8Number of discrete color levels (2 = binary, 8 = retro, 256 = subtle)
value_modeString"Per Channel"Per Channel: quantize RGB independently. Luminance: quantize by brightness. Threshold: split to pure black and white at a pivot. One of: Per Channel, Luminance, Threshold.
value_thresholdNumber0.500Luminance pivot: at or above goes white, below goes black
value_threshold_softnessNumber0Feather the black/white split: 0 = crisp, larger = softer edge
quantize_positionBooleanfalseQuantize positions: on a raster, resample each pixel from the cell it is in (wire a Cells node); on shapes and points, snap positions to a grid
cellsField"None"The cells the mosaic samples. Pick a rule to drop in a Cells node already wired here — Grid for classic square blocks, Quadtree for cells that get small where there is detail, Fill Cells for irregular organic cells. One of: None, Grid, Quadtree, Fill Cells.
block_sizeNumber8Grid spacing positions snap to (world units)
separate_xyBooleanfalseEnable independent control of horizontal and vertical grid spacing
block_size_xNumber8Horizontal grid spacing (world units)
block_size_yNumber8Vertical grid spacing (world units)
sample_modeString"Center"Colour per cell: Center / Top-Left / Average sample one point. Cell UV fits the WHOLE frame into every cell. One of: Center, Top-Left, Average, Cell UV.
spatial_strengthField—Spatial field controlling where the effect applies (0=bypass, 1=full)
strengthNumber1Effect strength / wet-dry (0 = no effect, 1 = full). Editable, wirable, keyframable.

Gotchas

Value quantization affects colour only where the input carries per-point colour. A plain shape with a flat fill and no painted points keeps that fill, since quantising it would fabricate colour variation that is not there. Colour it per-point first, or feed it as an image.

On an image, Position quantization does nothing until something is wired into Cells. The pin is there and empty, and the picture is whatever Value quantization alone produces. Pick a rule from the dropdown and the node it needs appears, wired.

Worked example

  1. Add Quantize and feed it an image or a shape.

  2. Leave Value quantization on and lower Value Levels toward 2–4 for a bold posterised look, or push it toward 256 for a subtle one.

  3. Enable Position quantization. On an image, pick Grid from the Cells dropdown and a Cells node appears wired in. Raise its Cell Size for a chunkier mosaic, and enable Separate X/Y on that node for non-square blocks. On a shape or point cloud, raise Block Size here instead.

  4. On an image, try Sample Mode Average for a smoother block colour than the default centre sample, or Cell UV to fit the whole picture into every cell.

  5. Swap the Cells node's mode to Quadtree and lower its Detail Threshold: the flat areas stay coarse while the busy ones break into smaller cells.

See also

Cells · Dither · Levels · Rasters (images)