Alexis Mabanza @ alexvolkihar.ovh

Dither

Procedural scenes in two to four colours and big square pixels

Each piece starts as a grey picture computed from the hash, never from a photograph. Balls rest on a floor under an open sky, solids stand on a table against a wall, a plaster bust turns its head towards a side light, the sun sets over a sea with a headland and sometimes a sail, or flat shapes filled with smooth gradients make a poster. The 3D scenes are drawn by sphere tracing distance functions, with soft shadows and ambient occlusion. The coast and the poster are drawn in 2D from noise and simple shapes.

The picture is computed on a coarse grid, a fixed number of cells along the short side of the canvas, then reduced to the two, three or four colours of an old screen or a print. Error diffusion (Floyd–Steinberg, Atkinson, Jarvis–Judice–Ninke) pushes the rounding error of each cell onto the cells not yet visited. Ordered dithering compares each cell with a threshold matrix: Bayer’s recursive cross-hatch, or a blue-noise matrix built by void-and-cluster. The palettes are a green handheld LCD, black on white, the four colours of CGA, an amber monitor, and two risograph inks printed on top of each other, the second slightly out of register. The grid is scaled up with nearest-neighbour sampling, so a hash gives the same pixels at any size. Press New seed for a fresh hash, then share the URL to show someone that exact piece.

All series
0x34b56b18…ebd7
Scene LandscapeDither Floyd–SteinbergPalette HandheldPixels Fine
0xe9ed8d43…3c61
Scene BustDither AtkinsonPalette PhosphorPixels Chunky
0x6ddf14c0…fd5f
Scene Still lifeDither Floyd–SteinbergPalette One-bitPixels Medium
0x3266b017…0937
Scene Still lifeDither Blue noisePalette CGAPixels Chunky
0x21dd6823…b9e9
Scene BustDither AtkinsonPalette RisoPixels Medium
0x1aa74279…9859
Scene GradientsDither AtkinsonPalette HandheldPixels Chunky
0x979fcbae…bb8d
Scene SpheresDither Floyd–SteinbergPalette RisoPixels Fine
0x10e5f373…21c4
Scene GradientsDither AtkinsonPalette CGAPixels Bold
0x6101f807…4e73
Scene GradientsDither AtkinsonPalette One-bitPixels Medium
0x087cb329…ff61
Scene GradientsDither AtkinsonPalette PhosphorPixels Medium
0xa06a5927…d42e
Scene SpheresDither Blue noisePalette HandheldPixels Medium
0x8d8aa027…69cc
Scene SpheresDither AtkinsonPalette One-bitPixels Fine

Traits

The weights were set before any drawing code was written. They were then checked against a census of 2,000 seeds.

TraitValues (weight)
SceneSpheres 22 · Still life 22 · Landscape 22 · Bust 14 · Gradients 20
DitherFloyd–Steinberg 28 · Atkinson 22 · Jarvis–Judice–Ninke 14 · Bayer 20 · Blue noise 16
PaletteHandheld 24 · One-bit 24 · CGA 14 · Riso 22 · Phosphor 16
PixelsFine 22 · Medium 40 · Chunky 26 · Bold 12

Credits

  • Error diffusion: Robert W. Floyd and Louis Steinberg, An adaptive algorithm for spatial grey scale (Proceedings of the SID, 1976); J. F. Jarvis, C. N. Judice and W. H. Ninke, A survey of techniques for the display of continuous tone pictures on bilevel displays (Computer Graphics and Image Processing, 1976); and Bill Atkinson’s dither for the original Macintosh, which only passes on six eighths of the error. Rows are scanned in serpentine order.
  • Ordered dithering: Bryce E. Bayer, An optimum method for two-level rendition of continuous-tone pictures (IEEE ICC, 1973), and Robert Ulichney, The void-and-cluster method for dither array generation (SPIE, 1993). The 64×64 blue-noise matrix is built once, with integer energies so that it comes out the same in every browser.
  • Scenes: John C. Hart, Sphere tracing (The Visual Computer, 1996), for the distance-field renderer. The primitives, smooth unions, soft shadows, tetrahedral normals and ambient occlusion follow Inigo Quilez’s articles. The shading is Lambert plus a Blinn–Phong highlight (James F. Blinn, 1977). The balls on a checkered floor recall Turner Whitted’s An improved illumination model for shaded display (1980). The coast uses fractal value noise.
  • Palettes: CGA is the high-intensity palette 1 of the IBM Color Graphics Adapter’s 320×200 mode (1981). The handheld green, the amber, the paper and the risograph inks are original approximations.
  • Randomness: sfc32 by Chris Doty-Humphrey, seeded from the hash with named sub-streams, following Camille Roux’s genart skill (MIT).
  • The code was written with an AI assistant. It draws everything itself: no AI-generated images.

Artworks © Alexvolkihar, licensed CC BY-NC-ND 4.0. Code under the repository licence (MIT).


>