sketchBlankFill.styleBlock
- .metadata120 B
- README.md3.1 KB
- block.yaml3.0 KB
README.md
Sketch blank (styleBlock, Fill)
A pale sketch blank: the picture lifted toward the bare paper, keeping as much of its own colour as you choose. keepColour = 0 gives a grey value drawing, 1 keeps every colour as rendered, and paleness sets how close to bare paper it goes. Pencil, charcoal or ink is then drawn over a quiet, light underpainting instead of over the full-colour render.
Part of pencilBlocks. Runs the shared pencilFill shader with strokes = 0; coloredPencilUnderlayFill is the same shader with a light layer of coloured pencil strokes, so the two swap with StyleKit.swap("fill", "coloredPencilUnderlayFill", { keepSettings = true }).
A pencil shade drawn over it shows it where the shade's over is above 0 (at 0 a shade starts from a clean sheet):
local StyleKit = require("~styleKit.StyleKit")
StyleKit.applyLook("pencilSketch")
StyleKit.add("sketchBlankFill", { id = "fill" }) -- the blank, under the shade
StyleKit.set("fill", { keepColour = 0.5 }) -- keep half the colour
StyleKit.set("shade", { over = 1 }) -- the shade's strokes over the blank
What it gives up in motion
It changes only colour and value, pixel by pixel, so it adds nothing that can slide, swim or shimmer when the camera moves.
How it treats content
- Opaque things: lifted toward the bare sheet by
paleness, keepingkeepColourof their colour; the underlayer's strokes are laid in each thing's material colour, greys getting only a little. - Transparent things, particles and smoke: lifted like everything else, pixel by pixel; strokes are laid on the surface behind them.
- Sky: lifted at least
skyBareof the way to the sheet; no strokes. - Fog: lifted with what is behind it, so foggy distance goes toward the bare sheet; past
fadeEndthe underlayer's strokes give way to a soft tone. - Foliage: alpha-tested leaves are in the depth and are treated like any surface; very fine foliage reads as tone.
- World text: exclude labels a player must read (
StyleKit.options({ exclude = { ... } })); the block leaves them as rendered. - Skinned characters: the blank is pixel by pixel and travels with them; the underlayer's strokes are laid on world positions, so keep it off a moving character with a group mask, or paint the character with
PencilHero.paint. - Dark sheets (black paper, the boards): the blank sinks toward the sheet instead of toward white.
- Black stays black: only what light reached is lifted, so with every light off the frame stays black.
Known limits
- It runs on the whole frame after antialiasing, so offscreen captures, mirrors and render-to-texture cameras do not show it (#17427).
- Per-object settings (a style channel or a game role) reach it through the shared object mask, at most eight distinct settings a scene. A per-object value cannot reach a geometry pass, so a per-object look that needs one draws passes of its own (#24549).
- Its passes are queued again every frame, even when nothing changed (#24548).
The package README's Known limits lists the rest.