‹  Research

Research · Generative graphics

ink-wash-painting

Can a language model paint 水墨 that doesn’t look like a template? The answer tested here: only if it first learns to see a subject the way a painter does, then simulates the material, then criticises its own picture at zoom.

Ink-wash painting: a pavilion by a misty river, full moon, plum branch in red, a small boat and the characters 月满中秋.
Live: the reference scene 月满中秋 (full moon, mid-autumn) from the repository’s reference/ folder. It paints itself in from blank paper — washes bloom like ink in wet paper, strokes travel, the title is written last — then the water, mist, lamps and geese come alive. WebGL2 shaders for paper, water and ink — no images, no libraries.

Status

Open source

Period

September – October 2026

Stack

JavaScript · WebGL2 · GLSL · Canvas

Quality comes from seeing, composing, material and self-critique — in that order. Motifs come last.

The skill never reuses the reference scene. It copies only the generic material core and writes a new pipeline for every subject.

1Works

Four paintings made with the skill — four different assemblies of the same kit, never one scene reused. Each one runs live in the browser and paints itself in when it comes into view.

Scroll the wall sideways →

2Problem

Asked for an ink painting, a model reaches for the same picture every time: mountains, a moon, water. Given a worked example, it copies the example — the first cause of template pictures.

When it does draw something new, the computer shows through: strokes of flat width, ink that sits in beads, visible stitching between marks, blur applied evenly everywhere, a grey mush where the tones should separate — and shapes that read as something else: a tree that is a plank, a knot that is an eye.

The style is not a set of motifs (mountains, moon, pavilion). It is a way of seeing plus a material.references/seeing.md

3How it works

The tonal sketch of the Ma Yuan painting: masses as three flat tones.

aSee and compose before drawing

Five questions for every subject: its spirit (神), what is solid and what stays paper (实 / 虚), the family of line, the depth planes, the format. Then the canon: one host and its guests, empty paper as a shape (留白), hiding and revealing (藏露), one or two red accents.

Nothing is drawn until the composition passes as flat tones — the tonal sketch on the left is the gate the Ma Yuan scroll had to pass. For an unfamiliar subject the skill studies real paintings first and crops the master’s motif at 3× before building it.

Close-up of the pavilion and pines: ink diffusing along paper fibres.

bPaper and water

Every mark writes into a wetness map; the ink then spreads along the paper fibres over 20–36 diffusion steps on half-float textures, with darkened edges, granulation and a soft halo. Silk gets a different sheet from xuan paper: tighter edges, a woven texture, the tone of age.

Everything that should look painted goes through this pass — a shape laid on top afterwards reads as a vector cut-out.

Boulders built from many faint wet strokes, a dry contour, grass at the foot.

cA brush, not a fill

Tone is built the way a painter builds it: many faint, very wet strokes laid side by side that the diffusion merges — never a blur. Dry brush is a hairy brush: dozens of bristles, each with its own ink load, running dry into long streaks of flying white (飞白), held upright or on its side (中锋 / 侧锋).

Wide strokes on the crisp ink layer always read digital (a plank, a rope, stacked boards); mass goes into the wet layer, the ink layer keeps the narrow strokes.

A weeping willow: a leaning trunk flowing into arching limbs, whips and long hanging strands.

dStructure before texture

“Unnatural” almost always means wrong construction, not wrong brushwork. Trees grow as one graph: the trunk flows into the main limb, thickness falls continuously so the limbs carry their share of the trunk (Leonardo’s rule), branches bend under gravity by their thickness, a collar at every joint, roots grow into the ground — and the whole tree is filled as one body of ink.

Then the species decides: a willow is a bare leaning trunk with whips and curtains of strands, not an oak. This took a dozen failed constructions to learn; each is now a rule.

Reveal, 1.6 s: blank paper with the first pale pools.
1.6 s
Reveal, 2.8 s: the painting blooming through wet paper.
2.8 s
Reveal, 4.4 s: the washes settled, strokes drawn, no title yet.
4.4 s
Finished: the title and seal written last, geese crossing.
finished

eThe reveal

Each painting appears on blank paper. Whole states of the picture — bare paper, washes only, finished — each pass through the full material pipeline; big pools bloom along a smooth field with a damp band running ahead of each front, the tone arrives pale and deepens, every ink stroke travels from its entry to its exit, and the inscription and seal come strictly last. Then the quiet motion starts: water, mist, rain, steam, geese.

Built first for the rain market, then made a kit module; every visible bug on the way (white stripes, shimmering sand, seams along the front) is written down.

Reads asCauseFix
a planka filled shape with dashes on topbuild the mass wet, strokes on top
an eyea ring with a dot for a knota slanting dark scar
a slingshota bare fork ending in two pointsend limbs in thin shoots
bamboo nodestexture or swelling at every jointplain thin limbs, merge only at forks
a broom on a stickbranches only at the topbranches along the whole trunk
a domea depth mark sticking out past an objectwrite depth as the exact shape

fCriticise at zoom

At least two rounds of critique, top-down: composition, tone, structure, the tells of a computer, the marks, the motion — at thumbnail size, blurred, side by side with the master, and zoomed in. One test catches more than any other: what else could this shape be read as?

Every failure from four paintings became a rule — 103 of them in ten sections, with a whole section on joints, the most frequent mistake.

Paper is the light. Sky, water, snow, white walls, mist and lit sides are unpainted paper. Nothing glows.SKILL.md

4Results

4 paintingsA landscape, a hanging scroll after Ma Yuan, a city in rain and an album leaf — different subjects, formats and materials from one kit.
16 kit modulesRuntime, paper, wash, ink, palette, atmosphere, fibre diffusion, a hairy brush, tree growth and the reveal — mechanics only, every look parameter required.
103 rulesEvery real failure turned into a rule, in ten sections — process, composition, depth, trees, joints, brush, false readings, animation, tooling.
3 test promptsA large pagoda, a canal city in mist, a cat on a windowsill in rain — written as evaluations; results not yet recorded.
Suggest, don’t enumerate. 40 tile strokes read as a roof; 400 read as a texture map.SKILL.md

5Limitations

  • The four paintings were made with close feedback; the three test prompts that would show whether the skill carries over to any subject on its own are still not run.
  • Trees were the hardest motif by far: a dozen failed constructions (a plank, a cartoon flower, a slingshot, a rope, a broom on a stick) before the one-graph, one-body approach.
  • No photographic detail, cast shadows or full colour, by design. Faces, hands and anatomy are weak; figures stay small and summarised.
  • Needs WebGL2 with float render targets; older and some mobile GPUs cannot run it.

Sources and prior work