Log inGet started
World

Style Cookbook: Mix Your Own Art Style from Stackable Look Blocks

README.md

Graphite 4B line (styleBlock, Line)

Edge lines in a soft 4B lead: dark, broad, slightly fuzzy strokes crossing in the shadows, with a soft shine where it lies heavy: outlines, folds and contacts drawn as wandering graphite pencil passes that break on the paper's tooth.

Part of pencilBlocks. Runs the shared pencilLine shader, so every line block takes the same settings and StyleKit.swap(entry, otherBlock, { keepSettings = true }) carries them across. This variant's own defaults: lead (#2c2e34), hardness (0.3), pressure (0.6), smudge (0.2), width (1.7), strokes (2), wander (1.8), overshoot (7), variation (0.6).

Pair it with graphite4BShade for the same medium's shading, or use it alone over the rendered picture, or over any shade or wash.

StyleKit.add("graphite4BLine", { id = "line" })
StyleKit.swap("line", "charcoalVineLine")   -- another medium's line, one change

What it gives up in motion

Edges are found from depth, normals and surface colour every frame, so outlines follow moving things exactly. The wander, the pressure along a line and the tooth breaks are laid on the surface under the line, so they stay put under camera moves and slide a little along a moving character. boil redraws a small part of the wander on each held step of the shared clock, never per frame. Lines thinner than about a drawn pixel fade instead of breaking into dashes.

How it treats content

  • Opaque things: outlines where depth jumps (on the near side only, so two outlines never double), folds between faces and contacts where differently coloured things meet.
  • Transparent things (glass, water): not in the depth, so no line is drawn round them; the line of what is behind shows through.
  • Particles and smoke: no lines.
  • Sky: no lines; a silhouette against the sky is drawn on the near side.
  • Fog: lines thin with distance (thinNear to thinFar) and are gone at fadeEnd.
  • Skinned characters: outlined from depth every frame, so the line moves with them; the wander and the tooth break are laid on world positions and slide a little along a moving character.
  • Foliage: alpha-tested leaves draw outlines; dense foliage can fill with lines, so raise threshold or mask it.
  • World text: exclude labels a player must read; the block leaves them as rendered.
  • Black stays black: 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.