inkBlocks.package
- ..
- .metadata185 B
- README.md4.8 KB
- block.yaml3.3 KB
This package holds more than this page lists. See all of its files in its world.
README.md
Dry brush line (styleBlock, Line)
A dry ink brush dragged along every edge: a broad, rough line broken by bristle streaks and the paper's tooth, heavier where the brush was reloaded: the scratchy, textured outline of dry-brush ink drawing, woodcut-like illustration and gritty comics.
Settings: width (3.4), ink (#0f0e0f), setInk (1), opacity (1), silhouette (1), crease (0.8), creaseAngle (0.3), contact (0.45), threshold (0.02), thinNear (4), thinFar (45), farWidth (0.35), fadeEnd (140), paperBreak (0.1), wobble (1), curve (0.5), dryness (0.5), streakPx (5), stretch (9), strokePx (140). Low quality draws no contact lines (contact 0) and finds edges with one ring of taps instead of two; like every block it runs at half resolution there, and with no copy of the surface's colour and normals creases come from depth alone (so only within 25 m) and curves are not weighted.
It finds edges the same way as the pen line (silhouettes on the near side only, folds, colour contacts faded out from 8 to 22 m) and reads the shared ground, the wobble and the pigment set. A load of ink lasts about strokePx reference pixels along an edge, laid on the surface: just after each reload the line is at full width, and as the ink runs low it narrows to 60% and gets drier. Bristle streaks about streakPx across and stretch times as long run along the edge's direction on screen, laid on the surface and kept at their size in the picture (two sizes blended by distance). Where a streak and a peak of the shared paper's tooth meet, the brush touches; the drier the brush (dryness), the more of the line it skips. This block breaks the line on the tooth through dryness; it declares paperBreak like every inkBlocks line, so settings carry over in a swap, but this shader does not read it. Distance thins the line from thinNear to thinFar and fades it by fadeEnd. The ink follows the picked ink set by setInk; a watercolor set leaves the line its own ink. It has no boil of its own and swaps in one change with the other ink lines and with depthLine and sketchLine.
What it gives up in motion
The edges are found again every frame, so the line stays on them under any camera move. The streaks and the reloads are laid on the surface and keep their size in the picture, growing into the next size as you walk closer rather than sliding; on a moving character or prop they come from world position and slide along its outline. The streaks point along the edge's direction on screen, so they turn with an edge as the camera orbits. The broken edge follows the shared ground's tooth, so it changes with the paper picked (a rougher Ground block breaks it more). With a Time block it trembles with the stack on the held clock, never per frame. streakPx cannot go below 1.5 reference pixels, so the streaks never become fine stripes.
How it treats content
- Opaque things: outlined with a broad, broken, streaky line, heavier on curves and just after each reload.
- Transparent things (glass, water): no depth, so glass and water get no line of their own; the edges behind them are dragged through them, over their colour.
- Particles and smoke: no outline around smoke or sparks; lines of things behind soft smoke are drawn on top of it.
- Sky: never inked; a silhouette against the sky is drawn on the near side.
- Fog: lines come from depth, so fog does not thin them; distance does. In thick fog set
fadeEndnear the fog's far distance. - Skinned characters: outlines follow every pose; streaks and reloads slide along a moving body. Keep it off toon materials that draw their own outline (toonMaterials' ToonInk) with a group mask, so one thing owns each outline.
- Foliage: leaf edges become a scratchy mass, which reads well as bark and brush; far branches can shimmer. Raise
thresholdor lowerfadeEndfor calmer trees. - World text: the broad broken line breaks small letters apart. Exclude labels a player must read by name:
StyleKit.options({ exclude = { "labelName" } }). - Black stays black: it returns through
sk_finish, so the brush only darkens what is there and an unlit pixel stays black; with white ink, lines on parts that get 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.