# InkCheck (module)
Measures how much of a presented frame is printed in the woodblock look's own colours.
```luau
-- 1. capture { source = "presented", format = "png", save_path = "/source/tmp/shot.png" }
local InkCheck = require("~ukiyoeBlocks.InkCheck")
print(InkCheck.measure("/source/tmp/shot.png", { exclude = { 0.75, 0, 1, 0.17 } }).share) -- percent of pixels near an ink
```
- `InkCheck.references()`: the colours the current stack may print: the palette's inks, its shadow and air colours, the sky and water bands, cloud, foam and paper colours.
- `InkCheck.measure(path, { tolerance?, step?, exclude? })`: `{ share, samples, tolerance, references, worst }`. `share` is the percent of sampled pixels within `tolerance` (Oklab distance, default 0.06) of a reference colour; `worst` lists the most common colours that are not, so you can see what escaped the palette. `exclude` leaves out a rectangle (0..1 of the frame), such as a HUD panel.
# Woodblock (module)
The ukiyoeBlocks API: `local Woodblock = require("~ukiyoeBlocks.Woodblock")`.
- `Woodblock.apply(lookId, { keep?, roles? })`: a whole woodblock look in one change, with its palette and the woodblock role set; water level and weather carry over.
- `Woodblock.looks()`, `Woodblock.blocks(slot?)`, `Woodblock.describe()`.
- One piece at a time: `useLine(id)`, `usePaper(id)`, `usePalette(id)`, `useSky("dawn" | "day" | "dusk" | "night" | "shore")`, `shadows("ukiyoe" | "shinHanga" | "shinHangaNight")`, `pattern("waves" | "clouds" | "mist" | "snow", on)`, `registration(on, x?, y?)`, `margin(on, settings?)`.
- World state: `timeOfDay(t)`, `weather("rain" | "snow" | "clear", intensity?)`, `setWater(y)`. Weather is real Cloudburst weather in its ink looks (see `WoodblockWeather`); `weatherOf()` reads what is falling.
- Roles: `give(entity, "hero" | "enemy" | "friendly" | ...)`.
- `clear()` takes the look off.
Every call is a change to the scene's synced styleKit stack: every player sees it, a late joiner gets it with the scene, and it is saved with the scene.
# WoodblockFast (component)
The one-effect fast setting of ukiyoeBlocks. `require("~ukiyoeBlocks.Woodblock").fast(true)` puts it on a synced holder entity called `WoodblockFast`, with settings derived from the woodblock look on the stack (palette, line, sky, water, weather, margin, registration), and switches the stack's entries off; on every machine it registers the `woodblockFast` engine screen effect and writes its settings when they change. `fast(false)` removes it and switches the entries back on. Every field is synced, so every player, a late joiner included, draws the same fast print. No per-frame script: the sun and the held clock are written a few times a second.
# WoodblockLight (component)
The cast-shadow switch behind ukiyoeBlocks' Light slot. A post effect cannot remove a cast shadow from a frame that carries no base colour (the forward render path), so the ukiyo-e light (`lightUkiyoe`, `castShadows = 0`) asks the scene's sun to cast none instead.
- Runs on every player's machine from a synced holder entity named `WoodblockLight`, which `Woodblock.apply` and `Woodblock.useLight` place, so late joiners get it with the scene.
- While the style stack holds an enabled Light entry with `castShadows` below 0.5, the sun casts no shadows on this machine; when the entry goes, the sun gets back the setting it had. It changes nothing else.
- `switchSun = false` leaves the sun alone. Deleting the holder restores the sun.
- `steadyLines` (on by default): while a look is on, the engine's temporal antialiasing stands aside on every machine, because its per-frame sub-pixel jitter makes lines found in the frame shimmer by a pixel on a still camera. It is handed back unchanged when the look is cleared or the holder is deleted. Set it false to keep TAA (lines then shimmer slightly).
- `tier`: the stack resolution every machine draws at (`low` by default).
- `holding()` says whether it has the sun's shadows switched off now.
Only the sun (the scene's directional light) is switched; lanterns and other local lights keep theirs.
The full-frame pass of the bokashi blocks (ukiyoeBlocks): bokashiDawn, bokashiDay, bokashiDusk, bokashiNight and bokashiShore run it with their own defaults.
# Bokashi dawn sky (styleBlock, Fill)
A dawn sky printed in graded bands: indigo above, a band of rose and a warm ochre glow along the horizon, with pale morning water.
Runs the shared bokashi pass (`bokashi.shader`) with its own defaults, so it swaps with the other bokashi blocks with one change: `StyleKit.swap("bokashi", "bokashiDawn")`. Settings: `sky`, `top`, `mid`, `horizon`, `topAt`, `midAt`, `bands`, `bandSoft`, `wipe`, `clouds`, `cloudAt`, `cloudColour`, `water`, `waterLevel`, `shallow`, `deep`, `deepAt`, `reach`, `waterBands`, `keepWaves`.
For early morning and the first light over a lake.
Works on whatever sky the world already has (a skybox, a procedural sky, a painted sky): it repaints sky pixels by their height above the horizon and keeps the existing clouds as flat paper shapes. Water is found from the water level: an opaque water surface at that height facing up, or anything seen below it through transparent water. Set the level once with `require("~ukiyoeBlocks.Woodblock").setWater(y)`.
## What it gives up in motion
The bands are laid on the view direction's height and the streaks on compass direction, so they hold still in the world as the camera turns, like the sky itself. The cloud shapes follow the clouds the scene renders. On water the bands follow depth: where the bed shows through clear water they follow the bed; on an opaque sea they deepen with distance from the viewer, so walking along the shore slides them a little with you.
## How it treats content
- Opaque things: untouched, except surfaces lying exactly at the water level facing up, which read as water.
- Transparent things (glass, water): water is repainted by depth; glass shows what is behind it.
- Particles and smoke: kept as rendered over the sky.
- Sky: repainted in graded bands, clouds kept as flat shapes.
- Fog: fogged land is untouched; fogged sky takes the gradation.
- Skinned characters: untouched (a character wading is below the level only at its feet).
- Foliage: untouched.
- World text: untouched unless it lies flat at the water level.
- Black stays black: `sk_finish` keeps black black.
- Dim rooms: untouched; only the sky and water are repainted.
# Bokashi day sky (styleBlock, Fill)
A clear day sky printed as graded bands: deep Prussian blue wiped along the top, fading through soft blue to warm paper at the horizon, with water deepening from pale green at the shore to indigo.
Runs the shared bokashi pass (`bokashi.shader`) with its own defaults, so it swaps with the other bokashi blocks with one change: `StyleKit.swap("bokashi", "bokashiDay")`. Settings: `sky`, `top`, `mid`, `horizon`, `topAt`, `midAt`, `bands`, `bandSoft`, `wipe`, `clouds`, `cloudAt`, `cloudColour`, `water`, `waterLevel`, `shallow`, `deep`, `deepAt`, `reach`, `waterBands`, `keepWaves`.
The classic landscape sky.
Works on whatever sky the world already has (a skybox, a procedural sky, a painted sky): it repaints sky pixels by their height above the horizon and keeps the existing clouds as flat paper shapes. Water is found from the water level: an opaque water surface at that height facing up, or anything seen below it through transparent water. Set the level once with `require("~ukiyoeBlocks.Woodblock").setWater(y)`.
## What it gives up in motion
The bands are laid on the view direction's height and the streaks on compass direction, so they hold still in the world as the camera turns, like the sky itself. The cloud shapes follow the clouds the scene renders. On water the bands follow depth: where the bed shows through clear water they follow the bed; on an opaque sea they deepen with distance from the viewer, so walking along the shore slides them a little with you.
## How it treats content
- Opaque things: untouched, except surfaces lying exactly at the water level facing up, which read as water.
- Transparent things (glass, water): water is repainted by depth; glass shows what is behind it.
- Particles and smoke: kept as rendered over the sky.
- Sky: repainted in graded bands, clouds kept as flat shapes.
- Fog: fogged land is untouched; fogged sky takes the gradation.
- Skinned characters: untouched (a character wading is below the level only at its feet).
- Foliage: untouched.
- World text: untouched unless it lies flat at the water level.
- Black stays black: `sk_finish` keeps black black.
- Dim rooms: untouched; only the sky and water are repainted.
# Bokashi dusk sky (styleBlock, Fill)
A dusk sky printed in graded bands: deep indigo above, a burning vermilion band and an orange glow at the horizon, water darkening to night blue.
Runs the shared bokashi pass (`bokashi.shader`) with its own defaults, so it swaps with the other bokashi blocks with one change: `StyleKit.swap("bokashi", "bokashiDusk")`. Settings: `sky`, `top`, `mid`, `horizon`, `topAt`, `midAt`, `bands`, `bandSoft`, `wipe`, `clouds`, `cloudAt`, `cloudColour`, `water`, `waterLevel`, `shallow`, `deep`, `deepAt`, `reach`, `waterBands`, `keepWaves`.
For the warm shin-hanga evening.
Works on whatever sky the world already has (a skybox, a procedural sky, a painted sky): it repaints sky pixels by their height above the horizon and keeps the existing clouds as flat paper shapes. Water is found from the water level: an opaque water surface at that height facing up, or anything seen below it through transparent water. Set the level once with `require("~ukiyoeBlocks.Woodblock").setWater(y)`.
## What it gives up in motion
The bands are laid on the view direction's height and the streaks on compass direction, so they hold still in the world as the camera turns, like the sky itself. The cloud shapes follow the clouds the scene renders. On water the bands follow depth: where the bed shows through clear water they follow the bed; on an opaque sea they deepen with distance from the viewer, so walking along the shore slides them a little with you.
## How it treats content
- Opaque things: untouched, except surfaces lying exactly at the water level facing up, which read as water.
- Transparent things (glass, water): water is repainted by depth; glass shows what is behind it.
- Particles and smoke: kept as rendered over the sky.
- Sky: repainted in graded bands, clouds kept as flat shapes.
- Fog: fogged land is untouched; fogged sky takes the gradation.
- Skinned characters: untouched (a character wading is below the level only at its feet).
- Foliage: untouched.
- World text: untouched unless it lies flat at the water level.
- Black stays black: `sk_finish` keeps black black.
- Dim rooms: untouched; only the sky and water are repainted.
# Bokashi night sky (styleBlock, Fill)
A night sky printed in graded bands: near-black indigo above fading to a pale grey-blue glow at the horizon, clouds as soft grey shapes, dark water.
Runs the shared bokashi pass (`bokashi.shader`) with its own defaults, so it swaps with the other bokashi blocks with one change: `StyleKit.swap("bokashi", "bokashiNight")`. Settings: `sky`, `top`, `mid`, `horizon`, `topAt`, `midAt`, `bands`, `bandSoft`, `wipe`, `clouds`, `cloudAt`, `cloudColour`, `water`, `waterLevel`, `shallow`, `deep`, `deepAt`, `reach`, `waterBands`, `keepWaves`.
Pairs with the night palette and the shin-hanga night fill.
Works on whatever sky the world already has (a skybox, a procedural sky, a painted sky): it repaints sky pixels by their height above the horizon and keeps the existing clouds as flat paper shapes. Water is found from the water level: an opaque water surface at that height facing up, or anything seen below it through transparent water. Set the level once with `require("~ukiyoeBlocks.Woodblock").setWater(y)`.
## What it gives up in motion
The bands are laid on the view direction's height and the streaks on compass direction, so they hold still in the world as the camera turns, like the sky itself. The cloud shapes follow the clouds the scene renders. On water the bands follow depth: where the bed shows through clear water they follow the bed; on an opaque sea they deepen with distance from the viewer, so walking along the shore slides them a little with you.
## How it treats content
- Opaque things: untouched, except surfaces lying exactly at the water level facing up, which read as water.
- Transparent things (glass, water): water is repainted by depth; glass shows what is behind it.
- Particles and smoke: kept as rendered over the sky.
- Sky: repainted in graded bands, clouds kept as flat shapes.
- Fog: fogged land is untouched; fogged sky takes the gradation.
- Skinned characters: untouched (a character wading is below the level only at its feet).
- Foliage: untouched.
- World text: untouched unless it lies flat at the water level.
- Black stays black: `sk_finish` keeps black black.
- Dim rooms: untouched; only the sky and water are repainted.
# Bokashi shore water (styleBlock, Fill)
Water only, printed as graded bands that deepen from pale aqua at the shore to deep indigo offshore, the sea gradation of a woodblock coast print; the sky is left as it is.
Runs the shared bokashi pass (`bokashi.shader`) with its own defaults, so it swaps with the other bokashi blocks with one change: `StyleKit.swap("bokashi", "bokashiShore")`. Settings: `sky`, `top`, `mid`, `horizon`, `topAt`, `midAt`, `bands`, `bandSoft`, `wipe`, `clouds`, `cloudAt`, `cloudColour`, `water`, `waterLevel`, `shallow`, `deep`, `deepAt`, `reach`, `waterBands`, `keepWaves`.
Use it beside a painted sky, or over a sky from another package.
Works on whatever sky the world already has (a skybox, a procedural sky, a painted sky): it repaints sky pixels by their height above the horizon and keeps the existing clouds as flat paper shapes. Water is found from the water level: an opaque water surface at that height facing up, or anything seen below it through transparent water. Set the level once with `require("~ukiyoeBlocks.Woodblock").setWater(y)`.
## What it gives up in motion
The bands are laid on the view direction's height and the streaks on compass direction, so they hold still in the world as the camera turns, like the sky itself. The cloud shapes follow the clouds the scene renders. On water the bands follow depth: where the bed shows through clear water they follow the bed; on an opaque sea they deepen with distance from the viewer, so walking along the shore slides them a little with you.
## How it treats content
- Opaque things: untouched, except surfaces lying exactly at the water level facing up, which read as water.
- Transparent things (glass, water): water is repainted by depth; glass shows what is behind it.
- Particles and smoke: kept as rendered over the sky.
- Sky: repainted in graded bands, clouds kept as flat shapes.
- Fog: fogged land is untouched; fogged sky takes the gradation.
- Skinned characters: untouched (a character wading is below the level only at its feet).
- Foliage: untouched.
- World text: untouched unless it lies flat at the water level.
- Black stays black: `sk_finish` keeps black black.
- Dim rooms: untouched; only the sky and water are repainted.
# Shin-hanga light blocks (styleBlock, Fill)
Real light, shadow and mood kept and then flattened into a few colour blocks, shadows printed in cool indigo: the later shin-hanga woodblock style with its dusk glow, lamplight and rain.
Runs the shared flat woodblock colour pass (`hangiFlat.shader`) with its own defaults, so it swaps with the other woodblock fills with one change: `StyleKit.swap("fill", "flatShinHanga")`. Settings: `light`, `snap`, `flatten`, `flatPx`, `dayLevel`, `nightLevel`, `keepDark`, `glow`, `bands`, `bandSoft`, `litLevel`, `shadowDepth`, `shadowTint`, `setShadow`, `saturation`, `lift`, `air`, `airNear`, `airFar`, `skySnap`. Every tier averages the surface colour over twelve taps in two rings before it is printed in its ink, so textured ground reads as one flat colour.
The shin-hanga fill: the scene's light is kept and cut into three blocks, so a dusk street, a lantern and a rain-dark wall keep their mood.
It reads the scene's woodblock palette (a pigment set such as `classicPrint`, picked with `StyleKit.setPigments` or by a whole look) and pulls every colour to its nearest paints. With no palette picked it keeps the scene's own colours, flattened. It is the first block of the Fill chain (rank 10): bokashi, patterns, snow and the registration offset build on it.
## What it gives up in motion
Nothing slides: each pixel's colour comes from the surface colour under it, read again every frame. Texture detail inside a surface is evened out over a few reference pixels on the same surface, so a brick wall reads as one red that stays put as you walk. The day or night level follows the sun and moves only as fast as the sun does. Where the scene has no surface colour copy (forward path), the colour is estimated from the rendered frame and keeps a little of the shading.
## How it treats content
- Opaque things: flat palette colour; ukiyo-e has no shading or cast shadow, shin-hanga prints light in a few blocks.
- Transparent things (glass, water): not in the surface copy, so what is seen through them is printed; water is repainted by a bokashi block.
- Particles and smoke: kept as rendered over the flat colour behind them.
- Sky: only pulled a little toward the palette (`skySnap`); a bokashi block paints it.
- Fog: far things pale toward the palette's air colour (`air`), the printed version of fog.
- Skinned characters: flat colour from their surface colour, steady while they walk.
- Foliage: leaves flatten into the palette's greens; dense foliage reads as a mass.
- World text: its colours are pulled to the palette; exclude labels a player must read.
- Black stays black: `sk_finish` never lifts a pixel the scene left black.
- Dim rooms: `keepDark` keeps unlit interiors dark in the ukiyo-e mode; shin-hanga keeps the scene's own light.
# Shin-hanga night blocks (styleBlock, Fill)
Night light in two deep blocks: dark indigo shadows, moonlit faces and roofs, and lanterns that keep their warm glow, for night and night rain woodblock prints.
Runs the shared flat woodblock colour pass (`hangiFlat.shader`) with its own defaults, so it swaps with the other woodblock fills with one change: `StyleKit.swap("fill", "flatShinHangaNight")`. Settings: `light`, `snap`, `flatten`, `flatPx`, `dayLevel`, `nightLevel`, `keepDark`, `glow`, `bands`, `bandSoft`, `litLevel`, `shadowDepth`, `shadowTint`, `setShadow`, `saturation`, `lift`, `air`, `airNear`, `airFar`, `skySnap`. Every tier averages the surface colour over twelve taps in two rings before it is printed in its ink, so textured ground reads as one flat colour.
Made for night: two blocks of light, deep indigo shadows, warm lantern glow kept.
It reads the scene's woodblock palette (a pigment set such as `classicPrint`, picked with `StyleKit.setPigments` or by a whole look) and pulls every colour to its nearest paints. With no palette picked it keeps the scene's own colours, flattened. It is the first block of the Fill chain (rank 10): bokashi, patterns, snow and the registration offset build on it.
## What it gives up in motion
Nothing slides: each pixel's colour comes from the surface colour under it, read again every frame. Texture detail inside a surface is evened out over a few reference pixels on the same surface, so a brick wall reads as one red that stays put as you walk. The day or night level follows the sun and moves only as fast as the sun does. Where the scene has no surface colour copy (forward path), the colour is estimated from the rendered frame and keeps a little of the shading.
## How it treats content
- Opaque things: flat palette colour; ukiyo-e has no shading or cast shadow, shin-hanga prints light in a few blocks.
- Transparent things (glass, water): not in the surface copy, so what is seen through them is printed; water is repainted by a bokashi block.
- Particles and smoke: kept as rendered over the flat colour behind them.
- Sky: only pulled a little toward the palette (`skySnap`); a bokashi block paints it.
- Fog: far things pale toward the palette's air colour (`air`), the printed version of fog.
- Skinned characters: flat colour from their surface colour, steady while they walk.
- Foliage: leaves flatten into the palette's greens; dense foliage reads as a mass.
- World text: its colours are pulled to the palette; exclude labels a player must read.
- Black stays black: `sk_finish` never lifts a pixel the scene left black.
- Dim rooms: `keepDark` keeps unlit interiors dark in the ukiyo-e mode; shin-hanga keeps the scene's own light.
# Ukiyo-e flat colour (styleBlock, Fill)
Flat areas of colour from a small woodblock palette with no shading and no cast shadows at all, the way a classic ukiyo-e print is coloured: each roof, robe and hillside one printed colour.
Runs the shared flat woodblock colour pass (`hangiFlat.shader`) with its own defaults, so it swaps with the other woodblock fills with one change: `StyleKit.swap("fill", "flatUkiyoe")`. Settings: `light`, `snap`, `flatten`, `flatPx`, `dayLevel`, `nightLevel`, `keepDark`, `glow`, `bands`, `bandSoft`, `litLevel`, `shadowDepth`, `shadowTint`, `setShadow`, `saturation`, `lift`, `air`, `airNear`, `airFar`, `skySnap`. Every tier averages the surface colour over twelve taps in two rings before it is printed in its ink, so textured ground reads as one flat colour.
The classic ukiyo-e fill: light and shadow are dropped entirely; only the surface colour, pulled to the palette, is printed. Night still reads as night through the night level.
It reads the scene's woodblock palette (a pigment set such as `classicPrint`, picked with `StyleKit.setPigments` or by a whole look) and pulls every colour to its nearest paints. With no palette picked it keeps the scene's own colours, flattened. It is the first block of the Fill chain (rank 10): bokashi, patterns, snow and the registration offset build on it.
## What it gives up in motion
Nothing slides: each pixel's colour comes from the surface colour under it, read again every frame. Texture detail inside a surface is evened out over a few reference pixels on the same surface, so a brick wall reads as one red that stays put as you walk. The day or night level follows the sun and moves only as fast as the sun does. Where the scene has no surface colour copy (forward path), the colour is estimated from the rendered frame and keeps a little of the shading.
## How it treats content
- Opaque things: flat palette colour; ukiyo-e has no shading or cast shadow, shin-hanga prints light in a few blocks.
- Transparent things (glass, water): not in the surface copy, so what is seen through them is printed; water is repainted by a bokashi block.
- Particles and smoke: kept as rendered over the flat colour behind them.
- Sky: only pulled a little toward the palette (`skySnap`); a bokashi block paints it.
- Fog: far things pale toward the palette's air colour (`air`), the printed version of fog.
- Skinned characters: flat colour from their surface colour, steady while they walk.
- Foliage: leaves flatten into the palette's greens; dense foliage reads as a mass.
- World text: its colours are pulled to the palette; exclude labels a player must read.
- Black stays black: `sk_finish` never lifts a pixel the scene left black.
- Dim rooms: `keepDark` keeps unlit interiors dark in the ukiyo-e mode; shin-hanga keeps the scene's own light.
The full-frame pass of the flat woodblock colour blocks (ukiyoeBlocks): flatUkiyoe, flatShinHanga and flatShinHangaNight run it with their own defaults.
# Baren rubbing marks (styleBlock, Ground)
Round swirling rubbing marks of the baren pad showing in the inked areas, with soft fibres: the hand-pulled texture of a print rubbed by hand rather than pressed.
Runs the shared woodblock ground passes with its own defaults: the picture pass (`hangiGround.shader`) lays the print on the sheet, the field pass (`hangiGroundField.shader`) publishes the shared ground (sheet colour and surface height) that lines and fills read, and the paper pass (`hangiPaperTakes.shader`) publishes the paper field (thirsty washi with long fibres), so inkBlocks lines feather on it and watercolorBlocks washes spread on it. Swap with any paper, the Cookbook's included, with one change: `StyleKit.swap("paper", "barenRubbed")` or `StyleKit.swap("paper", "paperRice")`. It layers: `StyleKit.add("woodgrainStrong", { id = "oldBlock", mask = { kind = "sphere", center = { 0, 1, 0 }, radius = 8 } })` lays strong woodgrain over one region. Settings: `tint`, `age`, `fibre`, `fibreLength`, `foxing`, `woodgrain`, `grainPx`, `grainAngle`, `grainWarp`, `baren`, `barenPx`, `inkTake`, `thirst`, `edgeAge`. Low quality leaves out the baren marks.
Most visible in large flat areas of colour, such as skies and water.
## What it gives up in motion
The sheet, grain and rubbing are laid on world surfaces at a size held in reference pixels (two octaves blended by distance), so they stay on things under any camera move and never swim like a screen overlay; walking closer, the grain grows into the next ring size rather than zooming. They slide across moving characters. The edge browning (`edgeAge`) belongs to the sheet and is laid on the screen.
## How it treats content
- Opaque things: printed on the sheet; light areas become bare paper, inked areas take the grain and rubbing.
- Transparent things (glass, water): what is seen through them takes the sheet of what is behind.
- Particles and smoke: printed on the sheet of what is behind them.
- Sky: printed on the sheet (laid by view direction); light sky becomes bare paper.
- Fog: fogged colour is printed on the sheet like any other.
- Skinned characters: printed on the sheet; the grain slides a little as they move.
- Foliage: printed on the sheet.
- World text: printed on the sheet; exclude labels a player must read.
- Black stays black: `sk_finish` keeps black black.
- Dim rooms: the sheet multiplies colour, so a dark room stays dark.
A pass of the woodblock ground blocks (ukiyoeBlocks): washiFresh, washiAged, woodgrainStrong and barenRubbed.
A pass of the woodblock ground blocks (ukiyoeBlocks): washiFresh, washiAged, woodgrainStrong and barenRubbed.
A pass of the woodblock ground blocks (ukiyoeBlocks): washiFresh, washiAged, woodgrainStrong and barenRubbed.
# Aged yellowed washi (styleBlock, Ground)
Old washi yellowed with age, browned toward its edges and sprinkled with foxing spots, its colours sunk in: the sheet of a print that has hung for a century.
Runs the shared woodblock ground passes with its own defaults: the picture pass (`hangiGround.shader`) lays the print on the sheet, the field pass (`hangiGroundField.shader`) publishes the shared ground (sheet colour and surface height) that lines and fills read, and the paper pass (`hangiPaperTakes.shader`) publishes the paper field (thirsty washi with long fibres), so inkBlocks lines feather on it and watercolorBlocks washes spread on it. Swap with any paper, the Cookbook's included, with one change: `StyleKit.swap("paper", "washiAged")` or `StyleKit.swap("paper", "paperRice")`. It layers: `StyleKit.add("woodgrainStrong", { id = "oldBlock", mask = { kind = "sphere", center = { 0, 1, 0 }, radius = 8 } })` lays strong woodgrain over one region. Settings: `tint`, `age`, `fibre`, `fibreLength`, `foxing`, `woodgrain`, `grainPx`, `grainAngle`, `grainWarp`, `baren`, `barenPx`, `inkTake`, `thirst`, `edgeAge`. Low quality leaves out the baren marks.
Pairs with the faded palette and the worn line.
## What it gives up in motion
The sheet, grain and rubbing are laid on world surfaces at a size held in reference pixels (two octaves blended by distance), so they stay on things under any camera move and never swim like a screen overlay; walking closer, the grain grows into the next ring size rather than zooming. They slide across moving characters. The edge browning (`edgeAge`) belongs to the sheet and is laid on the screen.
## How it treats content
- Opaque things: printed on the sheet; light areas become bare paper, inked areas take the grain and rubbing.
- Transparent things (glass, water): what is seen through them takes the sheet of what is behind.
- Particles and smoke: printed on the sheet of what is behind them.
- Sky: printed on the sheet (laid by view direction); light sky becomes bare paper.
- Fog: fogged colour is printed on the sheet like any other.
- Skinned characters: printed on the sheet; the grain slides a little as they move.
- Foliage: printed on the sheet.
- World text: printed on the sheet; exclude labels a player must read.
- Black stays black: `sk_finish` keeps black black.
- Dim rooms: the sheet multiplies colour, so a dark room stays dark.
# Fresh washi (styleBlock, Ground)
Fresh, bright washi paper with soft long fibres and a faint woodgrain in the inked areas: the clean sheet of a newly pulled woodblock print.
Runs the shared woodblock ground passes with its own defaults: the picture pass (`hangiGround.shader`) lays the print on the sheet, the field pass (`hangiGroundField.shader`) publishes the shared ground (sheet colour and surface height) that lines and fills read, and the paper pass (`hangiPaperTakes.shader`) publishes the paper field (thirsty washi with long fibres), so inkBlocks lines feather on it and watercolorBlocks washes spread on it. Swap with any paper, the Cookbook's included, with one change: `StyleKit.swap("paper", "washiFresh")` or `StyleKit.swap("paper", "paperRice")`. It layers: `StyleKit.add("woodgrainStrong", { id = "oldBlock", mask = { kind = "sphere", center = { 0, 1, 0 }, radius = 8 } })` lays strong woodgrain over one region. Settings: `tint`, `age`, `fibre`, `fibreLength`, `foxing`, `woodgrain`, `grainPx`, `grainAngle`, `grainWarp`, `baren`, `barenPx`, `inkTake`, `thirst`, `edgeAge`. Low quality leaves out the baren marks.
The default sheet for every whole look.
## What it gives up in motion
The sheet, grain and rubbing are laid on world surfaces at a size held in reference pixels (two octaves blended by distance), so they stay on things under any camera move and never swim like a screen overlay; walking closer, the grain grows into the next ring size rather than zooming. They slide across moving characters. The edge browning (`edgeAge`) belongs to the sheet and is laid on the screen.
## How it treats content
- Opaque things: printed on the sheet; light areas become bare paper, inked areas take the grain and rubbing.
- Transparent things (glass, water): what is seen through them takes the sheet of what is behind.
- Particles and smoke: printed on the sheet of what is behind them.
- Sky: printed on the sheet (laid by view direction); light sky becomes bare paper.
- Fog: fogged colour is printed on the sheet like any other.
- Skinned characters: printed on the sheet; the grain slides a little as they move.
- Foliage: printed on the sheet.
- World text: printed on the sheet; exclude labels a player must read.
- Black stays black: `sk_finish` keeps black black.
- Dim rooms: the sheet multiplies colour, so a dark room stays dark.
# Strong woodgrain (styleBlock, Ground)
Strong woodgrain printing through every inked area in wandering rings, as when a printer pulls a deliberately grainy impression from a cherry block.
Runs the shared woodblock ground passes with its own defaults: the picture pass (`hangiGround.shader`) lays the print on the sheet, the field pass (`hangiGroundField.shader`) publishes the shared ground (sheet colour and surface height) that lines and fills read, and the paper pass (`hangiPaperTakes.shader`) publishes the paper field (thirsty washi with long fibres), so inkBlocks lines feather on it and watercolorBlocks washes spread on it. Swap with any paper, the Cookbook's included, with one change: `StyleKit.swap("paper", "woodgrainStrong")` or `StyleKit.swap("paper", "paperRice")`. It layers: `StyleKit.add("woodgrainStrong", { id = "oldBlock", mask = { kind = "sphere", center = { 0, 1, 0 }, radius = 8 } })` lays strong woodgrain over one region. Settings: `tint`, `age`, `fibre`, `fibreLength`, `foxing`, `woodgrain`, `grainPx`, `grainAngle`, `grainWarp`, `baren`, `barenPx`, `inkTake`, `thirst`, `edgeAge`. Low quality leaves out the baren marks.
Strong enough to read in skies and water as well as on things; lower `woodgrain` if it fights a pattern block.
## What it gives up in motion
The sheet, grain and rubbing are laid on world surfaces at a size held in reference pixels (two octaves blended by distance), so they stay on things under any camera move and never swim like a screen overlay; walking closer, the grain grows into the next ring size rather than zooming. They slide across moving characters. The edge browning (`edgeAge`) belongs to the sheet and is laid on the screen.
## How it treats content
- Opaque things: printed on the sheet; light areas become bare paper, inked areas take the grain and rubbing.
- Transparent things (glass, water): what is seen through them takes the sheet of what is behind.
- Particles and smoke: printed on the sheet of what is behind them.
- Sky: printed on the sheet (laid by view direction); light sky becomes bare paper.
- Fog: fogged colour is printed on the sheet like any other.
- Skinned characters: printed on the sheet; the grain slides a little as they move.
- Foliage: printed on the sheet.
- World text: printed on the sheet; exclude labels a player must read.
- Black stays black: `sk_finish` keeps black black.
- Dim rooms: the sheet multiplies colour, so a dark room stays dark.
# hangiLight (shader)
The shared shader behind ukiyoeBlocks' Light slot blocks `lightUkiyoe` and `lightShinHanga`. It evens the rendered light toward a flat level (`even`, `floor`), keeps true darkness dark and can tint the shadow side cool (`shadowTint`, `tint`). `castShadows` is read by the `WoodblockLight` helper component, not by the shader: 0 turns the sun's cast shadows off on every machine while the block is in the stack.
# lightShinHanga
A Light slot block of ukiyoeBlocks. See block.yaml for its settings.
## What it gives up in motion
Nothing: it changes no marks and has no clock.
## How it treats content
Opaque surfaces: light evened (see settings). Sky: untouched. Transparent things and particles: treated as what is behind them. Skinned characters: same as any surface. Cast shadows: kept.
- Fog: treated as the surface behind it; fogged distance is evened like any other light.
- Foliage: like any opaque surface; its cast shadows go with the sun's.
- World text and labels: evened like any surface; exclude a label that must read exactly (StyleKit.options exclude).
# lightUkiyoe
A Light slot block of ukiyoeBlocks. See block.yaml for its settings.
## What it gives up in motion
Nothing: it changes no marks and has no clock.
## How it treats content
Opaque surfaces: light evened (see settings). Sky: untouched. Transparent things and particles: treated as what is behind them. Skinned characters: same as any surface. Cast shadows: switched off at the sun on every machine while the block is on (WoodblockLight helper), back when it is removed.
- Fog: treated as the surface behind it; fogged distance is evened like any other light.
- Foliage: like any opaque surface; its cast shadows go with the sun's.
- World text and labels: evened like any surface; exclude a label that must read exactly (StyleKit.options exclude).
# Tapering brush-cut line (styleBlock, Line)
A tapering line that swells and narrows along every edge like a knife following a brushed drawing: lively contours for robes, waves and running figures in a woodblock print.
Runs the shared carved key line pass (`hangiLine.shader`) with its own defaults, so it swaps with every other woodblock line with one change and settings keep their meaning: `StyleKit.swap("line", "brushCutLine")`. Settings: `width`, `inner`, `ink`, `setInk`, `opacity`, `silhouette`, `crease`, `creaseAngle`, `contact`, `threshold`, `thinNear`, `thinFar`, `farWidth`, `fadeEnd`, `taper`, `cutPx`, `wear`, `wearPx`, `surfaceColour`, `colourDepth`, `steady`, `paperBreak`, `wobble`. Low quality draws no colour contacts.
The carver follows the painter's brush: each stroke swells in its middle and narrows to a point at its ends.
Weight is varied the way a key block is cut: the outer contour (where depth jumps) is drawn at `width`, inner lines on folds, faces and hands at `width x inner`, and every line thins with distance. A style role multiplies the weight per object (the hero heavier, the crowd finer).
## What it gives up in motion
Lines are found again every frame from depth and normals, so they stay on the edges they belong to under any pan, dolly or orbit, and a walking character's outline moves with it without crawling. Widths below about one drawn pixel fade instead of breaking into dashes, so far lines never shimmer. Taper and wear are laid on surface positions: on still things they hold exactly; on moving things they would slide, so on any object with a style role (give characters a role) they are calmed by `steady`. Nothing changes on its own over time.
## How it treats content
- Opaque things: outlined, heavy outside and fine inside.
- Transparent things (glass, water): not in the depth, so they draw no line of their own; what is behind them is outlined.
- Particles and smoke: no line.
- Sky: no line; the horizon is outlined where land meets sky.
- Fog: lines thin and fade out with distance by `fadeEnd`.
- Skinned characters: outlined from depth every frame, steady while they walk; give them a role for an unbroken, heavier or lighter line.
- Foliage: leaves are outlined where they stand against something farther; dense foliage reads as a mass of fine lines far away and is faded by distance.
- World text: lines are drawn on its edges; exclude labels a player must read with `StyleKit.options({ exclude = { ... } })`.
- Black stays black: the line only darkens, and `sk_finish` keeps black black.
- Dim rooms: lines only darken, so a dim room stays dim.
# Coloured line (styleBlock, Line)
A key line printed in colour rather than black: each outline is a deep shade of the colour it bounds (deep indigo round blue robes, dark rust round vermilion), the soft coloured contours of later prints and landscapes.
Runs the shared carved key line pass (`hangiLine.shader`) with its own defaults, so it swaps with every other woodblock line with one change and settings keep their meaning: `StyleKit.swap("line", "colourLine")`. Settings: `width`, `inner`, `ink`, `setInk`, `opacity`, `silhouette`, `crease`, `creaseAngle`, `contact`, `threshold`, `thinNear`, `thinFar`, `farWidth`, `fadeEnd`, `taper`, `cutPx`, `wear`, `wearPx`, `surfaceColour`, `colourDepth`, `steady`, `paperBreak`, `wobble`. Low quality draws no colour contacts.
Use it for gentle landscapes and snow scenes, where a black line would be too hard.
Weight is varied the way a key block is cut: the outer contour (where depth jumps) is drawn at `width`, inner lines on folds, faces and hands at `width x inner`, and every line thins with distance. A style role multiplies the weight per object (the hero heavier, the crowd finer).
## What it gives up in motion
Lines are found again every frame from depth and normals, so they stay on the edges they belong to under any pan, dolly or orbit, and a walking character's outline moves with it without crawling. Widths below about one drawn pixel fade instead of breaking into dashes, so far lines never shimmer. Taper and wear are laid on surface positions: on still things they hold exactly; on moving things they would slide, so on any object with a style role (give characters a role) they are calmed by `steady`. Nothing changes on its own over time.
## How it treats content
- Opaque things: outlined, heavy outside and fine inside.
- Transparent things (glass, water): not in the depth, so they draw no line of their own; what is behind them is outlined.
- Particles and smoke: no line.
- Sky: no line; the horizon is outlined where land meets sky.
- Fog: lines thin and fade out with distance by `fadeEnd`.
- Skinned characters: outlined from depth every frame, steady while they walk; give them a role for an unbroken, heavier or lighter line.
- Foliage: leaves are outlined where they stand against something farther; dense foliage reads as a mass of fine lines far away and is faded by distance.
- World text: lines are drawn on its edges; exclude labels a player must read with `StyleKit.options({ exclude = { ... } })`.
- Black stays black: the line only darkens, and `sk_finish` keeps black black.
- Dim rooms: lines only darken, so a dim room stays dim.
# Fine hairline (styleBlock, Line)
A fine, even hairline in a soft sumi grey, cut by a master carver: delicate outlines for faces, hair and quiet landscapes, and the few remaining lines of a shin-hanga print.
Runs the shared carved key line pass (`hangiLine.shader`) with its own defaults, so it swaps with every other woodblock line with one change and settings keep their meaning: `StyleKit.swap("line", "hairLine")`. Settings: `width`, `inner`, `ink`, `setInk`, `opacity`, `silhouette`, `crease`, `creaseAngle`, `contact`, `threshold`, `thinNear`, `thinFar`, `farWidth`, `fadeEnd`, `taper`, `cutPx`, `wear`, `wearPx`, `surfaceColour`, `colourDepth`, `steady`, `paperBreak`, `wobble`. Low quality draws no colour contacts.
Light enough to sit under the colour rather than over it; the line shin-hanga looks use.
Weight is varied the way a key block is cut: the outer contour (where depth jumps) is drawn at `width`, inner lines on folds, faces and hands at `width x inner`, and every line thins with distance. A style role multiplies the weight per object (the hero heavier, the crowd finer).
## What it gives up in motion
Lines are found again every frame from depth and normals, so they stay on the edges they belong to under any pan, dolly or orbit, and a walking character's outline moves with it without crawling. Widths below about one drawn pixel fade instead of breaking into dashes, so far lines never shimmer. Taper and wear are laid on surface positions: on still things they hold exactly; on moving things they would slide, so on any object with a style role (give characters a role) they are calmed by `steady`. Nothing changes on its own over time.
## How it treats content
- Opaque things: outlined, heavy outside and fine inside.
- Transparent things (glass, water): not in the depth, so they draw no line of their own; what is behind them is outlined.
- Particles and smoke: no line.
- Sky: no line; the horizon is outlined where land meets sky.
- Fog: lines thin and fade out with distance by `fadeEnd`.
- Skinned characters: outlined from depth every frame, steady while they walk; give them a role for an unbroken, heavier or lighter line.
- Foliage: leaves are outlined where they stand against something farther; dense foliage reads as a mass of fine lines far away and is faded by distance.
- World text: lines are drawn on its edges; exclude labels a player must read with `StyleKit.options({ exclude = { ... } })`.
- Black stays black: the line only darkens, and `sk_finish` keeps black black.
- Dim rooms: lines only darken, so a dim room stays dim.
The full-frame pass of the carved key line blocks (ukiyoeBlocks): keyLine, hairLine, brushCutLine, colourLine and wornLine all run it with their own defaults.
# Bold key line (styleBlock, Line)
The bold carved key line of a woodblock print: a heavy, even sumi black outline round every figure, roof and rock, with fine inner lines on faces, hands and folds. The classic ukiyo-e outline.
Runs the shared carved key line pass (`hangiLine.shader`) with its own defaults, so it swaps with every other woodblock line with one change and settings keep their meaning: `StyleKit.swap("line", "keyLine")`. Settings: `width`, `inner`, `ink`, `setInk`, `opacity`, `silhouette`, `crease`, `creaseAngle`, `contact`, `threshold`, `thinNear`, `thinFar`, `farWidth`, `fadeEnd`, `taper`, `cutPx`, `wear`, `wearPx`, `surfaceColour`, `colourDepth`, `steady`, `paperBreak`, `wobble`. Low quality draws no colour contacts.
The classic choice: a confident, even contour cut once and printed in sumi black.
Weight is varied the way a key block is cut: the outer contour (where depth jumps) is drawn at `width`, inner lines on folds, faces and hands at `width x inner`, and every line thins with distance. A style role multiplies the weight per object (the hero heavier, the crowd finer).
## What it gives up in motion
Lines are found again every frame from depth and normals, so they stay on the edges they belong to under any pan, dolly or orbit, and a walking character's outline moves with it without crawling. Widths below about one drawn pixel fade instead of breaking into dashes, so far lines never shimmer. Taper and wear are laid on surface positions: on still things they hold exactly; on moving things they would slide, so on any object with a style role (give characters a role) they are calmed by `steady`. Nothing changes on its own over time.
## How it treats content
- Opaque things: outlined, heavy outside and fine inside.
- Transparent things (glass, water): not in the depth, so they draw no line of their own; what is behind them is outlined.
- Particles and smoke: no line.
- Sky: no line; the horizon is outlined where land meets sky.
- Fog: lines thin and fade out with distance by `fadeEnd`.
- Skinned characters: outlined from depth every frame, steady while they walk; give them a role for an unbroken, heavier or lighter line.
- Foliage: leaves are outlined where they stand against something farther; dense foliage reads as a mass of fine lines far away and is faded by distance.
- World text: lines are drawn on its edges; exclude labels a player must read with `StyleKit.options({ exclude = { ... } })`.
- Black stays black: the line only darkens, and `sk_finish` keeps black black.
- Dim rooms: lines only darken, so a dim room stays dim.
# Worn broken line (styleBlock, Line)
A worn, broken key line like one printed from an old, much-used block: the contour breaks into pieces with small chipped gaps and prints unevenly with the woodgrain.
Runs the shared carved key line pass (`hangiLine.shader`) with its own defaults, so it swaps with every other woodblock line with one change and settings keep their meaning: `StyleKit.swap("line", "wornLine")`. Settings: `width`, `inner`, `ink`, `setInk`, `opacity`, `silhouette`, `crease`, `creaseAngle`, `contact`, `threshold`, `thinNear`, `thinFar`, `farWidth`, `fadeEnd`, `taper`, `cutPx`, `wear`, `wearPx`, `surfaceColour`, `colourDepth`, `steady`, `paperBreak`, `wobble`. Low quality draws no colour contacts.
Pairs with aged paper and the faded palette for an old, much-printed sheet.
Weight is varied the way a key block is cut: the outer contour (where depth jumps) is drawn at `width`, inner lines on folds, faces and hands at `width x inner`, and every line thins with distance. A style role multiplies the weight per object (the hero heavier, the crowd finer).
## What it gives up in motion
Lines are found again every frame from depth and normals, so they stay on the edges they belong to under any pan, dolly or orbit, and a walking character's outline moves with it without crawling. Widths below about one drawn pixel fade instead of breaking into dashes, so far lines never shimmer. Taper and wear are laid on surface positions: on still things they hold exactly; on moving things they would slide, so on any object with a style role (give characters a role) they are calmed by `steady`. Nothing changes on its own over time.
## How it treats content
- Opaque things: outlined, heavy outside and fine inside.
- Transparent things (glass, water): not in the depth, so they draw no line of their own; what is behind them is outlined.
- Particles and smoke: no line.
- Sky: no line; the horizon is outlined where land meets sky.
- Fog: lines thin and fade out with distance by `fadeEnd`.
- Skinned characters: outlined from depth every frame, steady while they walk; give them a role for an unbroken, heavier or lighter line.
- Foliage: leaves are outlined where they stand against something farther; dense foliage reads as a mass of fine lines far away and is faded by distance.
- World text: lines are drawn on its edges; exclude labels a player must read with `StyleKit.options({ exclude = { ... } })`.
- Black stays black: the line only darkens, and `sk_finish` keeps black black.
- Dim rooms: lines only darken, so a dim room stays dim.
The full-frame pass of the misregister style block (ukiyoeBlocks).
# Registration offset (styleBlock, Fill)
A slight, still registration offset: the colour blocks printed a few pixels off the key line, overprinting darker where they overlap and leaving a sliver of bare paper where they pull away, like a woodblock print whose sheet slipped against its registration marks.
It runs last in the Fill chain (rank 95), after the flat colour, bokashi and patterns, so the Line slot's key line prints true over the shifted colour: exactly a colour block out of register with the key block. Settings: `offsetX`, `offsetY`, `overprint`, `gap`.
## What it gives up in motion
The offset is fixed on the sheet (screen space, in reference pixels), so it holds perfectly still: it does not jitter, breathe or change with the camera. On a moving character the colour leads or trails the outline by the same few pixels in every frame, as in a print.
## How it treats content
- Opaque things: colour shifted off the key line by the offset.
- Transparent things (glass, water): shifted with what is seen through them.
- Particles and smoke: shifted with the rest of the colour.
- Sky: shifted (invisible on a smooth gradient).
- Fog: shifted with the rest of the colour.
- Skinned characters: colour sits the same few pixels off their outline in every frame; it does not swim.
- Foliage: shifted; fine leaves can look slightly doubled at a large offset.
- World text: shifted by a few pixels; exclude labels a player must read.
- Black stays black: `sk_finish` keeps black black.
- Dim rooms: only shifts colour; nothing is brightened.
The full-frame pass of the mistBands style block (ukiyoeBlocks).
# Mist bands (styleBlock, Fill)
Flat bands of mist laid across the middle distance at set heights, hard along the top and wiped soft below, pale pink and paper white: the horizontal mist that cuts across hills, towns and coasts in a woodblock landscape print.
Set `height` to the height of the valley floor or the coast plus a few metres. Settings: `colour`, `colourB`, `height`, `thickness`, `gap`, `count`, `near`, `far`, `ragged`, `softBelow`, `opacity`, `skyDistance`.
## What it gives up in motion
Bands sit at heights in the world and fade in between `near` and `far`, so they stay on the hills as the camera turns. As the player walks, far things move in and out of the band the way real mist does; a camera climbing sees the bands from above.
## How it treats content
- Opaque things: far ones inside a band are printed in the mist colour.
- Transparent things (glass, water): what is seen through them is banded.
- Particles and smoke: banded with what is behind them.
- Sky: the band carries on across the sky.
- Fog: adds to fog; keep fog light under bands.
- Skinned characters: near ones are untouched (bands start at `near`).
- Foliage: far trees sink into the bands, as in a print.
- World text: far labels can be hidden; exclude labels a player must read.
- Black stays black: `sk_finish` keeps black black.
- Dim rooms: untouched indoors when nothing is farther than `near`.
# printAge (shader)
Shader of ukiyoeBlocks' `printAge` Medium block: faded fugitive inks (blues first), a yellowed sheet, browned uneven edges and foxing spots, all fixed to the sheet and still.
# printAge
Medium block of ukiyoeBlocks: ages the whole sheet over any look. `Woodblock.age(0.6)` puts it on, `Woodblock.age(false)` takes it off; or `StyleKit.add("printAge", { id = "age" })`.
## What it gives up in motion
Nothing: it is fixed to the sheet (the screen) and has no clock, like the printed margin.
## How it treats content
Everything on screen ages together, the margin and title box included, since it runs last (rank 120). Screen UI is drawn after the stack and is untouched.
- Opaque, transparent, particles, skinned characters, foliage, sky and fog: all age together, since the whole sheet ages; nothing is singled out.
- World text and labels: age with the sheet; exclude one that must read exactly (StyleKit.options exclude).
The full-frame pass of the printMargin style block (ukiyoeBlocks).
# Printed margin and title box (styleBlock, Medium)
A printed sheet's frame: a margin of bare paper round the picture, a carved border line and a blank tall title cartouche with a double rule and nothing written in it, as on a woodblock print.
Runs last in the Medium slot (rank 90) so it frames weather and grain too. The margin takes the sheet's colour from the shared ground (any Ground block, the Cookbook's papers included). The title box is always blank. Screen UI is drawn after the stack, so a HUD sits over the margin and stays readable; keep HUD elements inside the margin if you want them on the picture. Settings: `margin`, `border`, `borderColour`, `box`, `boxX`, `boxY`, `boxW`, `boxH`, `boxColour`, `boxLine`, `doubleLine`, `second`.
## What it gives up in motion
Nothing moves: the frame is laid on the screen, as the edge of a sheet would be, and the picture moves inside it. It hides a thin band of the picture at each edge, which matters for a game whose HUD or targets sit at the very edge.
## How it treats content
- Opaque things: hidden under the margin and the title box where they fall there.
- Transparent things (glass, water): the same.
- Particles and smoke: the same.
- Sky: the same; the box usually sits on the sky.
- Fog: the same.
- Skinned characters: a character at the screen edge is cut by the margin.
- Foliage: the same.
- World text: covered where the box sits; place world labels away from it.
- Black stays black: the margin is paper, but `sk_finish` keeps a black pixel black (a fully black frame shows a black margin).
- Dim rooms: the margin follows the scene's light at its pixels, so it never brightens an unlit frame.
The full-frame pass of the rainStrokes style block (ukiyoeBlocks).
# Rain strokes (styleBlock, Medium)
Rain printed as straight, fine, slanted strokes in two layers, the way a woodblock cutter draws rain: sparse dark lines by day, pale lines at night, falling in held steps in front of near and far things.
Settings: `colour`, `opacity`, `density`, `lengthPx`, `widthPx`, `cellPx`, `slant`, `speed`, `nearLayer`, `farLayer`, `lightOnDark`. Pair it with your world's own rain (particles, wet surfaces) or use it alone; `Woodblock.weather("rain")` switches it on in the current look.
## What it gives up in motion
The strokes are laid on the direction the camera looks, like the sky, so a pan or turn leaves them in place in the world rather than dragging them. They fall in held steps, so they move as a printed animation at the hold rate rather than smearing. Each stroke is at least about one drawn pixel wide and the strokes stay sparse, so nothing shimmers; there is no flashing.
## How it treats content
- Opaque things: rain falls in front of them when they are farther than the layer distance.
- Transparent things (glass, water): rain falls over them.
- Particles and smoke: rain falls over them.
- Sky: rain falls across it.
- Fog: rain keeps its contrast; lower `opacity` in thick fog.
- Skinned characters: a character nearer than `nearLayer` stands in front of the rain.
- Foliage: rain falls in front of far trees.
- World text: rain can cross labels; exclude labels a player must read.
- Black stays black: `sk_finish` keeps black black, so rain never lights an unlit pixel.
- Dim rooms: pale strokes only where the scene has some light.
The full-frame pass of the scrollClouds style block (ukiyoeBlocks).
# Scroll clouds (styleBlock, Fill)
Decorative scroll clouds printed on any sky: flat-bottomed bands of round lobes in paper white with a carved outline and a curl at one end, the stylised clouds of a woodblock print, drifting slowly.
Lay it after a bokashi sky so the clouds sit on the graded bands. Settings: `cover`, `low`, `high`, `size`, `fill`, `line`, `lineWidth`, `curls`, `drift`.
## What it gives up in motion
Clouds are laid on the view direction, so they behave like the sky itself: still under a pan, unmoved by walking. They drift a little each held step. Outlines are sized in reference pixels and stay about the same width at any field of view.
## How it treats content
- Opaque things: untouched; clouds show only where the sky does.
- Transparent things (glass, water): the sky seen through glass gets clouds; reflections in water do not.
- Particles and smoke: drawn over sky-coloured particles' background only.
- Sky: printed with clouds.
- Fog: untouched land; foggy sky gets clouds.
- Skinned characters: untouched.
- Foliage: untouched; sky between leaves shows bits of cloud.
- World text: untouched.
- Black stays black: `sk_finish` keeps black black.
- Dim rooms: untouched.
The full-frame pass of the snowCover style block (ukiyoeBlocks).
# Lying snow (styleBlock, Fill)
Snow lying on every upward-facing surface, printed flat in paper white with a cool blue shade on slopes and a ragged edge: roofs, ground, branches and hats covered for a woodblock snow scene.
Settings: `amount`, `colour`, `shade`, `facing`, `edge`, `patchM`.
## What it gives up in motion
The snow line comes from each surface's facing and a ragged pattern laid on world positions, so it holds on roofs and ground under any camera move. On a walking character the ragged edge on shoulders and hats slides slightly; set `edge` low or mask characters out (group mask) if that shows.
## How it treats content
- Opaque things: upward faces printed as snow.
- Transparent things (glass, water): not in the depth; what is below them gets snow. Mask water out with bokashi after it.
- Particles and smoke: untouched (not in the depth).
- Sky: untouched.
- Fog: snow takes the scene's own brightness, so fogged snow stays pale.
- Skinned characters: hats and shoulders catch snow.
- Foliage: leaf tops catch snow.
- World text: flat labels facing up turn white; exclude labels a player must read.
- Black stays black: snow brightness follows the rendered brightness, and `sk_finish` keeps black black.
- Dim rooms: snow keeps the rendered brightness, so a dark roof at night stays dark.
The full-frame pass of the snowFlakes style block (ukiyoeBlocks).
# Snowflakes (styleBlock, Medium)
Snow printed as round paper-white flakes in three sizes at three distances, drifting down and swaying, the round falling snow of a woodblock snow scene.
Settings: `colour`, `opacity`, `density`, `sizePx`, `cellPx`, `speed`, `sway`, `nearLayer`, `farLayer`, `outline`. Pair with `snowCover` for snow lying on roofs; `Woodblock.weather("snow")` switches both on in the current look.
## What it gives up in motion
Flakes are laid on the direction the camera looks, so a pan leaves them in place in the world. They drift and sway in held steps, a printed animation at the hold rate. Flakes are round marks a few reference pixels across, never fine enough to shimmer; there is no flashing.
## How it treats content
- Opaque things: flakes fall in front of them when they are farther than the layer distance.
- Transparent things (glass, water): flakes fall over them.
- Particles and smoke: flakes fall over them.
- Sky: flakes fall across it.
- Fog: flakes keep their contrast.
- Skinned characters: a character nearer than `nearLayer` stands in front of the snow.
- Foliage: flakes fall in front of far trees.
- World text: flakes can cross labels; exclude labels a player must read.
- Black stays black: flakes follow the scene's brightness and `sk_finish` keeps black black.
- Dim rooms: flakes are dimmed where the scene is dark.
The full-frame pass of the waveCrests style block (ukiyoeBlocks).
# Curling waves (styleBlock, Fill)
Curling waves with foam crests printed on any sea or lake: rows of carved crest lines with parallel lines below, white foam claws curling off the top, drifting with the wind, the decorative wave pattern of a woodblock sea print.
Water is found exactly as the bokashi blocks find it (`waterLevel`), so the two agree pixel for pixel: lay `bokashiShore` (or a bokashi sky block with water) first and the waves over it. Settings: `waterLevel`, `size`, `curl`, `line`, `lineWidth`, `inner`, `foam`, `foamColour`, `claws`, `wind`, `speed`, `reach`, `fadeEnd`, `minPx`.
## What it gives up in motion
The wave field is laid on the water's surface in world metres, so it holds on the water as the camera pans and orbits. It drifts with the held clock (by default 8 steps a second), a printed animation rather than a smooth slide. Line spacing is checked against reference pixels every frame: rows that would be finer than `minPx` fade, so waves thin out toward the horizon instead of shimmering.
## How it treats content
- Opaque things: untouched, except surfaces lying exactly at the water level facing up.
- Transparent things (glass, water): water gets the waves; glass shows what is behind it.
- Particles and smoke: drawn over by the waves where they are over water (they are not in the depth).
- Sky: untouched.
- Fog: waves fade with distance by `fadeEnd`.
- Skinned characters: untouched (only the water around them).
- Foliage: untouched.
- World text: untouched.
- Black stays black: `sk_finish` keeps black black.
- Dim rooms: untouched.
# woodblockFast (shader)
The whole woodblock print in one engine screen effect, used by `Woodblock.fast(true)`: a key line from depth jumps and folds, colour pulled to the palette with its shading compressed toward flat blocks (ukiyo-e) or cut into a few light blocks (shin-hanga), graded sky and water bands, washi and woodgrain on world positions, a still registration offset, a printed margin with a blank title box. Falling rain and snow are Cloudburst weather (see WoodblockWeather), not drawn by this effect. It reads the frame twice and the depth five times a pixel and nothing from the g-buffer, so it cannot remove cast shadows exactly (it compresses them) and has no per-object roles: use the full block stack for those.
# Bold figure print (styleLook)
A bold figure print for characters seen up close: strong flat vermilion, indigo and ochre, a heavy sumi key line, a visible registration offset, a plain pale mica-coloured sky and two blank title boxes in the margin.
Apply it with `require("~ukiyoeBlocks.Woodblock").apply("actorPrint")` (or `StyleKit.applyLook("actorPrint")`). Every entry has a fixed id (`fill`, `bokashi`, `clouds`, `mist`, `waves`, `snow`, `register`, `line`, `paper`, `rain`, `flakes`, `margin`), so any piece swaps with one change, for example `StyleKit.swap("line", "wornLine")` or `StyleKit.swap("paper", "paperKraft")`.
Blocks: flatUkiyoe, bokashiDay (plain sky), misregister, keyLine, washiFresh, printMargin (two boxes); palette classicPrint.
# Classic landscape print (styleLook)
The classic ukiyo-e landscape: flat colours with no shadows, a bold sumi key line, a Prussian blue sky wiped in graded bands, scroll clouds, mist bands across the hills, water deepening toward indigo, on fresh washi inside a printed margin with a blank title box.
Apply it with `require("~ukiyoeBlocks.Woodblock").apply("classicLandscape")` (or `StyleKit.applyLook("classicLandscape")`). Every entry has a fixed id (`fill`, `bokashi`, `clouds`, `mist`, `waves`, `snow`, `register`, `line`, `paper`, `rain`, `flakes`, `margin`), so any piece swaps with one change, for example `StyleKit.swap("line", "wornLine")` or `StyleKit.swap("paper", "paperKraft")`.
Blocks: flatUkiyoe, bokashiDay, scrollClouds, mistBands, misregister, keyLine, washiFresh, printMargin; palette classicPrint.
# Dawn lake (shin-hanga) (styleLook)
A still shin-hanga dawn by a lake: soft real light in three pale blocks, a rose and ochre dawn sky, the lake deepening to indigo, a fine hairline and baren rubbing showing in the sky and water.
Apply it with `require("~ukiyoeBlocks.Woodblock").apply("dawnLake")` (or `StyleKit.applyLook("dawnLake")`). Every entry has a fixed id (`fill`, `bokashi`, `clouds`, `mist`, `waves`, `snow`, `register`, `line`, `paper`, `rain`, `flakes`, `margin`), so any piece swaps with one change, for example `StyleKit.swap("line", "wornLine")` or `StyleKit.swap("paper", "paperKraft")`.
Blocks: flatShinHanga, bokashiDawn, hairLine, barenRubbed, printMargin; palette classicPrint.
# Deep blue landscape (styleLook)
A landscape printed almost entirely in blues: pale aqua to deep indigo areas, a deep blue coloured line, pale blue mist bands and a wiped Prussian sky.
Apply it with `require("~ukiyoeBlocks.Woodblock").apply("deepBlue")` (or `StyleKit.applyLook("deepBlue")`). Every entry has a fixed id (`fill`, `bokashi`, `clouds`, `mist`, `waves`, `snow`, `register`, `line`, `paper`, `rain`, `flakes`, `margin`), so any piece swaps with one change, for example `StyleKit.swap("line", "wornLine")` or `StyleKit.swap("paper", "paperKraft")`.
Blocks: flatUkiyoe, bokashiDay, mistBands, colourLine, washiFresh, printMargin; palette deepBlue.
# Faded antique print (styleLook)
An old, much-printed sheet: faded colours on yellowed, foxed washi browned at the edges, a worn broken key line and a slipped registration.
Apply it with `require("~ukiyoeBlocks.Woodblock").apply("fadedAntique")` (or `StyleKit.applyLook("fadedAntique")`). Every entry has a fixed id (`fill`, `bokashi`, `clouds`, `mist`, `waves`, `snow`, `register`, `line`, `paper`, `rain`, `flakes`, `margin`), so any piece swaps with one change, for example `StyleKit.swap("line", "wornLine")` or `StyleKit.swap("paper", "paperKraft")`.
Blocks: flatUkiyoe, bokashiDay (faded), misregister, wornLine, washiAged, printMargin; palette fadedOld.
# Misty mountain (styleLook)
Mountains and valleys cut by three bands of mist, a dawn sky in rose and ochre bands, flat classic colours paling with distance, a bold key line near and fading lines far.
Apply it with `require("~ukiyoeBlocks.Woodblock").apply("mistyMountain")` (or `StyleKit.applyLook("mistyMountain")`). Every entry has a fixed id (`fill`, `bokashi`, `clouds`, `mist`, `waves`, `snow`, `register`, `line`, `paper`, `rain`, `flakes`, `margin`), so any piece swaps with one change, for example `StyleKit.swap("line", "wornLine")` or `StyleKit.swap("paper", "paperKraft")`.
Blocks: flatUkiyoe, bokashiDawn, mistBands (three), keyLine, washiFresh, printMargin; palette classicPrint.
# Night rain (shin-hanga) (styleLook)
A shin-hanga night in the rain: the scene's real light and shadow flattened into two deep indigo blocks, lanterns kept glowing, real rain from Cloudburst in its ink / woodblock look with ink splashes (`weather: { kind: rain }` in look.yaml, applied by `Woodblock.apply`), a soft hairline with few outlines, a graded night sky, on washi rubbed by the baren.
Apply it with `require("~ukiyoeBlocks.Woodblock").apply("nightRainShinHanga")` (or `StyleKit.applyLook("nightRainShinHanga")`). Every entry has a fixed id (`fill`, `bokashi`, `clouds`, `mist`, `waves`, `snow`, `register`, `line`, `paper`, `rain`, `flakes`, `margin`), so any piece swaps with one change, for example `StyleKit.swap("line", "wornLine")` or `StyleKit.swap("paper", "paperKraft")`.
Blocks: flatShinHangaNight, bokashiNight, misregister, hairLine, barenRubbed, printMargin; weather rain; palette nightPrint.
# Sea and wave print (styleLook)
A sea print: water deepening from pale aqua at the shore to deep Prussian blue, rows of curling waves with white foam claws, scroll clouds over a graded blue sky and a tapering brush-cut line, all in the deep blue palette.
Apply it with `require("~ukiyoeBlocks.Woodblock").apply("seaAndWave")` (or `StyleKit.applyLook("seaAndWave")`). Every entry has a fixed id (`fill`, `bokashi`, `clouds`, `mist`, `waves`, `snow`, `register`, `line`, `paper`, `rain`, `flakes`, `margin`), so any piece swaps with one change, for example `StyleKit.swap("line", "wornLine")` or `StyleKit.swap("paper", "paperKraft")`.
Blocks: flatUkiyoe, bokashiDay (sea water), scrollClouds, waveCrests, misregister, brushCutLine, washiFresh, printMargin; palette deepBlue.
# Snow scene (styleLook)
A woodblock snow scene: roofs, ground and hats under flat paper-white snow with cool blue shading on the slopes, real falling snow from Cloudburst in big round flakes (`weather: { kind: snow }` in look.yaml, applied by `Woodblock.apply`), a soft coloured key line, a pale grey-blue sky and small vermilion accents.
Apply it with `require("~ukiyoeBlocks.Woodblock").apply("snowScene")` (or `StyleKit.applyLook("snowScene")`). Every entry has a fixed id (`fill`, `bokashi`, `clouds`, `mist`, `waves`, `snow`, `register`, `line`, `paper`, `rain`, `flakes`, `margin`), so any piece swaps with one change, for example `StyleKit.swap("line", "wornLine")` or `StyleKit.swap("paper", "paperKraft")`.
Blocks: flatUkiyoe, bokashiDay (grey sky), snowCover, colourLine, washiFresh, printMargin; weather snow; palette snowPrint.
# Warm dusk (shin-hanga) (styleLook)
A shin-hanga evening: the scene's real light kept in three warm blocks with plum shadows, a vermilion and gold dusk sky in graded bands, a fine hairline and peach mist across the distance.
Apply it with `require("~ukiyoeBlocks.Woodblock").apply("warmDusk")` (or `StyleKit.applyLook("warmDusk")`). Every entry has a fixed id (`fill`, `bokashi`, `clouds`, `mist`, `waves`, `snow`, `register`, `line`, `paper`, `rain`, `flakes`, `margin`), so any piece swaps with one change, for example `StyleKit.swap("line", "wornLine")` or `StyleKit.swap("paper", "paperKraft")`.
Blocks: flatShinHanga, bokashiDusk, mistBands, hairLine, washiFresh, printMargin; palette warmDusk.
# Classic woodblock (pigmentSet)
Indigo, Prussian blue, vermilion, ochre, willow green, pale pink, sumi black and paper white: the colours of a classic landscape or figure print.
The first paint is the sumi key-line ink, so inkBlocks lines and the woodblock key lines print in it; the rest are the printed colours the woodblock fill pulls every area to. Pick it with `StyleKit.setPigments("classicPrint")` or `require("~ukiyoeBlocks.Woodblock").usePalette("classicPrint")`. It also works with watercolorBlocks and every other block that reads pigments.
# Deep blue landscape (pigmentSet)
Nearly all blues, from pale aqua to deep indigo, with one touch of ochre: the blue-printed landscape palette.
The first paint is the sumi key-line ink, so inkBlocks lines and the woodblock key lines print in it; the rest are the printed colours the woodblock fill pulls every area to. Pick it with `StyleKit.setPigments("deepBlue")` or `require("~ukiyoeBlocks.Woodblock").usePalette("deepBlue")`. It also works with watercolorBlocks and every other block that reads pigments.
# Faded old print (pigmentSet)
Faded blues, brick pink, tan and a warm charcoal on yellowed paper: an old print that has hung in the light.
The first paint is the sumi key-line ink, so inkBlocks lines and the woodblock key lines print in it; the rest are the printed colours the woodblock fill pulls every area to. Pick it with `StyleKit.setPigments("fadedOld")` or `require("~ukiyoeBlocks.Woodblock").usePalette("fadedOld")`. It also works with watercolorBlocks and every other block that reads pigments.
# Night print (pigmentSet)
Deep indigo, Prussian, slate and moon grey with a warm lantern yellow and vermilion that glow out of the dark.
The first paint is the sumi key-line ink, so inkBlocks lines and the woodblock key lines print in it; the rest are the printed colours the woodblock fill pulls every area to. Pick it with `StyleKit.setPigments("nightPrint")` or `require("~ukiyoeBlocks.Woodblock").usePalette("nightPrint")`. It also works with watercolorBlocks and every other block that reads pigments.
# Snow print (pigmentSet)
Paper white and cool greys and blues with a grey-violet shadow and small warm vermilion and ochre accents.
The first paint is the sumi key-line ink, so inkBlocks lines and the woodblock key lines print in it; the rest are the printed colours the woodblock fill pulls every area to. Pick it with `StyleKit.setPigments("snowPrint")` or `require("~ukiyoeBlocks.Woodblock").usePalette("snowPrint")`. It also works with watercolorBlocks and every other block that reads pigments.
# Warm dusk (pigmentSet)
Vermilion, persimmon and gold against deep indigo and plum: the glowing evening of a shin-hanga print.
The first paint is the sumi key-line ink, so inkBlocks lines and the woodblock key lines print in it; the rest are the printed colours the woodblock fill pulls every area to. Pick it with `StyleKit.setPigments("warmDusk")` or `require("~ukiyoeBlocks.Woodblock").usePalette("warmDusk")`. It also works with watercolorBlocks and every other block that reads pigments.
# Woodblock print (styleRoleSet)
Roles for woodblock looks, so the hero, the enemies and the crowd read apart when the whole picture is one key line and a small palette: the hero in a bold line edged in vermilion with a warm glaze, guards and enemies in the heaviest indigo-black line with a cold indigo glaze, townsfolk in a finer, quieter grey line that sinks into the print, pickups in ochre gold, scenery in a hairline.
Picked by itself under every ukiyoeBlocks look (its `forLooks`). `require("~ukiyoeBlocks.Woodblock").apply(look)` also runs `StyleRoles.use("woodblock")` so the variant lines and glazes are added. Give things roles with `StyleKit.give(entity, "hero" | "enemy" | "friendly" | ...)`.
# hangiCore (shaderModule)
The shared rules every ukiyoeBlocks block follows, so a key line, a flat fill, a bokashi band and a wave pattern in one stack agree on the palette, on where the water is, on how bands are wiped and on when a pattern is too fine to draw. Include it after styleKit's `skCommon`, `skPatterns`, `skAnchored`, `skPigment` and `skPigmentSet`.
- `hg_snap(c, sharp)`: a colour pulled to the nearest paints of the picked pigment set (a woodblock palette), smoothly, so areas read flat without speckling where two paints meet.
- `hg_paper_white()`: the set's light colour (the paper white), or a warm white when no set is picked.
- `hg_water(uv, level, band)`: how much a pixel is water (a surface at the water level facing up, or anything seen through transparent water below it) and how deep the water there is, in metres.
- `hg_band(t, steps, soft)`: a value cut into a few printed bands with soft wiped edges.
- `hg_fine_fade(uv, periodMetres, minPx)`: 1 while a pattern repeating every `periodMetres` is at least `minPx` reference pixels across here, falling to 0 as it gets finer, so no pattern ever fills the view with fine stripes.
- `hg_held_seed()`: a seed that changes only on the held clock.
Pure math over styleKit's helpers: no bindings of its own.
# hangiPaper (shaderModule)
Washi paper, woodgrain from the block and baren rubbing marks, shared by the woodblock ground's picture, ground and paper passes so the three agree pixel for pixel: `hp_sample(uv)` (grain, fibre, baren, fox), `hp_colour`, `hp_height`, `hp_field_finish`. Marks keep their size in the picture at any distance and stay on surfaces (styleKit's `sk_scaled_level`). Include after skCommon, skPatterns and skAnchored in a shader that declares the hangiGround settings.
# ukiyoeBlocks (testSuite)
Checks the package against the rules: every woodblock block passes styleKit's block check and sits in its slot, every whole look applies in one change with its palette and the woodblock role set, every palette loads, one piece swaps with one change, Style Cookbook blocks mix in, water level and weather carry over a look switch, time of day repaints the sky and turns a shin-hanga fill to night and back, a scene that has not set any water prints none (no ground turned to sea), the print keeps to its inks (fills settle on inks, crisp lines, full resolution by default), the night fill keeps real cast shadows in its two indigo blocks, rain is laid straight, snow keeps off water, every shader is warmed against black frames, fast mode off, clear and look changes leave no fast effect on screen (also with a second helper or one whose script reloaded), print touches and patterns switch on and off, the role set reads hero, enemies and crowd apart, and clearing takes the look off. It saves the shared stack first and puts it back.
Run: `asset.resolve("ukiyoeBlocks", "testSuite"):run()`.
# woodblockWorld (workflow)
Turns an existing scene, level or installed kit into a Japanese woodblock print (ukiyo-e or shin-hanga), step by step and undoably: survey and record the stack, choose one of the ten whole looks, apply it with the water level and the hero, enemy and crowd roles, tune in at most two rounds, check readability, black, the low tier, motion and cost, and report the exact undo.
Start it: `zero workflow start --name woodblockWorld --args '{"subject":"scenes.main","look":"night rain"}'`.