Style Cookbook: Mix Your Own Art Style from Stackable Look Blocks
README.md
lookbookKit
The Lookbook: a scripted test scene with one repeatable 26-second camera path whose stops each test one way a look fails, plus the code that plays it over any style stack, saves the same frames for side-by-side comparison and measures stability with real numbers.
Version 1.0.53. Depends on styleKit 1.7.8 and starterBlocks 1.0.49 (the tests, the combination test and the reference looks use its blocks).
Install and use
Install lookbookKit from ZeroMind (search "lookbookKit" or "style lookbook test scene"); it brings styleKit and starterBlocks along (the Lookbook's tests, combination test and reference looks use starterBlocks' blocks). Installs with several dependencies can be slow (#21420), so give an install time to finish and check /zero/source for the package folder. Every call below loads the Lookbook scene first when it is not loaded (Lookbook.ensureScene()), so you can start from any scene:
local Lookbook = require("~lookbookKit.Lookbook")
local StyleKit = require("~styleKit.StyleKit")
StyleKit.load({ { block = "posterize" }, { block = "depthLine" } })
local shots = Lookbook.run({ label = "posterInk" }) -- the same frames, as PNGs
local numbers = Lookbook.measure({ dt = 1 / 15 }) -- stability numbers, styled and unstyled
print(numbers.stylized.all.warpedDiff, numbers.stylized.markStuck, numbers.passMs.high.total)
local cmp = Lookbook.compare({ { block = "depthLine" } }, { { block = "sketchLine" } }) -- two stacks side by side
print(cmp.sideBySide[1].file) -- stack A on the left, B on the right
Lookbook.combos("depthLine") -- the combination test
From the shell: zero lookbook measure, zero lookbook run myLook, zero lookbook combos depthLine.
The stops
One camera path, 26 seconds, the same every time (everything that moves is driven by the Lookbook's clock, so the same moment gives the same frame):
| # | Stop | What it tests |
|---|---|---|
| 1 | Textured wall | A fine texture under a pan, a dolly, an orbit and a 10x zoom: marks that slide, swim or keep their screen size. |
| 2 | Flat grey wall under a slow light change | Banding and steps sweeping across a flat surface as light changes slowly. |
| 3 | Thin geometry | Wires and fence slats thinner than a line: shimmer and broken lines. |
| 4 | Floor grazing to the horizon | False lines and mark noise on a surface seen edge-on. |
| 5 | Fast skinned character | Lines and marks on a fast, deforming body. |
| 6 | Contact and intersection | Double outlines and halos where objects touch and cut through each other. |
| 7 | Wind-blown foliage | Busy edges and flicker on swaying leaf cards. |
| 8 | Transparency | Glass, water and smoke over lined objects. |
| 9 | Rotating sun, moving spot, zero lights | Light-dependent blocks under moving light, and a moment with every light off, where the frame must stay black. |
| 10 | Depth planes with fog and sky | Planes from 5 to 160 m in fog: line fading, mark size with distance, sky treatment. |
| 11 | Mixed animation rates | Objects stepping at 6, 12, 24 and 60 per second beside smooth motion and the held clock. |
| 12 | Excluded object, world label and UI | An object the stack must leave alone, a label in the world, and screen UI that must stay readable. |
LookbookPath.segments() names the moments the measurements read: pan, dolly, orbit, zoom, slowLight, sunRotate, zeroLights, excluded. Packages can add stops after the core path with LookbookPath.extend(stop) (lookbookShowcaseKit adds one built from published kits).
The numbers
Everything is measured on the frame the player saw, after antialiasing, the upscale and the stack, before the UI, by the lookbookProbe render feature on the GPU, and read back:
- warpedDiff: the mean difference (0..255) between each frame and the one before it, warped along the motion vectors, with newly revealed pixels left out (
revealedSharesays how many). A stable look scores close to the unstyled frame; boil and grain raise it on purpose. - marks / marksWarped / marksSameSpot / markStuck: the stack's own marks are the frame the player saw less the frame before the stack.
marksis how strong their fine detail is;marksWarpedandmarksSameSpotcorrelate it with the previous frame along motion and on the same screen spot. During the pan, markStuck = sameSpot less warped: clearly negative when the marks stay on things (plain paper reads about -0.52), clearly positive when they are stuck to the screen. markStuckBy gives the same score for every move of the path that has marks to score (pan,orbit,dolly,zoomand the rest ofLookbookPath.segments()). Absent when a stack leaves no marks of its own: an empty stack has none. - detailWarped / detailSameSpot: how well fine detail (a pixel less the mean of its four neighbours) correlates with the previous frame along motion, and on the same screen spot. During the pan, screenStuck = same spot minus warped: positive means marks stay on the screen instead of on things.
- zoomMarks: the typical size of fine marks (pixels between detail sign changes) at the start and the end of the 10x zoom. Marks that stay on things grow with the zoom (
growthwell above 1); marks stuck to the screen keep their size (growthnear 1). - passMs: GPU milliseconds per style pass (
post.sk.<entry>.<block>) and their total, measured over the pan at each quality tier asked for (high and low by default). - baseline: the same numbers for the unstyled frame, measured in the same run.
- missed: frames the probe could not read back (0 in every run so far); a run with misses is not comparable.
How a run steps: the probe itself places the camera and the clock one dt step per drawn frame, and measures every frame against the frame before it, so the camera moves on every frame as a player's does and two runs place the same poses and measure the same frames, whatever the frame rate. Two runs of the same stack give identical numbers.
Lookbook.compare(a, b) photographs the same moments for both stacks (<folder>/a, <folder>/b), writes one side-by-side picture per moment (<folder>/side_<T>_<stop>.png, A left, B right) and measures both (numbers.a, numbers.b; pass numbers = false to skip).
Lookbook.combos(blockId) puts the block with one partner from every other slot (partners at strength 0.6), plays the pan, then swaps the block for a sibling of its slot and plays it again. A round fails when an entry did not run, the engine logged errors, or no frame was measured.
Cost per look, and measuring on the web
Lookbook.cost() (shell: zero lookbook cost 1920 1080) times every style pass of a look over the pan, high and low quality, with the 3D view drawing at the size you ask for: in the editor the window is grown until the view itself is that size, so the numbers are for a real 1080p picture. The cost table for this release is in styleKit's README under "What a look costs".
On the web, one command does the whole report. Open this world in a browser engine, and in its shell run:
zero lookbook report
It first measures the frame rate in the scene you are in (Lookbook.frameRate(): no look, the Cookbook look on high, on low, taken in turns so a machine that speeds up or slows down meanwhile affects all three alike), then loads the Lookbook scene, measures the Cookbook stack over the full path (stability numbers beside the unstyled frame), prices every reference look at 1920 x 1080, writes /zero/source/tmp/lookbook/report_<platform>.md and .json, and puts the previous scene back. zero lookbook report true adds every block alone. A desktop run of the same command writes report_native.md, so the two sit side by side. The numbers do not depend on the frame rate (one measured step per drawn frame), so a slower browser gives the same stability numbers and only the milliseconds differ.
Parts
Lookbook.scene: the stops, the player setup, a synced empty StyleStack, theLookbookCamerathe runner routes to the viewport, the excluded objectLookbookExcluded, the world label and the screen panel.LookbookPath: the path (LENGTH,STOPS,pose(T),segments(),extend).LookbookClock: the Lookbook's time;LookbookAnimator: the component that moves everything from it.Lookbook:run,compare,measure,combos,frameAt,frameRate,cost,report,keyTimes,last,ensureScene,restoreScene.lookbookProberender feature and thelbStore/lbMeasurecompute shaders.lookbooktoolbox (measure,run,combos,cost,report) and thelookbooktest suite.
Known limits
- The runner takes the viewport (
camera.setEditorOverride) while it plays and gives it back after; do not drive the editor camera meanwhile. - A call made from another scene loads the Lookbook scene and leaves it loaded;
ensureScenereturns the scene it replaced andrestoreSceneputs it back (the test suite does both). - The numbers are taken one step per drawn frame at the
dtyou pass, so they do not depend on the frame rate; compare stacks measured with the samedt. Two runs of the same stack give the same numbers to every printed digit. - The smoke in the transparency stop is moving cards, since the engine's particle effects cannot be driven by the Lookbook's clock frame by frame.
- Offscreen captures do not draw the stack (styleKit runs after post); the Lookbook therefore always reads presented frames.
- Other engine issues that apply here: every render pass is queued again every frame, so script cost grows with the passes a look queues (#24548); a two-client editor sometimes refuses to load two different scenes at once (#24666, #24667); installs with several dependencies are slow (#21420); the ZeroMind description can lag one release (#19258); the web build was not checked from here (#20946).
Version history
1.0.52 (2026-11-12): pins starterBlocks 1.0.49, styleKit 1.7.8 (styleKit 1.7.8 logs no second refusal for the old roles field on a scene saved before styleKit 1.5). Nothing else changed.
1.0.51 (2026-11-12): pins starterBlocks 1.0.48, styleKit 1.7.7 (styleKit 1.7.7: a role set or look another player changes reaches everyone in the session). Nothing else changed.
1.0.50 (2026-11-12): pins starterBlocks 1.0.47, styleKit 1.7.6 (styleKit 1.7.6: an ink set by hand on one object reads as set, and a set for a kind of game carries its groups before a look is picked). Nothing else changed.
1.0.49 (2026-11-12): pins starterBlocks 1.0.46, styleKit 1.7.5 (styleKit 1.7.5: its checks pass where styleKit is installed alone). Nothing else changed.
1.0.48 (2026-11-12): pins starterBlocks 1.0.45, styleKit 1.7.4 (styleKit 1.7.4: installs on its own into an empty world again). Nothing else changed.
1.0.47 (2026-11-12): pins starterBlocks 1.0.44, styleKit 1.7.3 (styleKit 1.7.3: a role reaches what a kit draws in an object's place (pickupsKit's coins), and looks installed after the first scan are found). Nothing else changed.
1.0.46 (2026-11-12): pins starterBlocks 1.0.43, styleKit 1.7.0 (styleKit 1.7.0: role sets' glazes tell groups sharing a material apart, things with no role keep the plain line under a toon look, a look switched on never flashes black while its shaders compile). Nothing else changed.
1.0.45 (2026-11-11): a world that gets lookbookKit as another package's dependency (toonBlocks, pencilBlocks) now gets the Lookbook scene too. An install brings the parts of a dependency its users reference, and nothing named the scene, so such a world held the Lookbook's modules and no scene: ensureScene, the unlit-frame tests of toonBlocks, inkBlocks and paperBlocks, and zero lookbook all failed with "not found". Lookbook.sceneName() now lists the kit's scenes with literal selectors (asset.list({ type = "scene", path = ... })), which records the scene as the module's dependency, and finds it installed by the name it shares with the module. Checked in a freshly made world: 1.0.44 installed no scene.
1.0.44 (2026-11-11): Lookbook.sceneName(), the Lookbook scene's name where the kit is authored and where it is installed, used by ensureScene and restoreScene. (Meant to fix the unlit-frame tests in an installed world; it did not, because the scene was not installed at all: 1.0.45 fixes that.) Pins styleKit 1.6.5 and starterBlocks 1.0.42.
1.0.43 (2026-11-11): pins starterBlocks 1.0.41, styleKit 1.6.4 (styleKit 1.6.4 puts a role given to a player template on the body every joining player is copied from and rebuilds the role mask at most four times a second, and toonBlocks 1.3.6 starts its toon ink by itself and draws every role ink through one shared flood). Every README in the package (each block, look, shader and guide) now ends with a Known limits section naming the engine issues that apply there.
1.0.42 (2026-11-11): pins starterBlocks 1.0.40, styleKit 1.6.2 (styleKit 1.6.2 finds the scene's stack again when the one it held was removed (after a play restart a look or role set change failed with "the component this proxy names was removed")). Nothing else changed.
1.0.41 (2026-11-11): pins starterBlocks 1.0.39, styleKit 1.6.1. Nothing else changed.
1.0.40 (2026-11-11): pins starterBlocks 1.0.38, styleKit 1.5.1 (styleKit 1.5.1 keeps the scene's role set working in an editor that had an older styleKit open). Nothing else changed.
1.0.39 (2026-11-11): pins styleKit 1.5.0 and starterBlocks 1.0.37. Nothing else changed.
1.0.35 (2026-11-08): moves to the engine's current built-in library (@builtin e89b9db), whose update rewrote small reference files inside the package (a world on an older built-in library is hidden from players). Pins styleKit 1.4.21, starterBlocks 1.0.33. Nothing else changed.
1.0.34 (2026-11-08): moves to the engine's current built-in library (@builtin edb50c2), whose update rewrote small reference files inside the package (a world on an older built-in library is hidden from players). Pins styleKit 1.4.20 and starterBlocks 1.0.32. Nothing else changed.
1.0.33 (2026-11-08): moves to the engine's current built-in library (@builtin f4425a5), whose update rewrote small reference files inside the package (a world on an older built-in library is hidden from players). Pins styleKit 1.4.19 and starterBlocks 1.0.31. Nothing else changed.
1.0.32 (2026-11-08): moves to the engine's current built-in library (@builtin f39f044), whose update rewrote small reference files inside the package (a world on an older built-in library is hidden from players). Pins styleKit 1.4.18 and starterBlocks 1.0.30. Nothing else changed.
1.0.31 (2026-11-08): pins styleKit 1.4.15 and starterBlocks 1.0.29; the package's description now reads as a store listing (what you get and how to start), without a version number or a list of changes.
1.0.30 (2026-11-08): pins styleKit 1.4.14 and starterBlocks 1.0.28. Nothing else changed.
1.0.29 (2026-11-08): pins styleKit 1.4.13 and starterBlocks 1.0.27. Nothing else changed.
1.0.28 (2026-11-08): moves to the engine's current built-in library (@builtin f110cb3), whose update rewrote small reference files inside the package. Pins styleKit 1.4.12, starterBlocks 1.0.26. Nothing else changed.
1.0.27 (2026-11-08): moves to the engine's current built-in library (@builtin a29b227), whose update rewrote small reference files inside the package. Pins styleKit 1.4.11, starterBlocks 1.0.25. Nothing else changed.
1.0.26 (2026-11-08): moves to the engine's current built-in library (@builtin c61f473), whose update rewrote small reference files inside the package. Pins styleKit 1.4.10, starterBlocks 1.0.24. Nothing else changed.
1.0.25 (2026-11-07): moves to the engine's current built-in library (@builtin 7ca1f19), whose update rewrote small reference files inside the package. Pins styleKit 1.4.8, starterBlocks 1.0.23. Nothing else changed.
1.0.24 (2026-11-07): keeps its pins with the Cookbook's other packages, which moved to the engine's current built-in library (@builtin fdc9a99). Pins styleKit 1.4.7, starterBlocks 1.0.22. Nothing else changed.
1.0.23 (2026-11-07): moves to the engine's current built-in library (@builtin 7e13a48), whose update rewrote small reference files inside the package. Pins styleKit 1.4.6, starterBlocks 1.0.21. Nothing else changed.
1.0.22 (2026-11-07): moves to the engine's current built-in library (@builtin 2809239), whose update rewrote small reference files inside the package. Pins starterBlocks 1.0.20, styleKit 1.4.5. Nothing else changed.
1.0.21 (2026-11-07): the marks score reads the stack's marks again. The probe takes the stack's marks as the frame less the frame before the stack, and it mapped each pixel to the other image as a whole pixel times one size over the other; on current engine builds that product comes out a hair under the whole number, and truncating it read the frame before the stack one pixel to the left and up. The "marks" were then the picture's own one-pixel gradient, which sits on the screen, so every stack scored as stuck to the screen (plain paper +0.95, with an empty stack still showing marks of strength 15). It now samples at the pixel's centre: an empty stack has no marks, plain paper reads -0.52 and pencilBlocks' Pencil sketch -0.52. This was also the cause of the old known limit that the score swung with a few pixels of view size, which is gone. New markStuckBy: the score for every move of the path, not only the pan.
1.0.20 (2026-11-07): moves to the engine's current built-in library (@builtin 278f02f), whose update rewrote small reference files inside the package. No block, look or shader changed. Pins starterBlocks 1.0.19, styleKit 1.4.4.
1.0.19 (2026-11-07): moves to the engine's current built-in library (@builtin 6656162), whose update rewrote small reference files inside the package. No block, look or shader changed. Pins starterBlocks 1.0.18, styleKit 1.4.3.
1.0.18 (2026-11-07): moves to the engine's current built-in library (@builtin 808b4a1), whose update rewrote small reference files inside the package. Pins starterBlocks 1.0.17, styleKit 1.4.2. No block, look or shader changed.
1.0.17 (2026-11-07): depends on styleKit 1.4.1 and starterBlocks 1.0.16; no change to the Lookbook.
1.0.16 (2026-11-07): depends on styleKit 1.4.0 and starterBlocks 1.0.15; no change to the Lookbook. Measured on engine build d4061d2, the "marks on things" number reads positive for pencil looks whether they run on pencilBlocks 1.0.4 or 1.1.0 (Pencil sketch +0.68 and +0.67), where it read about -0.5 on 2026-11-03; the stack's marks are taken from the frame before the stack, and how that frame is taken on this build has not been checked yet.\n\n1.0.15 (2026-11-03): depends on styleKit 1.3.0 and starterBlocks 1.0.14; no change to the Lookbook.
1.0.14 (2026-11-02): a run no longer stalls when nobody touches the engine. The renderer draws only frames that show something new unless told otherwise; once it judged the picture still it declined frames, and a run, which steps one camera pose per drawn frame, sat waiting (often around step 90 of 780) until a click or a tool call woke it, then went on with its frames drawn at uneven moments, which also moved its numbers. measure, run and frameAt now hold every-frame drawing (renderer.setDrawEveryFrame(true)) for their whole length and put the previous setting back when they end, however they end.
1.0.13 (2026-11-02): needs styleKit 1.2.4 and starterBlocks 1.0.13; no block changed.
1.0.12 (2026-11-02): needs styleKit 1.2.3, which keeps the scene's sun on a block after its shader compiles (a fresh install could draw sun-lit blocks without their sun); no block changed.
1.0.11 (2026-11-01): Lookbook.measure states the 3D view size its motion numbers were measured at (result.size), and refuses a run whose view changed size halfway (an editor panel opening or the window resized), since every number depends on that size; built on styleKit 1.2.2, whose sun no longer carries over from the run before.
1.0.10 (2026-11-01): documentation only: install notes describe how installing works (install from ZeroMind search; installs with several dependencies can be slow) without naming internal ticket numbers.
1.0.9 (2026-11-01): documentation only: the install note says how installing works today (install from ZeroMind search; installs with several dependencies can be slow).
1.0.8 (2026-11-01): the report and Lookbook.cost also price the ink looks (brush and wash, comic) and line and wash wherever every block they name is installed (inkBlocks, watercolorBlocks), and the report adds the brush-and-wash ink look to its frame-rate table, so zero lookbook report in a web build gives the ink numbers too. Worlds without those kits get the same rows as before.
1.0.7 (2026-11-01): a measurement also waits until no shader has compiled and no GPU pipeline has been built for a whole second after its stack loads, so the first run after a scene load no longer measures frames drawn before the stack's shaders were ready.
1.0.6 (2026-11-01): every measurement waits until the stack it loads has finished compiling and the picture has settled before it starts, so the first run after a stack change no longer measures half-styled frames and two runs give the same numbers.
1.0.5 (2026-10-31): store listing rewritten for creators; built on styleKit 1.0.8 and starterBlocks 1.0.6.
1.0.4 (2026-10-31): depends on starterBlocks as well as styleKit, as it always used both; Lookbook.frameRate() measures the frame rate in the scene you are in (no look, high, low, in turns), and zero lookbook report starts with it, so a web run states its frame rate.
1.0.3 (2026-10-31): the probe steps and measures one frame per drawn frame, so two runs give identical numbers; markStuck tells marks on things from marks on the screen; compare writes side-by-side pictures and both stacks' numbers; run and compare save frames again; every call loads the Lookbook scene itself; cost and report for 1080p and web numbers; the Lookbook panel no longer dims every frame; new tests for repeatability, stuck marks and combined stacks.
1.0.2 (2026-10-31): runs drive the stack's clock with the Lookbook's time, so a stack with boil or grain gives the same numbers run after run; the probe measures nearly every frame instead of about half; GPU timings are read only once the profiler's window holds the tier alone.
1.0.1 (2026-10-31): frameAt, the test suite, frames after a cut left out of the numbers, a run camera of its own, GPU timings counted only for the stack being measured.
1.0.0 (2026-10-31): first release.