Log inGet started
Package

watercolorBlocks.package

This package holds more than this page lists. See all of its files in its world.

README.md

Watercolor wash (styleBlock, Fill)

Turns the whole scene into flat, graded, transparent watercolor washes mixed from a pigment palette, with the white of the paper as the only white: the base of every watercolor painting look.

Settings: flatten (0.85), abstraction (0.85), reach (8), body (1.8), dilution (0.0), pigmentPull (1.0), grade (0.35), gradeSize (0.2), whitePoint (0.96), wobble (1). Low quality draws the wash with reach 4 and one ring of samples instead of two; like every block it runs at half resolution there, and the soft field it reads at half of that.

It reads the frame, the soft field (a depth-aware blur of what it reads, never smearing a nearer thing onto a farther one), the shared wobble and the scene's pigment set. Each area becomes one flat wash through a generalized Kuwahara filter (flatten, reach): four overlapping sectors around the pixel are averaged and the calmest win, so detail thinner than the brush (mortar, seams, a thin outline) dissolves while the edge between two areas stays put, and a tap on a nearer surface is refused so foreground never runs onto background. Then texture inside one shape (wherever the soft field barely changes: a tile grid, brick, wood grain, however strong) is let go into the soft field (abstraction), while at a shape's boundary the filtered edge is kept, the result is read as paint on paper, given more pigment in the middle values (body), re-mixed from the pigment set (pigmentPull, nothing with no set picked), thinned with water (dilution) and graded heavier and lighter across each surface. It is the first block of the watercolor Fill chain (rank 10, stacking chain): every later Fill block from watercolorBlocks reads what the wash made. Its material form is wcPaint.shaderModule, which the watercolorSurface shader includes for hero objects (WatercolorHero.paint).

What it gives up in motion

Detail inside an area of colour is let go, so small texture that was there in the render is gone in the painting. The grading is laid on surfaces in world position, so it stays put on still things while the camera pans, dollies or orbits, but slides across moving characters and moving props. The flattening is found from the picture each frame, so a thin pattern moving under it (a fence passing a wall) can show soft shimmer where it changes which area it belongs to. With a Time block in the stack the wash edges tremble on the held clock (wobble), never per frame.

How it treats content

  • Opaque things: washed as described; real colour edges and depth edges stay, texture inside a surface is let go.
  • Transparent things (glass, water): they are not in the depth, so the wash reads them as part of the opaque surface behind and averages their colour with it; a pane over a wall becomes one wash. Clear glass mostly vanishes into the wash behind it, tinted glass keeps its tint as a hue shift.
  • Particles and smoke: no depth either, so soft smoke is flattened into the wash behind it and small sparks can be averaged away. Strong, bright effects stay readable; keep small gameplay effects out with a mask or exclude if they must read exactly.
  • Sky: washed like a surface, graded by view direction so the grading stays put in the sky as the camera turns; a bright sky above whitePoint reads as bare paper.
  • Fog: the fogged colour is washed and re-mixed like any colour, so fog stays as a pale wash; add wcPaperFade to lift it toward the paper instead.
  • Skinned characters: washed like everything else; the grading slides across a moving body. For washes that stay on a hero, use WatercolorHero.paint and keep this block off it with a group mask.
  • Foliage: leaves on one depth plane flatten into one mass of colour, which reads as a painted tree; thin, far branches can soften away.
  • World text: small text inside a wash is averaged and blurred and can become unreadable: put signs and labels a player must read in StyleKit.options({ exclude = { id } }).
  • Black stays black: it returns through sk_finish, so an unlit pixel is never lifted toward paper; with every light off the frame stays black.

Known limits

  • It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
  • Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
  • Its passes are queued again every frame, even when nothing changed (#24548).

The package README's Known limits lists the rest.