TD Watercolor 2

TD Watercolor 2

TouchDesigner · GLSL · one component, watercolor2.tox · TouchDesigner 2023+ (built on 2025.33230) · NVIDIA GPU for moving shots · available on Gumroad

A watercolour that paints itself from footage or a still. It is not a blur-and-feedback look: the picture is the painter, and a small fluid simulation on paper does the rest. Pigment and water move only on wet paper, dry at their own pace, pool at the edges of a wash, settle into the valleys of the paper and stay where they dried. On a moving camera shot the painting travels with the footage and repaints itself where it no longer matches.

screenshot / animated GIFsite/imgs/watercolor2/hero.pngdrop the file in with this name and it appears here
Footage in, painting out: the same frame before and after.

Version 2 puts everything into one component: the paint mask, a new colour stage, the simulation and the export, with a single parameter interface. This page explains the watercolour ideas the effect is built on, lists every control page by page, gives the settings that worked best in our tests, and the steps to render a video or save a still. It does not assume you know the first version; if you do, see What is new in version 2 first.

What is new in version 2

The painting itself has not changed: with the default settings the output of watercolor2.tox is pixel-identical to the first version (checked against the version 1 still rig: 0 of 4.2 million pixels differ at frames 60 and 240). What changed is everything around it.

Watercolour in a nutshell

The controls are named after what a watercolourist does. These are the ideas behind them, and where each one lives in the effect.

Paint is transparent: why everything goes light to dark

Watercolour has no white paint. Light passes through the pigment, bounces off the paper and passes through the pigment again. Two layers on top of each other always make a darker colour, like two sheets of tinted glass, so you can darken a painting but you cannot really lighten it. The whites of a watercolour are bare paper that was never painted. This is why a painter works from light to dark and plans the whites from the start.

The effect works the same way. It thinks in optical density: how much light a layer of pigment swallows. Densities add up, light gets multiplied (the Beer–Lambert law), and the painting can only get darker where pigment lands. In the effect the whites come from the paint mask (the Mask page): what the mask leaves out stays bare paper.

Wash

A wash is a layer of diluted paint laid over an area in one go, while it is wet. Inside a wash the colour is smooth, and its look comes from what happens at the edges and while it dries.

Glaze

A glaze is a transparent wash laid over an earlier one after that has dried. The new layer does not mix with the old one; it sits on top and darkens it like a filter. Painters build a picture from a few glazes: a light first glaze for the overall colour, then darker ones only where the picture needs more depth. Where a glaze ends on dry paper it leaves a crisp edge, so a stack of glazes shows layered, hard-edged shapes.

In the effect, Progress runs from 0 to 1 and lays down Glazes (3) one after the other. Each glaze is a wet front that sweeps across the frame. The first one may only reach a light density (First glaze max density), later ones get darker, and a later glaze only wets the paper where the picture still has to get darker. That gives the layered, hard-edged shapes of real glazing.

Three glazes: the light first glaze, the middle one, the dark detail glaze.
Three glazes: the light first glaze, the middle one, the dark detail glaze.
Three glazes: the light first glaze, the middle one, the dark detail glaze.
Three glazes: the light first glaze, the middle one, the dark detail glaze.
Three glazes: the light first glaze, the middle one, the dark detail glaze.
Three glazes: the light first glaze, the middle one, the dark detail glaze.

Where the wet front goes first. By default a noise pattern decides which areas a glaze reaches first, so the first washes appear as random, cloud-like patches. With Glaze order from the picture the footage decides instead: either the shapes of the paint mask grow from their core outwards, or the light areas are reached first, as a painter lays down the light and works around it. The finished painting is the same; the way it comes into being is different.

The same still at frames 25, 75 and 240. Noise: random patches. Mask shapes: the subject's silhouettes grow out of the paper. Lights first: at frame 25 only the waterfall and the mist are painted. The finished paintings are alike.
The same still at frames 25, 75 and 240. Noise: random patches. Mask shapes: the subject's silhouettes grow out of the paper. Lights first: at frame 25 only the waterfall and the mist are painted. The finished paintings are alike.
The still painting itself with the picture order (Glaze order from the picture 1, Picture order 0.79): the lights go down first, the darks last.
The still painting itself with the picture order (Glaze order from the picture 1, Picture order 0.79): the lights go down first, the darks last.

Wet-in-wet and wet-on-dry

Paint dropped into wet paper spreads softly and blends: wet-in-wet. Paint laid on dry paper stays where it is and keeps a hard edge: wet-on-dry. Most of a watercolour's character is the mix of soft and hard edges.

In the effect, how far paint can move depends on how much water is on the paper (Mobility starts at water, Full mobility at water). Wet paper lets pigment bleed and flow; on dry paper it stops. A dry neighbour acts as a wall.

Mid-painting, 1:1: the painting, then its water map (View: water, light = wet). Where the paper is wet the wash melts softly; where it has dried the edges stay hard.
Mid-painting, 1:1: the painting, then its water map (View: water, light = wet). Where the paper is wet the wash melts softly; where it has dried the edges stay hard.
Mid-painting, 1:1: the painting, then its water map (View: water, light = wet). Where the paper is wet the wash melts softly; where it has dried the edges stay hard.
Mid-painting, 1:1: the painting, then its water map (View: water, light = wet). Where the paper is wet the wash melts softly; where it has dried the edges stay hard.

Blooms and backruns

When water runs back into a wash that is already drying, it pushes the pigment outwards and leaves a pale centre with a ragged, darker rim: a bloom (also called a backrun or cauliflower). Painters fear and love it.

In the effect: Wet to dry push (water flows from wet towards dry paper) and Uneven paper sizing (some spots dry later than others).

The same spot, 1:1: first with the normal settings, then with stronger blooms (more wet-to-dry push, uneven sizing): the washes spread, with paler centres and ragged rims.
The same spot, 1:1: first with the normal settings, then with stronger blooms (more wet-to-dry push, uneven sizing): the washes spread, with paler centres and ragged rims.
The same spot, 1:1: first with the normal settings, then with stronger blooms (more wet-to-dry push, uneven sizing): the washes spread, with paler centres and ragged rims.
The same spot, 1:1: first with the normal settings, then with stronger blooms (more wet-to-dry push, uneven sizing): the washes spread, with paler centres and ragged rims.

Edge darkening

While a wash dries, the water flows towards its edge and carries pigment with it, so the border of a dried wash is darker than its middle, like a coffee ring.

In the effect: Edge darkening and Edge radius on the Look page.

Granulation

Some pigments are made of heavier grains. They do not stay suspended; they sink into the valleys of the paper and give a speckled, sandy texture.

In the effect: Granulation (the look) and Settle in valleys (pigment settles faster in the paper's valleys).

Granulation, 1:1: pigment collected in the valleys of the paper.
Granulation, 1:1: pigment collected in the valleys of the paper.

Lifting

A wet brush or a damp tissue can pick pigment back up, even after it has dried, as long as it has not stained the paper. This is how painters soften an edge or pull a highlight back out.

In the effect: Lift wet pigment and Lift dried pigment. On moving shots this is also how the painting lightens areas where the footage got brighter.

Paper and sizing

Watercolour paper is textured. Cold-press paper has a bumpy surface; the bumps catch the brush (dry-brush strokes skip the peaks), and the valleys collect granulating pigment. Sizing is the glue in and on the paper that controls how fast it absorbs water; uneven sizing makes some spots dry later, which causes blooms.

In the effect: the Paper page (procedural cold-press paper, or your own scan on input 3 or from Paper file), Dry brush, Uneven paper sizing, Fibre feathering.

Optical flow (moving shots)

A painting on paper does not move, but a camera does. Optical flow measures, for every pixel, where it moved between two frames. The effect uses it to carry the wet and the dried paint along with the footage, and repaints the areas that no longer match.

How it works

One frame, in order:

  1. Mask (the pages Mask, Mask noise and Edge) turns the picture into a paint mask: a luminance threshold (lights, darks or both), broken by noise, with a feathered, torn frame border. The colour passes through untouched; the mask travels in the alpha channel.
  2. Color grades the masked picture: levels, gamma, brightness, contrast, saturation and hue. Only the colour channels change; the alpha, the mask, is taken from before the grade. While every control is neutral this stage is skipped.
  3. source is the painter: it converts the graded picture into a target pigment density and decides where the wet brush is this frame.
  4. velocity → divergence → pressure (×20) → project is a small 2D fluid at a quarter of the resolution. Water only moves where the paper is wet.
  5. state is the wet layer (mobile pigment and water), fixed the dry layer (pigment that has settled into the paper).
  6. display turns density into colour on paper (Beer–Lambert), with edge darkening, granulation, paper relief and a wet sheen. This is OUT, the output of the component, and what the Export page saves.

With a moving camera the painting is carried along by the footage's optical flow, and repaint dabs freshen up the areas where it no longer matches the video.

Using watercolor2.tox

watercolor2.tox is self-contained: the shaders are embedded, it does not need any file next to it except the optional presets/ folder and your paper scan. Drag it into a network, connect the footage to input 1, and play the timeline. A README DAT inside lists the inputs and a quick start.

Inputs

  1. paint: the footage or still that becomes the painting. The simulation runs at its resolution and at the project frame rate, so set the project frame rate to the frame rate of the footage.
  2. motion (optional): the footage the optical flow is computed from. Feed it the clean, un-zoomed footage. When nothing is connected, input 1 is used.
  3. paper (optional): a paper scan or photo (16:9), used when Paper → Use paper input is on. When input 3 is empty, Paper → Paper file is used instead.

Output: the painting, 16-bit float RGBA.

Quick start

  1. Connect the footage to input 1.
  2. Mask page: Paint coverage decides how much of the picture gets paint; the rest stays bare paper. View mask shows it.
  3. Color page: levels, gamma, contrast, saturation and hue of the masked picture before it is painted. The mask itself is never changed by it.
  4. Paint → Progress runs 0 → 1 and lays the glazes down. By default it is an expression over the timeline (150 frames). System → Reset at timeline start restarts the painting on frames 1–2, so every render starts from clean paper.
  5. Export page: Save still writes OUT to Still file; Record video writes Video file while the timeline plays.
  6. Presets page: load one of the shipped presets, or save your own.

Two things to know: System → Always cook steps the simulation every frame even when nothing displays it; leave it on. The optical flow (Flow page) needs an NVIDIA GPU; without it the flow is black and the painting sticks to the frame. Stills work on any GPU.

The pages below follow the order the picture passes through: the mask, the colour grade, the painting, the export. On the component the tabs run Paint · Water · Pigment · Look · Paper · Flow · Mask · Mask noise · Edge · Color · Export · System · Presets.

Mask: the paint mask

The mask decides where the paper stays white. A painter leaves the lightest parts of a subject unpainted; the mask does the same with a threshold on the picture's brightness. Everything outside the mask stays bare paper, soft mask values give a thinner wash, and a torn, feathered border keeps the painting from running to the frame edge, like a sketch on a larger sheet.

View mask: white is painted, black stays paper.
View mask: white is painted, black stays paper.
Control What it does Default
Paint coverage How much of the frame the main key paints (0.3 = about 70 % stays bare paper). With Auto threshold on, the luminance cut is chosen every frame to hit this coverage. 0.3
Opposite key coverage The same for the opposite key, which takes the other end of the tone scale. 0.15
Key mix 0 = main key only, 0.5 = both keys (the mid tones open up), 1 = opposite key only. 0
Auto threshold Follow the coverage values. Off = use the manual thresholds below. on
Threshold / Opposite threshold Manual luminance cuts, used when Auto threshold is off. 0.35 / 0.75
Paint darks The main key paints the darks (inverted threshold) and the opposite key the lights. Off swaps them. on
Softness Width of the soft cut, in luminance. 0.06
Mask smoothing Blur of the key, so the mask follows shapes rather than single pixels. 8 px
Auto threshold lag Smooths the automatic cut over time, so the mask does not flicker. 0.5 s
View mask Shows the mask instead of the image. off
Bypass Passes the image on without a mask. While this is on, nothing else on the Mask, Mask noise and Edge pages has a visible effect. off

Why a fixed threshold is not enough. A drone shot goes from a bright sunset sea to a dark jungle. One fixed cut would punch 90 % of one scene and 20 % of the other. Paint coverage asks for a share of the frame instead, and the cut is recomputed every frame.

Auto threshold works on the pixel ranking. "Paint 30 % of the frame" depends only on which pixels are darker than which. A gamma or contrast change keeps that ranking, so the cut simply moves with it and the mask stays the same. This is also why the Color page does not move the mask: it changes the colours that get painted, not where. To shape the mask by hand, turn Auto threshold off and set the thresholds.

Two keys. One threshold paints one end of the tones. On a waterfall shot, painting only the darks (coverage 0.45) melted the waterfall, the mist and most of the cliff into one bare-paper hole. With Key mix 0.5 and an opposite coverage of 0.15 the waterfall, the mist and the foam got a mask too, the mid-tone cliff opened up, and the waterfall read as a shape again (painted area 26 % → 37 %). Being white, these areas only receive a pale wash.

Measured on a waterfall still: the source, Key mix 0 (darks only) and Key mix 0.5 (darks and lights), shown with View mask.
Measured on a waterfall still: the source, Key mix 0 (darks only) and Key mix 0.5 (darks and lights), shown with View mask.

Mask noise

Noise that breaks the mask edge into brush-like shapes. In version 1 these lived on the Noise page of prep; they have their own page now so that they do not clash with the water's Turbulence and the system Seed.

Control What it does Default
Noise amount How far the noise shifts the cut, which breaks the mask edge into brush-like shapes. 0.15
Noise scale Noise cells across the frame height. 5
Noise drift How fast the noise drifts, per second. 0.05
Seed A different noise pattern for the mask. (The paper and the water have their own Seed on the System page.) 0

Edge

Control What it does Default
Border feather width Feathered frame border, in frame heights: 0 at the frame edge, 1 at this distance. 0 = no border. 0.08
Border tearing How much noise tears the border. 0.6
Border noise scale Size of the tears. 6

The component zooms the paint input (Flow → Zoom) before the mask, so the border stays inside the final frame.

The torn, feathered border on its own (View mask, Paint coverage 1).
The torn, feathered border on its own (View mask, Paint coverage 1).

Color

New in version 2. A colour grade on the masked picture, applied before it is painted: the painter mixes different colours, but paints the same shapes. Inside, a Level TOP (black and white points, gamma, brightness, contrast) and an HSV Adjust TOP (saturation, hue) work on the colour channels only; the alpha, the paint mask, is taken from before the grade, so the mask never changes.

While every control is at its neutral value the stage is bypassed altogether, and the output is identical to version 1. (Even a neutral HSV round trip would add about 0.0005 of rounding; the bypass avoids it.)

screenshot / animated GIFsite/imgs/watercolor2/color-page.pngdrop the file in with this name and it appears here
The Color page: the same still painted with Saturation 1 and with Saturation 1.6. The mask, and so the bare paper, is the same in both.
Control What it does Default
Colour grade on Turns the whole page on or off. Off = the picture goes to the painter as the mask made it. on
Input black The input level mapped to black. Raising it darkens the shadows. 0
Input white The input level mapped to white. Lowering it brightens the lights. 1
Gamma Mid-tone curve. Below 1 brightens the mid tones, above 1 darkens them. 1
Brightness Multiplies the picture. 1 = unchanged. 1
Contrast Contrast around the mid grey. 1 = unchanged. 1
Saturation Colour strength. 0 = a monochrome wash, 1 = unchanged, above 1 = stronger pigment colours. 1
Hue shift Rotates the hues, in degrees. 0
Output black The black point of the result. 0
Output white The white point of the result. Lowering it keeps even the darkest areas from reaching full density, like a thinner mix. 1

Remember how the painter reads the picture. The painter converts brightness into pigment density: a pixel of Paper colour becomes bare paper, darker pixels become denser pigment. So Brightness and Output white change how much pigment goes down overall, much like Density gain and Max density on the Paint page do, but with the colours of a graded picture. Pushing Contrast darkens the shadows into heavy washes and lifts the lights towards bare paper.

With Auto threshold on, the Color page does not move the mask. The mask follows the ranking of the pixels, and the controls only change the colours that get painted. To change where the paper stays white, use Paint coverage and Key mix on the Mask page.

Paint

This page is the painter's plan: in how many glazes the picture goes down, how dark each may be, in what order the brush reaches the areas, and, on moving shots, how the painting is repainted where it no longer matches the footage.

Control What it does Default
Progress Painting progress, 0 → 1. The default is the expression min(1, max(0, (me.time.frame - 1) / 150)), which paints over 150 frames of the timeline. On a moving shot use about 24 frames: a long reveal looks like a dimmed, frozen picture for several seconds. 0 (expression)
Glazes How many glazes go down while Progress runs (see Glaze above). 3
First glaze max density The darkest the first glaze may go: lights first, darks last. 0.45
Light to dark order 0 = every glaze may go fully dark, 1 = strictly light to dark. 0.85
Max density The densest pigment. Dark footage is compressed softly, because real pigment never reaches black. 2.5 keeps darks from turning black and keeps their colour. 4
Density gain Overall pigment strength of the target. 1
Wash levels / Wash level mix Quantises the wash strength into a few flat levels, like a painter working with a handful of tones (0 = off), mixed in by this amount. 4 / 0.35
Brush order scale Size of the noise that decides which areas the wet front reaches first: the size of the brush shapes. 2.5
Wet front width Width of the wet band behind the advancing front. 0.15
Dry brush The paper relief breaks the wet edge, as a brush skips the peaks of the paper. 0.06
Directional sweep / Sweep direction 0 = the front follows the noise only, 1 = a sweep across the frame in this direction. 0.3 / (0.7, −0.7)
Last glaze water Water of the last glaze relative to the first: drier detail strokes at the end. 0.3
Glaze order from the picture Which areas a glaze reaches first. 0 = a noise pattern (random patches), 1 = the picture decides (see Picture order). The finished painting does not change, only how it comes into being. 0
Picture order 0 = the shapes of the paint mask grow from their core outwards, 1 = the light areas are painted first, in between a mix. 0.5
Picture order smoothing Blur of the picture before it sets the order. Larger = broader, calmer growth. 48 px
Repaint changes For moving shots: how strongly the areas that no longer match the footage are repainted. 0.85 in the video preset. 0
Repaint dab coverage The part of the frame a repaint pattern covers. On our drone shot 0.35 left large unpainted holes and 0.5 did not; the video preset uses 0.8. 0.35
Repaint dabs per second How often the pattern moves on. Patterns cross-fade, they do not jump. 4
Repaint error threshold How far the painting must drift from the footage before it is repainted. 0.15
Repaint dab scale Size of the noise-shaped dabs. Higher = smaller dabs. 3
Repaint dab structure 0 = dabs cut from noise (blob-shaped), 1 = dabs cut from tone bands of the footage, so a repaint ends on a tone edge the picture already has, like a painter glazing one tone at a time. 0.5
Repaint tone bands Tone bands across black … white for the tone-shaped dabs. 3
Repaint band noise Noise that breaks a band into strokes. 0.3
Repaint tone smoothing Blur of the footage before it is cut into bands. 12 px
Progress on a moving shot, frames 24, 60, 100 and 160. S0: over 150 frames, the first seconds look dimmed and paper holes show. S1: over 24 frames, the picture is painted by frame 24. S2: no reveal, bare-paper holes show first.
Progress on a moving shot, frames 24, 60, 100 and 160. S0: over 150 frames, the first seconds look dimmed and paper holes show. S1: over 24 frames, the picture is painted by frame 24. S2: no reveal, bare-paper holes show first.
Repaint dab structure on the drone shot, frames 300 and 420. N0: noise dabs. T1: tone bands (3 bands, band noise 0.3). T3: tone bands with band noise 0.6. T4: halfway (0.5).
Repaint dab structure on the drone shot, frames 300 and 420. N0: noise dabs. T1: tone bands (3 bands, band noise 0.3). T3: tone bands with band noise 0.6. T4: halfway (0.5).

Water

The water is the life of a watercolour. Here you set how much water the brush carries, how long the paper stays wet, how far and how wildly the paint flows while it is wet, and how the paper takes the water in.

Control What it does Default
Dry time Until a wash is basically dry, in seconds. Longer = more time to flow. 4 s
Brush water Water laid down by the brush. 0.7
Capillary creep Water creeping into its neighbours through the paper: the puddle slowly widens. 1
Pigment bleed Pigment spreading inside wet areas. A dry neighbour acts as a wall. 0.1
Colour separation The colour channels bleed at different speeds (cyan runs further than orange), like a mix of pigments separating in water: coloured halos. Around large bare-paper areas 0.3 shows rainbow fringes; 0.1 keeps a hint. 0.3
Pigment advection / Water advection How much pigment and water ride on the flowing water. 1 / 0.6
Wet to dry push Water pushed from wet towards dry paper: blooms, backruns, coffee-ring rims. 0.004
Brush front push The wet front pushes water outwards. 0.003
Vorticity Keeps small eddies alive. 1
Turbulence / Turbulence scale Slow, breathing curl-noise movement of the water. 0.05 / 4
Velocity damping How quickly the water's motion dies down. Lower = livelier. 1.5
Gravity Runs and drips, as on tilted paper. Negative y = downwards. (0, 0)
Mobility starts at water / Full mobility at water The water levels at which paint starts to move and moves freely (wet-in-wet). A lower full-mobility value = more flow. 0.03 / 0.5
Uneven paper sizing The paper absorbs unevenly: uneven drying and blooms. 0.5
Fibre feathering Bleeding follows the paper fibres. 1 px

Water on a still vs. a moving shot. The livelier water of the video preset (turbulence 0.15, vorticity 2, gravity −0.04, damping 0.8) works on video because repainting keeps pulling the picture back to the footage. On a still nothing pulls it back, and within ten seconds the water stirs everything into marbled swirls. Use the defaults above for stills.

On a still: the source; V0 with the video preset's lively water, stirred into marbled swirls with rainbow fringes; V1 with the calm default water; V2, V4 and V5 still carry the video water.
On a still: the source; V0 with the video preset's lively water, stirred into marbled swirls with rainbow fringes; V1 with the calm default water; V2, V4 and V5 still carry the video water.

Pigment

What the pigment does once it is on the paper: how fast it reaches its colour, how it settles into the paper as the water dries, and how it can be lifted again.

Control What it does Default
Deposit rate How fast the brush brings the paper to the target density (per second). Slower = lighter, less saturated, more water-driven. 20
Settling rate How fast pigment settles into the paper as it dries. Settled pigment no longer moves with the water. 1.5
Settle in valleys Pigment settles faster in the paper's valleys: granulation. 0.5
Lift wet pigment A wet brush lifts pigment where the paper is darker than the target. 1
Lift dried pigment Re-wetting lifts dried pigment. 2 on moving shots. 0.3
Lift tolerance How much darker than the target is accepted before lifting. 0.05
Forget dried pigment Dried pigment fades out over this time, in seconds (0 = never). 5 s on moving shots, so old scenes do not pile up into mud. 0 s

Look

How the pigment on the paper is shown: how dark and transparent the paint looks, how much the edges and the paper texture show.

Control What it does Default
Paper colour Paper white. A pixel of this colour in the picture becomes bare paper. (0.96, 0.94, 0.89)
Ink strength Overall darkness of the pigment. 0.75 reads more transparent. 1
Edge darkening / Edge radius Pigment pooling at the border of a wash (see Edge darkening above). 0.6 / 2 px
Granulation Pigment in the paper's valleys, speckled by the fibres. 0.25
Paper relief The paper's bumps, lit from the top left. 0.25
Paper tone Tonal variation of the paper. 0.5
Wet sheen Damp areas read slightly darker and cooler. 0.5
Blend original Mixes the footage back in. 0
Linear light Pigment is mixed in linear light (correct Beer–Lambert). on
View Debug views: painting, mobile pigment, settled pigment, water, paper, original. painting
The debug views: painting, mobile pigment, settled pigment, water, paper.
The debug views: painting, mobile pigment, settled pigment, water, paper.
The debug views: painting, mobile pigment, settled pigment, water, paper.
The debug views: painting, mobile pigment, settled pigment, water, paper.
The debug views: painting, mobile pigment, settled pigment, water, paper.
The debug views: painting, mobile pigment, settled pigment, water, paper.
The debug views: painting, mobile pigment, settled pigment, water, paper.
The debug views: painting, mobile pigment, settled pigment, water, paper.
The debug views: painting, mobile pigment, settled pigment, water, paper.
The debug views: painting, mobile pigment, settled pigment, water, paper.

Paper

Control What it does Default
Paper bump scale Cold-press bumps across the frame height (procedural paper). 110
Fibre scale Fibre frequency. 420
Use paper input Use a scan (input 3, or Paper file) instead of the procedural relief. off
Scan contrast Relief depth taken from the scan. The scan's local average is removed first, so uneven lighting of the photo does not read as a slope. A photo's relief is much shallower than the procedural one: 1.5–3 matched it on our test scan. 3
Scan colour 1 = the paper takes the scan's colour and tone (stains, ageing, browned corners), 0 = Paper colour. 1
Paper file A paper scan or photo loaded from disk, used when input 3 is empty. New in version 2: no Movie File In needed outside the component. (empty)
The paper scan as input, and the result with Scan colour 1 and Scan contrast 3: the full frame and a 1:1 crop.
The paper scan as input, and the result with Scan colour 1 and Scan contrast 3: the full frame and a 1:1 crop.

Flow (moving shots)

Control What it does Default
Painting follows footage Turn on for a moving camera: the painting travels with the optical flow. Needs an NVIDIA GPU. off
Flow scale Converts TouchDesigner's Optical Flow TOP output to pixels. Calibrated: the raw flow is about 1/72 of the real motion; with 1 the painting barely moves and everything turns to mud. Negate it if the painting runs backwards. 72
Flow limit Vectors faster than this per frame are rejected, not clamped. 32 px
Flow cell The motion is averaged over cells of this size. Larger = looser, smoother flow. The video preset uses 10.7. 32 px
Flow is in pixels Keep on for the Optical Flow TOP. on
Water dragged by footage Lets the camera motion drag the water itself. 0
Zoom Keeps the centre of the flow. The component zooms the paint input by the same amount before the mask, so the noisy flow at the frame border falls outside the picture; the motion input stays un-zoomed. 1.1 in the video preset, 1 for stills. 1.0

Why the flow is cleaned (measured). Compared with phase correlation on the footage, the NVIDIA flow is right on average but full of per-pixel outliers, up to 250 px per frame where the real motion is 3–23 px. Clamping them shoved whole blocks of paint (staircase artefacts). Rejecting outliers and averaging over cells cut the per-pixel flow error from 6.2 px to 3.7 px and removed the blocks. Blurring the flow did not help: it smeared the outliers instead of dropping them.

Clamping the flow on the drone shot, frames 300 and 420. C: no limit, staircase blocks at the edges. G: 12 px, the painting lags behind. H: 20 px. I: 32 px.
Clamping the flow on the drone shot, frames 300 and 420. C: no limit, staircase blocks at the edges. G: 12 px, the painting lags behind. H: 20 px. I: 32 px.
The cleaned flow (outliers rejected, 32 px cells) at frames 100, 140, 300 and 420: no blocks.
The cleaned flow (outliers rejected, 32 px cells) at frames 100, 140, 300 and 420: no blocks.

Export

New in version 2: the still and the video export are on the component, so no Movie File Out has to be built outside it. Both save OUT, the finished painting.

screenshot / animated GIFsite/imgs/watercolor2/export-page.pngdrop the file in with this name and it appears here
The Export page: Still file and Save still, Video file, Video codec, Unique suffix, Stop at the end of the timeline, Record video.
Control What it does Default
Still file Where Save still writes, relative to the project folder or absolute. The extension picks the format: .tif (16-bit), .exr or .png. render/watercolor2_still.tif
Add frame number to the still Appends the current frame to the file name, e.g. watercolor2_still_0240.tif, so a series of saves does not overwrite itself. on
Save still Saves OUT to Still file now, 16-bit. The folder is created if it does not exist. (button)
Video file Where Record video writes. render/watercolor2.mov
Video codec Apple ProRes by default; also Animation, Photo/Motion JPEG, MPEG-4, H.264 and H.265 (NVIDIA GPU), GoPro-Cineform, Hap, GIF, NotchLC, VP8, VP9, VVC/H.266, AV1 (NVIDIA GPU). Apple ProRes
Unique suffix Adds a number to the file name instead of overwriting an existing file. on
Stop at the end of the timeline The recording is limited to the length of the timeline, so it stops by itself. Without it the timeline loops back to frame 1 and the recording keeps going. on
Record video Starts and stops the recording. Turn it on at frame 1, then play. off
Status What the still export did last, for example saved D:/…/render/watercolor2_still_0240.tif, or no still file set.

System

Control What it does Default
Reset (hold) Clears the paper for as long as it is on. off
Reset at timeline start (frames 1-2) Clears the paper automatically on timeline frames 1 and 2, so every run starts from blank paper. Replaces the me.time.frame <= 2 expression of version 1. Turn it off if the component should keep painting across a timeline loop. on
Water grid divisor The water runs at 1/4 resolution. Use 8 for 4K. 4
Seed Different paper and water noise. (The mask has its own Seed on the Mask noise page.) 0
Always cook Steps the simulation every frame even when nothing is looking at it. TouchDesigner only cooks what something pulls; without this an unwatched component stops and then jumps, which shows as ghosting. on

Not on the page any more: the width, height and time step follow input 1 and the project frame rate, and the pressure solver runs a fixed 20 iterations.

Presets

A preset is a JSON file that stores every control except the Presets and Export pages and Reset: fixed values under values, expressions (such as the Progress animation) under expressions. Controls that a preset does not contain keep their current value when it is loaded. Presets of version 1 (with their wc_engine and prep sections) load as well; the renamed mask-noise controls are converted on the way.

screenshot / animated GIFsite/imgs/watercolor2/presets-page.pngdrop the file in with this name and it appears here
The Presets page: Preset file, Load, Save, Status.
Control What it does Default
Preset file The JSON file, relative to the project folder (presets/…) or absolute. presets/default.json
Load Applies the preset to the component. (button)
Save Writes the current state to the file. For a new preset type a new file name first, otherwise the existing file is overwritten. (button)
Status What happened last, for example loaded still_x3.json: 111 values. A count of unknown values means the file had controls this component does not have (typical for a version 1 preset).

Shipped presets (in presets/):

File What it is
default.json The defaults: a 150-frame reveal, no flow, procedural paper. Loading it resets the component.
still_x3.json Stills: no flow, Zoom 1, calm water, three glazes over 150 frames, paper scan on, softer darks (max density 2.5, ink 0.75). Glaze order from noise.
still_x3_lazur.json The same still look with the glaze order taken from the picture (Glaze order from the picture 1, Picture order 0.79; lazúr is Hungarian for glaze).
video_export.json Moving drone shot: 24-frame reveal, painting follows footage, Zoom 1.1, repaint 0.85, lively water, forget dried pigment 5 s.
video_export_lazur.json The video preset with the picture-order glazing tuned slightly differently (Key mix 0.52, Picture order 0.75).
user_v7.json An earlier hand-tuned moving-shot state: flow on, 150-frame reveal, paint coverage 0.3, full darks (max density 4, ink 1), stronger colour separation.

The two starting points are video_export.json and still_x3.json; load them on the Presets page. The table lists what they set differently from the defaults.

Video, moving camera (video_export.json) Still image (still_x3.json)
Progress over 24 frames over 150 frames, dry until ~240
Painting follows footage / Zoom on / 1.1 off / 1
Repaint changes / dab coverage / dabs per second 0.85 / 0.8 / 5.1 0
Forget dried / Lift dried 5 s / 2 0 / 0.3
Water turbulence 0.15, vorticity 2, gravity y −0.04, brush water 1, full mobility 0.35, dry time 6, bleed 0.25, damping 0.8 the defaults
Glaze order from the picture / Picture order 1 / 0.79 the same
Look colour separation 0.1, ink strength 0.75, max density 2.5, edge darkening 1, paper tone 0.3, settle in valleys 0.95 the same, wash level mix 0.6
Paper use paper input, scan contrast 1.5, scan colour 1 the same
Mask paint coverage 0.45, key mix 0.5, border feather 0.18, border noise scale 26 the same
Flow cell 10.7 (no flow)
Color neutral neutral

How they were chosen. For video we measured how recognisable the picture stays (correlation of output and footage luminance, frames 100–700): a hand-tuned set 0.58, the still-image look on its own 0.55, the same with paint coverage 0.45 0.64. Calmer water also gave 0.64, so the bolder flow stayed. Very dark scenes (a cliff wall in shadow) wash into a dark blot with every setting.

For the still we compared variants by eye against the traits above: bare-paper whites, transparent layers, soft and hard edges, no black, no rainbow fringes.

The four video candidates at frames 200, 420 and 700. P0: hand-tuned. P1: the still look. P2: the same with paint coverage 0.45 (chosen). P3: P2 with calmer water.
The four video candidates at frames 200, 420 and 700. P0: hand-tuned. P1: the still look. P2: the same with paint coverage 0.45 (chosen). P3: P2 with calmer water.
Still variants on the waterfall image. W5: paint coverage 0.45. X1: max density 2.5, scan contrast 1.5. X2: flatter washes. X3: less granulation and paper tone (chosen).
Still variants on the waterfall image. W5: paint coverage 0.45. X1: max density 2.5, scan contrast 1.5. X2: flatter washes. X3: less granulation and paper tone (chosen).

Rendering a video

  1. Realtime off: untick Realtime in the top bar. In realtime TouchDesigner skips frames when it falls behind, and the simulation steps with the wrong time.
  2. The footage's Movie File In → Play Mode: Locked to Timeline. The timeline runs from 1 to the length of the clip; the project frame rate matches the footage.
  3. Load presets/video_export.json, or your own preset.
  4. Reset is automatic at timeline frames 1–2 (System → Reset at timeline start).
  5. Export page: set Video file and Video codec (ProRes by default). Keep Unique suffix and Stop at the end of the timeline on, so nothing is overwritten and the recording ends with the clip. For an image sequence save stills instead (below), or record with the Animation codec.
  6. Set the timeline to play once instead of looping, so it stops at the last frame.
  7. Timeline to frame 1, Record video on, Play. The recording stops by itself at the end of the timeline; turn Record video off afterwards.

Repeatable renders: the shaders take their time from the timeline, and the automatic threshold does not carry smoothing over from a previous run. Two renders of frame 60 differed in 55 of two million pixels (0.003 %, scattered): GPU and optical-flow noise, invisible.

Tuning in realtime is fine: keep the footage on Locked to Timeline and let the timeline loop, so the automatic Reset always falls on the start of the clip. With a Sequential movie the clip runs independently of the timeline, and the Reset would restart the painting in the middle of the shot.

Saving a still

  1. Connect the image (a Movie File In with the still) to input 1. The simulation runs at the image's own resolution.
  2. Load presets/still_x3.json (no flow, no repaint, calm water). Presets never touch Always cook, Reset or the Export page.
  3. Timeline to frame 1, Play. Progress lays down three glazes over 150 frames; by about frame 240 the paint has dried. Pause there.
  4. Export → Save still. The file goes to Still file, with the frame number appended when Add frame number to the still is on, for example render/watercolor2_still_0240.tif. Status shows the path. Use .tif or .exr for a 16-bit master.
screenshot / animated GIFsite/imgs/watercolor2/still.pngdrop the file in with this name and it appears here
A still, painted and dried, saved with Save still.

Troubleshooting

How it was made

TD Watercolor 2 is a research project in painting animation: how a watercolour comes into being on paper, re-created as a process rather than as a filter. The simulation follows published computer-graphics research on fluids and on watercolour rendering (below), and the paint-handling rules come from the way a painter works: light before dark, whites kept as bare paper, glazes over dry layers. The implementation — the twelve GLSL shaders, the TouchDesigner network and the Python around them — was written from scratch for this component, with AI-assisted coding under the author's direction, and tuned in measured tests on real footage and stills.

The component is not locked: the shaders and the scripts are readable inside, so it can be studied and built upon. Its use is covered by the license in the package (personal and commercial use in your own work; no redistribution or resale of the component itself).

Research and references