inkDryTexture.styleBlock
- .metadata176 B
- README.md4.7 KB
- block.yaml2.2 KB
README.md
Dry-brush ink texture (styleBlock, Fill)
A nearly dry ink brush dragged across the darker passages, its bristles catching the peaks of the paper's tooth and leaving broken streaks of ink with paper between them: texture and grit for walls, ground, bark and shadow in ink drawings and comics, or fine hatch-like strokes in the middle tones.
Settings: ink (#0d0b0d), setInk (1), amount (0.6), toneFrom (0.3), toneTo (0.75), strokePx (9), stretch (5), angle (0.5), bite (0.5), patchSize (0.5), coverage (0.6), fadeEnd (40), wobble (1). Low quality changes no setting; like every block it runs at half resolution there, so the strokes are softer.
It reads the frame, depth, the shared ground and wobble, and the pigment set. It sits after the wash and the pooled black in the ink Fill chain (rank 60, stacking chain), so it reads the picture they made: the brush is dragged only through a band of its darkness, from toneFrom to toneTo (0 white, 1 black), which leaves bare paper and solid pools alone. Inside that band it works in patches about patchSize metres across laid on the surface (coverage of them), and inside a patch it draws streaks about strokePx reference pixels wide and stretch times as long, at angle on the surface, kept at their size in the picture by blending two sizes by distance. Where a streak meets a peak of the shared paper's tooth the bristles catch ink; the higher bite, the shallower they bite and the more paper shows between them. A stroke only adds ink and never lightens what is already darker, and the strokes fade out over the last third of the way to fadeEnd. The ink is ink, or the picked ink set's first paint by setInk; with a light ink (inkWhiteOnDark) the brush drags white ink through the brighter passages instead. With a small strokePx, a long stretch and a high coverage it reads as hatching (the inkDrawing look uses it that way).
What it gives up in motion
Streaks and patches are laid on surfaces and keep their size in the picture, growing into the next size of stroke as you walk closer rather than sliding or zooming; under pan, dolly and orbit they stay on still things. On moving characters and props they come from world position and slide across the body. Which passages take strokes follows the picture's tone each frame, so a shadow moving over a wall moves the strokes' extent with it (the strokes themselves stay put on the wall). The tooth they catch on is the shared ground's, so they change with the paper picked. Nothing re-seeds on its own; with a Time block the strokes tremble with the stack on the held clock (wobble). strokePx cannot go below 2 reference pixels, so strokes never become fine stripes; on large walls keep coverage moderate with a long stretch.
How it treats content
- Opaque things: middle-dark surfaces take broken streaks; paper-white lights and solid black pools are left alone.
- Transparent things (glass, water): no depth of their own, so strokes are laid on the surface behind the glass or under the water, over the glass's colour, where the picture there falls in the band.
- Particles and smoke: smoke in the tone band takes streaks laid on the surface behind it; bright sparks are out of the band and stay clear.
- Sky: never stroked.
- Fog: fogged distance is paler and drops out of the band, and strokes are gone by
fadeEnd(70 m), so the distance stays clean. - Skinned characters: a character's mid-tones take strokes that slide across a moving body; keep this block off characters with a group mask (
StyleKit.setMask("dry", { kind = "group", group = 1, invert = true })). - Foliage: shaded leaf masses and bark take scratchy strokes, which reads well as drawn trees; strokes stay in the world while swaying leaves move through them.
- World text: mid-tone signs take streaks that can break small letters. Exclude labels a player must read by name:
StyleKit.options({ exclude = { "labelName" } }). - Black stays black: it returns through
sk_finish, and dark ink only darkens, so an unlit pixel stays black; white strokes on a part of the scene with no light at all are held black too.
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.