Log inGet started
World

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

README.md

Technical pen line (styleBlock, Line)

Edge lines in a fine technical pen: one even, steady stroke per edge with no wander, crisp folds, and construction lines that run a little past every corner, like an architect's or an engineer's sketch. In dark ink on white paper; on a dark or blue sheet (the blueprint look) the same line is drawn in white.

Part of pencilBlocks. Runs the shared pencilLine shader, so it takes every setting the other pencil lines take and swaps with them in one change: StyleKit.swap("line", "technicalPenLine"). This variant's own defaults: lead (#1d2433), darkness (1), hardness (1), pressure (0.6), tooth (0.15), smudge (0), width (1.0), strokes (1), wander (0.15), overshoot (16), variation (0.05), crease (1), creaseAngle (0.3), boil (0.1).

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.