Computer-generated watercolor (fluid simulation)
Simulates pigment advection and deposition in a shallow water layer over paper, a physical model that reproduces wet-in-wet blooms, edge darkening and granulation.
In the family Stylized & non-photorealistic rendering, watercolor
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | |
| Babylon.js 9.38.0 | None found | |
| Godot 4.7 | None found | No built-in Curtis fluid-pigment watercolor shader or post-process pipeline. |
| Unity | None found | |
| Unreal 5.7 | None found | No built-in fluid-simulated watercolor rendering pipeline. |
| Blender 5.2 | None found | |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
The model treats a painting as layers of glazes. For each layer, a shallow fluid simulation moves water over a paper height field, while pigment is carried by the water velocity, deposited onto the paper and lifted back off depending on pigment properties. Capillary action spreads water into dry paper and creates feathery backruns. Paper texture affects flow and granulation, and edge darkening arises because pigment accumulates at the boundary of wet regions. Pigments have per-colour optical properties combined with a Kubelka-Munk style composition between layers. Because it is a simulation, it handles strokes drawn interactively and automatic conversion of photographs.
When to choose it
Reach for it when
- make rendering look like a watercolor painting
- pigment bleeding and paper texture effects
- stylize images with layered translucent washes
- physically inspired artistic paint simulation
Choose it when physical plausibility of paint behaviour matters and runtime is acceptable offline or in an interactive paint tool. Prefer Interactive watercolor rendering with temporal coherence for filtering 3D renders at real-time rates, and Anisotropic Kuwahara filter for a cheap generic painterly look.
Field marks
- Needs many tuned parameters per pigment and paper type
- Simulation state is hard to keep coherent in animation
- Compositing many glazes is slow
- Reproduces 2D paintings, not 3D scenes, without extra work
Presets
Curtis watercolor pigment model — wet-edge darkening, paper valley granulation and glazing
{
"EDGE_DARKEN": 0.78,
"GRANULATION": 0.58,
"PAPER_GRAIN": 0.48,
"WET_BLEED": 0.34
}Show GLSL (98 lines)
const float EDGE_DARKEN = 0.78; // P
const float GRANULATION = 0.58; // P
const float PAPER_GRAIN = 0.48; // P
const float WET_BLEED = 0.34; // P
float hash(vec2 p) {
vec3 q = fract(vec3(p.xyx) * vec3(0.1031, 0.1030, 0.0973));
q += dot(q, q.yzx + 33.33);
return fract((q.x + q.y) * q.z);
}
float vnoise(vec2 p) {
vec2 i = floor(p), f = fract(p);
vec2 u = f * f * (3.0 - 2.0 * f);
return mix(
mix(hash(i), hash(i + vec2(1.0, 0.0)), u.x),
mix(hash(i + vec2(0.0, 1.0)), hash(i + vec2(1.0, 1.0)), u.x),
u.y
);
}
float fbm(vec2 p) {
float v = 0.0, a = 0.5;
mat2 m = mat2(0.8, 0.6, -0.6, 0.8);
for (int i = 0; i < 4; i++) {
v += a * vnoise(p);
p = m * p * 2.03;
a *= 0.5;
}
return v;
}
// Cold-press cotton paper heightfield (valleys trap heavier pigment particles)
float paperHeight(vec2 uv) {
float coarse = fbm(uv * 28.0);
float fine = vnoise(uv * 115.0);
float tooth = 0.5 + 0.5 * sin(uv.x * 160.0 + coarse * 5.0) * cos(uv.y * 160.0 + fine * 4.0);
return clamp(0.55 * coarse + 0.30 * fine + 0.15 * tooth, 0.0, 1.0);
}
// Curtis et al. (1997) subtractive glaze: pigment density + capillary wet-edge rim + valley granulation
vec3 applyGlaze(vec3 canvas, float sdf, vec3 absorbRGB, float baseConc, float paperH, vec2 uv) {
float bleed = max(WET_BLEED, 0.02);
float feather = fbm(uv * 9.5 + vec2(3.1, 1.7)) - 0.5;
float d = sdf + feather * bleed * 0.22;
float inside = smoothstep(0.012, -0.018, d);
if (inside < 0.001) return canvas;
// Capillary backrun concentrates pigment right along the dry boundary
float edgeDist = abs(d);
float rimPeak = exp(-edgeDist * edgeDist / max(0.00055 * (1.0 + bleed * 1.4), 1e-5));
float edgeTerm = 1.0 + max(EDGE_DARKEN, 0.0) * 1.45 * rimPeak;
// Granulation: heavy pigments settle into low paper valleys
float gran = mix(1.0, 1.55 - 1.15 * paperH, clamp(GRANULATION, 0.0, 1.5));
// Soft internal wet-in-wet flow mottling
float flow = 0.72 + 0.56 * fbm(uv * 5.5 + vec2(0.0, iTime * 0.08));
float thickness = baseConc * inside * edgeTerm * gran * flow;
// Kubelka-Munk / Beer-Lambert optical absorption glaze over previous layers
vec3 transmittance = exp(-absorbRGB * thickness * 2.2);
return canvas * transmittance;
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
vec2 drift = vec2(0.025 * cos(iTime * 0.35), 0.02 * sin(iTime * 0.28));
if (iMouse.z > 0.5 || length(iMouse.xy) > 1.0) {
drift = ((iMouse.xy - 0.5 * iResolution.xy) / iResolution.y) * 0.18;
}
float paperH = paperHeight(uv);
// Warm textured rag paper substrate
vec3 paper = vec3(0.965, 0.945, 0.895) * (1.0 - max(PAPER_GRAIN, 0.0) * 0.14 * (1.0 - paperH));
vec3 col = paper;
// Glaze 1: Prussian blue sky/mountain wash
float dBlue = length((uv - vec2(-0.16, 0.14) - drift * 0.5) * vec2(0.85, 1.15)) - 0.30;
col = applyGlaze(col, dBlue, vec3(1.45, 0.62, 0.18), 0.68, paperH, uv + vec2(1.2, 0.4));
// Glaze 2: Warm burnt sienna / cadmium ochre sun wash overlapping the blue
float dOchre = length((uv - vec2(0.18, 0.12) + drift * 0.6) * vec2(1.05, 0.92)) - 0.26;
col = applyGlaze(col, dOchre, vec3(0.14, 0.68, 1.55), 0.64, paperH, uv + vec2(-2.4, 1.8));
// Glaze 3: Viridian botanical wash across the lower foreground
vec2 gUv = uv - vec2(-0.04, -0.20) + drift * 0.3;
float dGreen = length(gUv * vec2(0.68, 1.38)) - 0.26;
col = applyGlaze(col, dGreen, vec3(1.28, 0.28, 0.72), 0.62, paperH, uv + vec2(4.1, -3.2));
// Glaze 4: Deep alizarin crimson petal accent with crisp wet-edge backrun
float dCrim = length((uv - vec2(0.12, -0.10) - drift * 0.4) * vec2(1.15, 0.85)) - 0.18;
col = applyGlaze(col, dCrim, vec3(0.18, 1.38, 1.05), 0.75, paperH, uv + vec2(-1.7, -2.5));
// Subtle warm paper lighting relief
float dx = paperHeight(uv + vec2(0.003, 0.0)) - paperH;
col *= 1.0 + dx * max(PAPER_GRAIN, 0.0) * 0.35;
fragColor = vec4(clamp(col, 0.0, 1.0), 1.0);
}Attribution: MIT — written for this index
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| watercolor-rendering-curtis-live | Tesla T4 1920x1080 | 56.3× baseline (heavy) · 1.85 ms / 2.19 ms | opengl-timer-query · 40 frames · GPU Weight Atlas · Colab T4 sweep |
| watercolor-rendering-curtis-live | NVIDIA L4 1920x1080 | 49.2× baseline (heavy) · 0.782 ms / 0.791 ms · 2.4× faster on L4 | opengl-timer-query · Cross-architecture validation |
| watercolor-rendering-curtis-live | NVIDIA A100-SXM4-40GB 1920x1080 | 37.7× baseline (heavy) · 1.09 ms / 1.09 ms · 1.7× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
From the citation graph (Crossref reference lists): cited by Image quilting.
Sources
- primaryCassidy J. Curtis, Sean E. Anderson, Joshua E. Seims, Kurt W. Fleischer, David H. Salesin (1997). Computer-generated watercolor. Proceedings of the 24th annual conference on Computer graphics and interactive techniques - SIGGRAPH '97.Verified via crossref · 2026-11-29doi:10.1145/258734.258896