Log inGet started
World

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

README.md

Depth line (styleBlock, Line)

Draws a clean ink outline where depth jumps and where surfaces fold, the same weight everywhere, for comic, cartoon and technical drawing looks.

Settings: width (1.6 reference px), ink (near black), opacity (0.9), silhouette (1), crease (0.6), threshold (0.02), creaseAngle (0.35), fadeStart (40 m), fadeEnd (120 m), grainBreak (0.2), wobble (1). Low quality samples two directions instead of four and draws no creases.

How it reads: silhouettes come from the inverse of the shared view distance, which is linear across any flat surface on screen, so a floor grazing to the horizon draws no false lines; the line lands on the near side of an edge only, so two touching objects never get a doubled outline. Creases come from the shared normals. The ink is broken by the shared ground's grain (grainBreak) and follows the shared wobble, so it boils with a wash on one clock and the paper shows through it.

What it gives up in motion

Lines are found again every frame from the opaque depth, so they do not carry history: a part thinner than a line (wires, fence slats, far railings) can shimmer as it crosses pixels, and a crease drawn from normals pops in and out as a curved surface turns past creaseAngle. Line weight is constant on screen, so it does not shrink with distance until fadeStart.

How it treats content

  • Opaque things: outlined and creased.
  • Transparent things (glass, water): not in the depth, so they get no outline; objects behind glass keep theirs, drawn over the glass colour.
  • Particles and smoke: no outline; lines of objects behind smoke stay visible through it.
  • Sky: never lined; objects get an outline against it.
  • Fog: lines are drawn over fog at full ink until fadeStart; lower fadeEnd to sink far lines into fog.
  • Skinned characters: outlined from their depth each frame, so a fast character keeps a clean line.
  • Foliage: alpha-cut leaves are in the depth and get busy outlines; raise threshold or mask foliage out with a group mask.
  • World text: text drawn as geometry gets outlined like any object, which can make small letters heavy; exclude labels.
  • Black stays black: in a frame with no light the line is not drawn.

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.