wcGranulation.styleBlock
- .metadata220 B
- README.md3.1 KB
- block.yaml1.2 KB
README.md
Granulation (styleBlock, Fill)
Pigment settles into the paper's valleys and clumps into fine flecks, strongest for granulating pigments like ultramarine and the earths, never on the bare paper: the speckled, grainy texture of real watercolor.
Settings: amount (0.3), clumps (0.4), clumpPx (2.5), granulation (0.5). Low quality changes no setting; like every block it runs at half resolution there, so the finest flecks soften.
It reads the frame, depth, the shared ground and the scene's pigment set. The valleys come from the paper the first Ground block publishes (sk_tooth, so put wcColdPress in the Ground slot for a deep tooth); fine flecks (clumps, clumpPx) stay on the surface and keep their size in the picture at any distance (sk_scaled_fbm). With a pigment set picked each colour granulates as much as the pigments it is mixed from (ultramarine and earths a lot, staining pigments little); with none, granulation is used. Bare paper never granulates. It sits after the fade in the Fill chain (rank 60, stacking chain). Its material form is the granulation inside wcPaint.shaderModule.
What it gives up in motion
The valleys come from the shared paper and the flecks stay on surfaces and keep their size in the picture, so both stay put on still things under any camera move; walking toward a wall the flecks grow into the next size of fleck rather than sliding or zooming. On a moving character or prop they slide, because they come from world position: paint a hero with WatercolorHero.paint (the watercolorSurface material) for flecks that stay on it.
How it treats content
- Opaque things: paint settles into the tooth and flecks; heavier on granulating colours, none on bare paper.
- Transparent things (glass, water): the flecks are laid on the surface behind, so glass and water take the grain of what is behind them.
- Particles and smoke: grained by the surface behind them; soft smoke picks up a light speckle.
- Sky: the sky granulates on the paper laid by view direction, which reads as a grainy painted sky; pale skies near bare paper hardly grain.
- Fog: lifted, pale distance carries less pigment and so grains less.
- Skinned characters: grained, but the flecks slide across a moving body; use the hero material or a group mask on heroes.
- Foliage: leaf masses take grain like any wash; fine leaves can look noisier at low resolution.
- World text: speckle over small text lowers its contrast a little; exclude labels a player must read.
- Black stays black: it returns through
sk_finish, so an unlit pixel is never lifted.
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.