Log inGet started
World

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

README.md

Ruled notebook (paperBlocks, Ground)

A ruled notebook page: smooth bright paper with pale blue lines, a little thirsty, for doodles and school-book looks. Smooth bright paper with pale blue ruled lines laid on every surface, about 30 reference pixels apart.

local StyleKit = require("~styleKit.StyleKit")
StyleKit.swap("paper", "paperNotebook")   -- replaces the stack's paper in one change

What it does to each kind of block

  • Watercolor: Washes spread a little (cheap paper), the ruling shows through them.
  • Ink: Lines feather slightly, like a ballpoint on cheap paper.
  • Lights: Lights are the bare page. The lines keep their spacing in the picture and fade to a flat tint where they would be too thin to draw.

Its defaults

tint #fbfaf5, toothHeight 0.15, toothSharpness 0.5, toothSize 3, fibre 0.05, fibreLength 4, fibreTone 0, mottle 0.03, rule 0.55, ruleColour #9db4d4, ruleSpacing 30, thirst 0.7, emboss 0.08, sheen 0, lights 0. Every other shared setting is at the shared default (no weave, ruling, foxing or dust).

How it moves and what it covers

  • Motion: the tooth, fibres, weave, blotches and spots are laid on the surfaces they cover (world position along each surface's main axis), so they stay on still things when the camera pans, dollies or zooms; each keeps about the same size in the picture by growing into the next octave rather than sliding, and anything finer than about two drawn pixels fades to its mean, so the distance never shimmers. On a moving prop or a skinned character the sheet slides across it (a full-frame pass has no per-object position).
  • Sky and fog: the sky gets the same sheet, laid on the view direction, so it stays put as you turn; fog is part of the picture and is laid on the paper like any other colour.
  • Transparent things and particles have no depth of their own, so the sheet under them is the sheet of the surface behind.
  • Foliage takes the sheet like any surface; very fine leaves read through its tooth.
  • World text and UI: the screen UI is drawn after the stack and stays readable; world labels take the paper unless they are left out (StyleKit.options({ exclude = { "LabelName" } }), ideally on a card of their own).
  • Black stays black: every pixel returns through styleKit's shared exit and the sheet only multiplies or is lit by the scene's own light, so with every light off the frame is black, never paper coloured.
  • Low quality: the same picture at half resolution; parts too fine for the smaller image are laid as their average instead of aliasing.

Swapping

Every paperBlocks paper shares the same settings, so StyleKit.swap("paper", "<other paper>") changes the sheet in one change and swapping back to the paper you had (inkPaper, wcColdPress, plainPaper or another paperBlocks paper) puts back exactly the settings it had. Keep your tuning across papers with StyleKit.swap("paper", "<other paper>", { keepSettings = true }).

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.