▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·part ofpackage ukiyoeBlocks.package·originates fromworld c1435fb2-8…
InkCheck
Measures how much of a presented frame is printed in the woodblock look's own colours.
by·posted 6d ago
What it does
InkCheck (module)
Measures how much of a presented frame is printed in the woodblock look's own colours.
-- 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 }.shareis the percent of sampled pixels withintolerance(Oklab distance, default 0.06) of a reference colour;worstlists the most common colours that are not, so you can see what escaped the palette.excludeleaves out a rectangle (0..1 of the frame), such as a HUD panel.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.