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

ParameterTypeDefault
content_inOneOf([FieldOf(Raster), FieldOf(Volume), Collection])
quantize_valueBooleantrue
value_levelsNumber8
value_modeString"Per Channel"
value_thresholdNumber0.500
value_threshold_softnessNumber0
quantize_positionBooleanfalse
cellsOneOf([Field])"None"
block_sizeNumber8
separate_xyBooleanfalse
block_size_xNumber8
block_size_yNumber8
sample_modeString"Center"
spatial_strengthField
strengthNumber1

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)