Prior art#

What already exists, what was taken from it, and — equally important — what was examined and deliberately not used. Recorded so later contributors need not repeat the search, and so design decisions can be argued with rather than guessed at.

Three verdicts: load-bearing (it changed the code), future (real, but not yet), not reusable (examined and rejected, with the reason).

Load-bearing#

Comic Chat — Kurlander, Skelly & Salesin, SIGGRAPH ‘96#

Paper · source, MIT, released July 2026

The canonical solution to this exact problem, and largely forgotten. Comic Chat rendered live IRC conversations as comic strips, automatically choosing which characters appeared in each panel, where they stood, which way they faced, the camera zoom, the balloon shapes, and — critically — balloon placement obeying reading order.

Taken: the overall decomposition, the insight that reading order is a hard constraint rather than a preference, the practice of opening a sequence with a wider establishing shot, and — added later — the expression vocabulary. Comic Chat’s emotion wheel carried laughing, happy, coy, bored, scared, sad, angry and shouting, with neutral at its centre. Scenet ships those nine plus surprise.

That set was preferred to Ekman’s six deliberately. It comes from a system that actually rendered faces for live conversations rather than from a psychology of emotion, and it shows: coy and bored are cartoonists’ categories, and no taxonomy of felt emotion would produce them. Which is exactly the framing the literature demands — see Barrett below.

Nothing is vendored — not code, not artwork. See THIRD_PARTY_NOTICES for why.

WordsEye — Coyne & Sproat, SIGGRAPH 2001#

Paper

Automatic text-to-scene conversion, and the direct ancestor of the whole idea. WordsEye turned English into a 3D scene in stages: the text is tagged and parsed into a dependency structure, that structure is interpreted into a semantic representation of entities and the relations between them, and only then do depiction rules turn it into low-level depictors — object placement, pose, spatial relation, colour. Its object library carried more than geometry: skeletons for posing characters, shape displacements for faces (“smiling, eyes closed, frowning”), and spatial tags marking the regions of an object a relation can use, such as the top surface of a table or the inside of a bowl.

Taken: the shape of the pipeline, and the principle that a depictable object must declare where relations attach to it. Scenet’s IR is a semantic representation in WordsEye’s sense and Panel Core is its set of depictors; a puppet’s poses, expressions and named anchors are the same three kinds of asset metadata as skeletons, shape displacements and spatial tags.

Not taken: the front end. WordsEye’s hard problem was natural language — parsing, word sense, coreference — and its authors said plainly what that costs: “since linguistic descriptions tend to be at a high level of abstraction, there will be a certain amount of unpredictability in the graphical result.” Scenet starts one stage later, at the semantic representation, and never interprets prose. With a language model in the loop that division of labour is cleaner than it was in 2001: the model does the step WordsEye found hardest, language to semantics, and the compiler does the step that ought to be deterministic. That is the whole argument for the agent-facing surface.

Vega-Lite#

Paper · site

The closest structural precedent that exists: a declarative high-level grammar compiling to a lower-level grammar, which then emits SVG — with the compiler deriving components (scales, axes, legends) by rule rather than making the author specify them.

Taken: the two-tier pipeline, and later its accessibility model: ARIA on by default, with a description the compiler writes and an aria: false to opt out — see accessible SVG. The two-tier pipeline: Source compiles to Panel Core, which is then emitted. Scenet’s automatically derived components are figure scale, balloon geometry and tail routing. Leland Wilkinson’s Grammar of Graphics is the ancestor idea; Vega-Lite is the proof it survives contact with a real implementation.

Semantic scene graphs — Visual Genome#

Visual Genome

Modelling an image as nodes (objects with attributes) and directed edges (relations) is the standard machine-readable representation of image content rather than image pixels.

Taken: this is the IR. The staging block is literally a set of relation triples, and its predicate vocabulary is anchored on Visual Genome’s spatial subset rather than invented, so scenes stay convertible in both directions.

OpenUSD composition arcs#

OpenUSD

Pixar’s scene description format solves a problem comics share: describing many related scenes that mostly repeat, without duplicating them.

Taken as semantics, not as a dependency — three arcs by name. reference (a panel pulls a character from a library), variantSet (switchable alternatives; poses now, style later), and over, sparse override, where a panel names a parent and changes only what differs. That last one matters enormously for comics, where consecutive panels in a scene share nearly all their staging.

usd-core is pip-installable and was considered seriously. Rejected: it imposes a 3D stage model, Prim/Xform hierarchies and a substantial learning curve on a fundamentally 2D problem. The ideas transfer; the library does not.

Visual semiotics — Kress & van Leeuwen, Reading Images#

Mostly concerned with meaning and interpretation, which is out of scope. But one part is objective and immediately usable: vectors — the lines of sight and action along which a viewer’s eye travels.

Taken: gaze is a real geometric quantity, so it becomes a term in the balloon cost function. Balloons are drawn toward the gaze direction and penalised for blocking it. The rest — ideal/real verticality, modality — is about how a panel is drawn and what it means, which Scenet leaves to whoever performs it.

Not taken: “given to new” as a staging tiebreaker. This page used to say it broke ties when a script does not say who stands where, but no code ever did. Staging breaks a tie by the at: anchor and then by actor id, a fact about the picture. “Given to new” is a left-to-right reading, stated for Western layouts, and a right-to-left reading would put the given on the right. So it cannot be a rule about the picture, which direction: rtl never mirrors, and Scenet uses it in neither direction.

Cassowary constraint solving#

Used via kiwisolver. The value is not the arithmetic: scale and rule-of-thirds placement are trivial to compute directly. The value is the required/strong/weak priority system, which resolves conflicts between competing placement preferences automatically. The alternative is an ever-growing cascade of hand-written special cases.

Comic script format and Fountain#

Fountain · screenplay-tools

Checked and confirmed: Fountain has no native panel, caption or SFX support, and there is no standardised comic script format at all. But the informal industry convention (PAGE ONE, PANEL 1, description, CAPTION, character cue, SFX) is stable across publishers, and screenplay-tools provides a working tokenizer to extend.

It is the comic-script frontend — better than inventing a syntax, because writers already write this one.

Dark Horse’s published guide is the reference house format. Its Script Format and Specifications is public and citable, and the frontend reads its layout as written: a title page before page one, PAGE ONE (five panels) with the count checked, Panel 1. with its description on the same line, CHARACTER: cues, CAP: and CAP/CHARACTER, SFX:, (thought), (whisper) and (burst), and -- carried over. Three things were relaxed: a cue may carry its line after the colon — the guide itself does so once, NEW CHARACTER: underline words… — when the name is in the cast; Markdown’s heading markers and bold are tolerated, though the guide asks for no formatting, because writers keep scripts in Markdown; and Blambot’s numbered lettering items are read too. “About 25 words per balloon, and about 50 words per panel” became the word-limit note: a house limit, not a fault.

French scripts — Cité, BnF, Alloprof, Lyon, OQLF, Plan (cinéma), Blankcomic#

Cité lexicon · BnF, Créer une BD · Plan (cinéma) · OQLF, gros plan · Blankcomic’s script example · BnF, Les bulles de la BD · Larousse, chuchoter

The Cité’s lexicon supplied the keywords: planche, case or vignette, narratif or récitatif, onomatopée; Alloprof and the BnF add cartouche as another name for the same box, which is why all three are aliases of CAPTION rather than a caption kind. Blankcomic’s example is the source for writing a cue as Léa : « … », with a space before the colon and guillemets, and for bulle de pensée. The shot names follow French Wikipedia’s échelle des plans; where the sources disagree on gros plan — the BnF, the Lyon academy and Wikipedia’s ladder at the face, the OQLF at the shoulders — the majority, and the one-to-one fit with Scenet’s ladder, decided it. The delivery words come from the BnF’s sheet on balloons: a dotted outline when a character murmure, capitals and bold when one crie, smaller type when one parle bas — whisper, shout and small type. Words no source defines, hurlé among them, were left out rather than guessed.

MPEG-4 FBA feature groups — and only the groups#

Overview (PDF)

The ISO standard defines 66 facial animation parameters over dozens of feature points. That is a measurement, not a notation, and adopting it wholesale would put more machinery in the language than a drawn face has detail.

Taken: the grouping — brow, eye, iris, nose, mouth, jaw — which is about six named features and is the right size for this. docs/reference/asset_contract.md records the mapping from Scenet’s feature names to MediaPipe landmark indices, which is what would make a real face convertible into a Scenet expression later without importing 478 points now.

Not taken: the jaw group. The head is a circle that does not deform, so a jaw would have no geometry to move.

Barrett et al. 2019 — why the expression names are not an emotion claim#

“Emotional Expressions Reconsidered: Challenges to Inferring Emotion From Human Facial Movements”, Psychological Science in the Public Interest.

Recorded here so that a claim this project made in an early draft is never reintroduced. The first proposal justified Ekman’s six as “cross-culturally documented, universal”. That justification does not survive the literature. Barrett and colleagues conclude that a specific emotion cannot reliably be read off a face, and land a methodological hit besides: Ekman’s agreement rates came from a forced choice among six supplied words, and participants given no word list label the “correct” emotion less than half the time.

It does not sink the feature, because Scenet runs the other way. Barrett’s critique is about inferring emotion from a real face. Scenet synthesises a drawn face from a declared name, and comic faces are conventional signs rather than photographs of felt emotion. So the honest framing, which is also the stronger one for this project:

These names are a drawing convention — the small closed set of faces comics actually draw. They are not a claim that a person feeling anger produces this face.

That keeps the notation at the objectifiable level and leaves interpretation to another layer, which is the thesis of the whole compiler.

Shape grammars — CGA, as a formalism rather than a library#

Mueller, Wonka, Haegler, Ulmer & Van Gool, Procedural Modeling of Buildings (SIGGRAPH 2006) · Stiny & Gips, shape grammars

This entry was under Future and called shape grammars “genuinely right for procedural backgrounds and props”. That held, and the setting layer is where it came due. What changed is the finding that made it cheap:

There is no open-source Python implementation of CGA shape grammar. The reference implementation is commercial, inside Esri CityEngine, whose Python integration shells out to a separate .cga interpreter.

So this is not “add a dependency”. It is reusing the rule formalism — split, repeat, subdivide — directly, against a well-documented design: a skyline is a repeat of bays with a split choosing each height, a treeline is a repeat of canopies, a railing is a repeat of posts under one rail. A page of code, not a research project. Recorded here so nobody later goes looking for a library that does not exist.

One discipline came with it and is worth stating: how many of a thing there are is derived from the geometry — a wider span gets more bays — and only how big each one is comes from the seed. Random counts make a backdrop flicker between panels that ought to look related.

Notan, and aerial perspective#

Notan · Arthur Wesley Dow, Composition (1899) · Aerial perspective · Layered silhouette depth

Three ideas that between them make a backdrop expressible without a vanishing point, which matters because this compiler is deliberately orthographic and drawn architecture would fight its own model.

Notan — the Japanese light/dark mass principle, which reached Western art teaching through Dow — holds that place is read from the arrangement of masses rather than from rendered detail. Taken literally: value comes from the plane and from nothing else, so masses at one distance read as one mass. Layered silhouette depth supplies the arrangement, foreground near-black and each receding plane paler.

Aerial perspective is the one that earns its place in a compiler rather than in a style guide, because it is parametric: with distance, value contrast drops toward the atmosphere. Two numbers per time of day — the value of the foreground and the value of the atmosphere — and the planes are spaced between them. Monotonic in depth by construction rather than by tuning. That is notation.

The spacing is done in OKLab lightness, because evenly spaced greys are perceptually uneven. No colour library was added: the ladder is a handful of neutral values fixed once, computed during development and hardcoded, and for a neutral grey OKLab reduces to the cube root of the linear value anyway. Putting a package through the licence gate to produce numbers that never change would be the wrong trade.

Aerial perspective in colour is the same rule with a hue. With distance, colour drifts toward the colour of the air; and light and shadow take opposite temperatures, warm light with cool shadow and the reverse — the painters’ convention set out in James Gurney’s Color and Light (2010). So each hour has two hues, the shadow’s at the foreground and the atmosphere’s at the sky, and the planes move between them in OKLCh, each keeping its grey’s lightness. Still two numbers per end, still parametric, and the colours too were computed during development, by scripts/make_palette.py, and hardcoded with the chroma and hue of each written beside it.

COCO-Stuff — the mass vocabulary#

Caesar, Uijlings & Ferrari, COCO-Stuff: Thing and Stuff Classes in Context (CVPR 2018) · label list

The canonical taxonomy of stuff: “amorphous background regions” as opposed to things with a well-defined shape. Its own argument is that stuff classes explain scene type and the geometric properties of a scene, which is exactly the job a backdrop vocabulary has. Same reasoning as taking the predicates from Visual Genome and the caption kinds from Blambot: a vocabulary somebody else has already argued about beats one invented here.

Taken at the supercategory level, not the leaf level. The real classes are building-other, sky-other, wall-brick, water-other; the -other suffix is COCO-Stuff’s marker for the catch-all inside a supercategory, and building-other is not a word anyone should have to type.

A caveat for anyone extending this: the supercategory hierarchy is not a file in the repository. nightrome/cocostuff ships labels.txt and labels.md only, and the groupings have to be read off the hierarchy figure in the paper. The twelve used here were each confirmed against the label list by the presence of their -other leaf. textile, food and rawmaterial exist too and are left out: drapery and objects, not scene-defining masses.

Two happy accidents. COCO-Stuff carries clouds and fog as first-class stuff, so weather needed no vocabulary invented for it either; and its indoor/outdoor split gives the interior/exterior distinction for free.

Lettering convention — Blambot, and Balloon Tales#

Comic Book Grammar & Tradition · Floating text and captions

Blambot is a letterer’s reference rather than an academic one, which is exactly why it is load-bearing here: it records what the craft actually does. Three things were taken from it directly.

The caption vocabulary is theirs — locale, monologue, spoken, editorial — including the finding that “narration”, the obvious guess and this project’s first proposal, is not one of them. Same reasoning as taking the predicates from Visual Genome: a vocabulary practitioners already share beats one invented here.

The quotation rule for a run of spoken captions — an opening mark on each, a closing mark only on the last — is theirs too. It is objective, which makes it testable, which is why it is enforced by the compiler rather than left to the author.

So is bold italic for a stressed word, rather than plain bold, which Blambot observes is almost absent from comics dialogue. How a writer marks the stress comes from the other side of the table: Dark Horse’s script format guide asks for the words to be underlined. Plain text has no underline, so a Scenet author writes the word between underscores, by Markdown’s rules for them — which also keep snake_case literal.

Balloon Tales supplies the placement principles for floating text: keep off the important figures, preserve the space the art establishes, keep the reading order flowing. All three were already implemented for balloons, which is the argument for captions going through the same solver rather than a parallel one.

Sound effects — Comicraft, Blambot, COO and AccessComics2#

The Comicraft Glossary of Lettering Terms · COO: Comic Onomatopoeia Dataset · AccessComics2

Four sources shaped sfx, and none of them supplied a vocabulary of styles, so none was invented: the language takes typographic parameters — size, rotation, arc, hollow — rather than named presets.

  • Comicraft’s glossary gave two rules: sound effects are not exclamations, so the compiler never adds an exclamation mark; and an open or hollow effect is all outline, which lets the art show through — the hollow option.

  • Blambot’s Comic Book Grammar & Tradition says sound is set in a type style that conveys the sound, which is the case for a display face rather than the balloon face.

  • COO (Baek, Matsui & Aizawa, ECCV 2022), annotated on Manga109, shows the range real effects take: curved, partly shrunk, freely placed. The arc and the rotation are the first two steps into that range; split and per-letter effects are left until something needs them.

  • AccessComics2 (Lee, Joh, Yoo & Oh, ACM TACCESS 2022) found blind readers wanted textual sound effects, which is why an effect keeps its text and its place in the reading order in Panel Core, and accessible output reads it there, though it is drawn as outlines. Its narrator’s account of a panel — the background, where each character is, their faces — is what a generated description says.

The display face is Bangers, by Vernon Adams, under the SIL Open Font License, chosen because it is drawn in the manner of comic cover lettering and can be shipped.

Mort Walker, The Lexicon of Comicana (1980)#

Wikipedia · Internet Archive

Walker’s catalogue of the marks comics draw around characters and objects, grown out of his 1964 National Cartoonists Society piece “Let’s Get Down to Grawlixes” and since reprinted by New York Review Comics. It is written tongue-in-cheek, but the terms entered real use, appear in dictionaries and are taught in art schools — comics-native, closed and citable, the same three properties that made Comic Chat the source for faces and Blambot the source for captions.

Taken: the marks vocabulary. plewds (flying sweat), squeans (starbursts and circles for dizziness or drink), grawlixes (symbols standing in for an oath) and briffits (the dust cloud of a hasty exit), with emanata, his general term, naming the module and the Core field that draw them.

Strictly, Walker’s word for the whole family of swearing symbols is maladicta, and within it grawlixes are the squiggles, jarns the spirals, nittles the bursting stars and quimps the astrological signs. “Grawlix” has since come to mean the whole set, which is the sense the mark is named in; what it draws is a jarn, a nittle, a bolt and a hash.

Not taken, yet: the rest of the Lexicon — agitrons, solrads, waftaroms and the others. Most attach to objects rather than to a character’s state, and the language has no objects.

Pages — Cohn’s reading-order experiments, and CSS Grid as notation#

Cohn, Navigating Comics (Frontiers in Psychology, 2013) · Cohn & Campbell, Navigating Comics II (Applied Cognitive Psychology, 2015) · Peeters, four conceptions of the page · Groensteen, Système de la bande dessinée (1999)

Reading order is a hard rule for balloons, so a page needed a version of it. Cohn’s experiments supply the evidence. Readers follow the left-to-right, top-to-bottom Z-path on a grid, and depart from it when a layout does: a tall panel beside stacked ones sends most of them down before across, and overlap, separation and staggering pull them off it too, the more so the further the layout strays from a grid.

Taken: tiers. A page of tiers is read tier by tier and left to right, so the order panels are written in is the order they are read in, by construction rather than by checking.

Taken: columns, where they block. Cohn measured how strongly each departure from the grid pulls readers off the Z-path. Blockage, a tall panel to the right of a stack, sent 91% of choices down the stack first; staggering, rows or columns offset so the gutters do not line up, left 90% on the Z-path. A tier of columns is therefore read down each column, and two stacks side by side, which have nothing blocking the way across, are refused rather than read in an order most readers would not take. Overlap split readers about evenly, so an inset says where it is read rather than leaving it to be guessed: after the panel it sits in, unless it says read: before.

Taken as notation: CSS Grid’s fr tracks and gap. A tier’s height and a panel’s width are shares of what the margin and gutters leave, which is the same model and one people already know. It is plain arithmetic, so Cassowary has nothing to do here: its value in this project is settling conflicting preferences, and a strict grid has none.

Taken as vocabulary and as a scope line: Peeters’ four uses of the page (conventional, decorative, rhetorical, productive) and Groensteen’s multiframe. A tier grid is the conventional use, and weighted shares reach the rhetorical one, where panel size follows the story’s beats.

Gutters narrower within a tier than between tiers, and a lettering size near eight points on a printed page, follow common print practice; type on a page is set from one height for every panel, as a letterer sets it.

Taken from paneling tools: a slanted gutter is a gutter wide across the cut. Clip Studio Paint’s frame-border tools keep the gap between divided frames at the gutter setting whatever the angle of the cut (its guide to frame borders), so a slanted tier does the same rather than keeping the horizontal gap, which would narrow the gutter as it leaned.

Right-to-left reading — manga, EPUB and the mirror#

Cohn, Navigating Comics (2013) · Cohn, Hacımusaoğlu & Klomberg, Fluency modulates ordering of visual narrative layouts (CogSci 2022) · Cohn, Atilla, Lichtenberg & Cardoso, The influence of writing systems on comics layouts (Cognition 260, 2025) · EPUB 3.3 §5.7.1, page-progression-direction · Kavita’s notes on ComicInfo’s Manga

Manga are read from the top right: the pages, the panels on a page and the balloons in a panel all run right to left, then down. Cohn ties the convention to writing systems. Japanese text runs in vertical columns, read top to bottom and right to left. A corpus of 1,030 comics from 144 countries found that a writing system’s direction shapes how its comics’ pages are read. Manga go further than writing direction alone predicts, with more right-to-left, downward paths and more vertical columns. And readers of manga prefer to order panels downward, across every layout tested.

Taken: progression, not text. EPUB’s page-progression-direction and Kavita’s notes both separate the direction a book is read in from the direction its text runs in. A manga translated into English still progresses right to left while each balloon’s words read left to right. direction: ltr | rtl is EPUB’s word and EPUB’s values, and like EPUB’s it is the book’s, said once. Vertical Japanese lettering would need a Japanese face, vertical metrics and other line breaking, and is not part of it.

Taken: the mirror, for reading only. What reading decides is mirrored, and what the picture decides is not:

  • the order rule, every tiebreak between equal placements, where an unplaced box starts, and panel and page order are mirrored;

  • figures, gaze, tails, sound effects and the lean of a slanted gutter are not.

The test is exact. The mirror image of a panel, read right to left, is lettered as the mirror of the original. Compiling and then mirroring the output was rejected: it would turn a character facing right to face left.

An assumption, stated as one: the column rule mirrored. Cohn’s blockage result, that a tall panel beside a stack sends readers down the stack first, was measured on left-to-right layouts. Scenet reads a stack beside a tall panel down first in a manga too, with the tall panel on the left. The two later studies point the same way, toward downward orders in manga, but neither measures that layout mirrored.

Future: export. A page export would write page-progression-direction="rtl" into an EPUB’s spine, and Manga: YesAndRightToLeft into a CBZ’s ComicInfo.xml (ComicInfo v2.0: Unknown, No, Yes, YesAndRightToLeft). Both come from the direction Panel Core and Page Core already record.

Accessible SVG — SVG-AAM, Graphics ARIA, and what screen readers do#

SVG-AAM · WAI-ARIA 1.2 · Graphics ARIA and Graphics-AAM · accname 1.2 · ACT rule 7d6734

Accessible output is built from what the specifications say and what screen readers have been tested to do, which are not the same thing.

  • The vocabulary. SVG-AAM makes <title> an element’s name and <desc> its description. WAI-ARIA’s img role is one image made of parts whose children are presentational (#img, MDN), so a name on anything inside it is never reached. In accname, aria-labelledby comes before every other source of a name, and may join several elements’ text in the order it lists them.

  • What screen readers do. An explicit role="img" named through aria-labelledby by its <title> and <desc> is the pattern that has been tested most and passes most: Watson and Faulkner for TPGi (Using ARIA to enhance SVG accessibility), Lembree’s matrix of NVDA, JAWS, VoiceOver and TalkBack (weboverhauls), Deque, and O’Hara’s contextual images and SVGs. aria-describedby alone failed with NVDA and JAWS in Chrome and Firefox in Lembree’s results and Deque’s, Orange still advises against it, and NVDA’s user guide says object descriptions have often gone unspoken. So the words go in the name. Without an explicit role, an SVG with only a <title> is missed by NVDA with Firefox and by VoiceOver on iOS (a11ysupport.io, 2025).

  • What browsers compute. The web-platform tests for SVG-AAM show g with a <title>, and g[aria-label], named as groups in all three engines, and none of them giving the root <svg> the implicit graphics-document role SVG-AAM asks for. The graphics roles are computed by Chrome and Safari and reduced to their fallbacks by Firefox, and ACT rule 7d6734 calls their support inconsistent and recommends role="img". Blink reuses an SVG’s <title> as its description when the name came from aria-labelledby and there is no <desc> (SVG-AAM’s description rules), and WebKit exposes an unnamed shape under a named ancestor as an unnamed image.

  • Reading order is document order: aria-flowto is supported by JAWS alone (a11ysupport.io), and the DAISY Knowledge Base asks that the text order of an SVG in fixed layout match its reading order.

  • An <img src> exposes only its alt (HTML-AAM), which is why the how-to says how to write one from Panel Core.

  • Why it matters for e-books. EPUB Accessibility 1.1 asks for WCAG 2.2, whose 1.1.1 wants a text alternative for every image and 1.3.2 a correct reading sequence; the W3C note on fixed-layout accessibility says comics are often images alone, and fail for it.

Vega’s own output was read in its source (vega-view aria.js, vega-scenegraph aria.js): the view is a graphics-document with an aria-roledescription and a label, each mark with a description a graphics-symbol labelled by it, and aria: false hides an item instead.

Taken: an explicit role="img" per panel, its name the dialogue as well as the description; strips and pages as role="group", their panels in reading order and their own shapes hidden; Vega-Lite’s model of words resolved by the compiler, on by default with an opt-out. Not taken: graphics-document and per-balloon names, for want of any published screen-reader result and because a named part’s place in document order is its paint order, which a sound effect does not share; aria-describedby for anything a reader must hear; and in the end the most-tested pattern itself, aria-labelledby by <title> and <desc>, which NVDA 2026.2 with Edge 155 read a second time as the description when moving by graphic — one <title> holding everything is read once (recorded results); aria-flowto. See design decisions.

Word balloons on existing frames — Chun, Ryu, Hwang & Cho, ISVC 2006#

An Automated Procedure for Word Balloon Placement in Cinema Comics, Advances in Visual Computing

Places word balloons on film frames that already exist. Given each actor’s position and the order of the dialogue, a cartographic labelling algorithm puts every balloon near its speaker in reading order, and a measure of layout quality then refines the positions. It is the closest published precedent for lettering a picture drawn elsewhere, and the same shape as Scenet’s candidate scoring: rules first, then a cost.

Taken: the problem as it states it — the picture is given, and lettering is what is placed — and the confirmation that a placer needs to know where the speakers are, not what the picture shows. With a supplied picture behind Scenet’s own figures, the figures carry that geometry already. For figures the artwork draws, an artwork contract beside the picture declares it: each face, mouth and body, measured once, committed and reviewed, and read by the same placer as a puppet’s. Not taken: finding the actors in the frame. Chun et al. take positions from the film; here they come from a file the author commits, never from looking at pixels — which is what keeps a compile deterministic and a layout explicable.

Manga109, the vocabulary of the artwork contract#

Building a Manga Dataset “Manga109” with Annotations for Multimedia Applications — Aizawa, Fujimoto, Otsubo, Ogawa, Matsui, Tsubota & Ikuta, IEEE MultiMedia 27(2), 2020

Over 500,000 annotations on 21,142 pages of 109 volumes: for each page, boxes for frames, text, character faces and character bodies, each character with an identity: a record, at scale, of what is drawn where on a comic page.

Taken: the vocabulary. What an artwork contract declares about each figure is what Manga109 annotates — a face and a body, under a name — because those are exactly the two things a balloon placer must avoid, and a field-tested split beats an invented one. Added: the mouth, which Manga109 does not record and a letterer needs, since a tail “should point to the mouth (or whatever the source of the sound is)” (Comicraft’s glossary). Not taken: boxes. A face is a disc here, as a puppet’s is, because a tail stops on its edge and a disc has one; a body may be any simple polygon. Not taken either: the text boxes, which are what Scenet places rather than what it is given.

<image> in SVG renderers and editors#

SVG 2, Embedded Content · SVG 2, Linking · MDN <image> · MDN xlink:href · MDN, SVG as an image · inkscape/inbox#4411 · inkscape/inbox#4235 · librsvg, referenced files · librsvg#907 · usvg resources_dir · WPT svg-image-orientation-none

How a supplied picture is written into the SVG was checked against what the specification asks and what renderers and editors do, which differ.

Question

What the sources say

What Scenet writes

href or xlink:href

SVG 2 asks a generator for plain href, deprecates the XLink one, reads href when both are present, and needs xmlns:xlink declared for the old one. MDN keeps xlink:href as a fallback. Inkscape does not load a resource named by plain href (Inkscape issue 4411). librsvg reads both.

xlink:href alone, its namespace declared on the element. With both, an editor that rewrites one leaves a stale other that browsers read, and an embedded picture is stored twice.

preserveAspectRatio

SVG 2 fits the picture by its intrinsic proportions, meet or slice, and the user-agent stylesheet clips an <image> to its rectangle. Inkscape has honoured it since 0.91. librsvg once mishandled it on its gdk-pixbuf path (librsvg issue 907).

The rectangle is the placed box, which already has the picture’s proportions, so the keyword changes nothing where renderers agree; it is kept so one that does not still covers or contains rather than stretching.

A linked file

librsvg loads only files in the SVG’s folder or below it, and any data: URL; resvg resolves against a resources_dir; an SVG used as an image loads nothing it links to, data: URLs aside (MDN).

The path as written, which resolves beside the document, where build writes; --embed-images otherwise. Not rewritten to climb back with ../, which librsvg refuses.

Formats

SVG 2 requires every viewer to draw PNG, JPEG and SVG; librsvg also reads GIF and WebP.

PNG and JPEG, sniffed from their first bytes.

EXIF orientation

Chromium turns an SVG <image> by it (the WPT test adds the opt-out); gdk-pixbuf only when asked; Inkscape’s own report says both.

Refused unless upright, as image-file.

The veil’s noise — SVG 1.1’s feTurbulence and Park and Miller#

SVG 1.1, feTurbulence · Filter Effects 1, feTurbulence · Park and Miller, CACM 31(10), 1988 · Skia SkPerlinNoiseShader

How print draws the fog and cloud the SVG leaves to a filter.

Question

What the sources say

What Scenet computes

Which algorithm

SVG 1.1 gives its C code as the exact algorithm. Filter Effects 1 redraws a zero gradient and rejects one longer than 1, which moves every later gradient. Browsers implement SVG 1.1’s.

SVG 1.1’s.

A zero gradient

SVG 1.1’s code divides 0 by 0. Skia keeps (0, 0); Gecko redraws; resvg divides.

(0, 0), as Skia: what Edge and Chrome paint.

The random numbers

Park and Miller’s minimal standard, whose 10,000th number from seed 1 is 1043618065.

The same, and that number is a test.

Colour from noise

fractalNoise: (sum * 255 + 255) / 2, clamped.

(sum + 1) / 2 clamped, then the colour matrix’s alpha, rounded to a byte once.

Fonts in print — ISO 32000, the OpenType OS/2 table, the OFL FAQ#

ISO 32000-1, §9.7 and §9.9 · OpenType OS/2, fsType · OFL FAQ 1.11-1.14 · fontTools subset

How a face is carried into the print PDF for live text.

Question

What the sources say

What Scenet writes

May a face be embedded

fsType bits 0-3: 0 installable, 2 restricted, 4 preview & print, 8 editable; when several are set the least restrictive applies; bit 8 forbids subsetting; bit 9 allows bitmaps only.

Embedded unless restricted or bitmap-only; whole when it may not be subset.

An OFL face

“So can I embed OFL fonts in my document? Yes, either in full or a subset.” The restrictions on modification do not apply to a font embedded in a document.

Source Sans Pro, Bangers and Comic Neue embedded as subsets under their own names.

Which PDF font

A Type0 font with Identity-H takes two-byte codes; a CIDFontType2 maps them to glyphs through CIDToGIDMap, a CIDFontType0 over a CFF without CID operators reads them as glyph ids; FontFile3 /OpenType is PDF 1.6.

Glyph ids as codes, kept by the subsetter; TrueType in FontFile2, CFF in its OpenType file; CFF2 and CID-keyed CFF left in outlines.

Where glyphs land

A glyph’s displacement is its W width less the TJ adjustment, in thousandths of the type size.

Adjustments computed from the widths as written, so every glyph lands on the solver’s step.

PDF/X — ISO 15930-7, output intents, and what can check them#

ISO 15930-7:2010, PDF/X-4, in the Library of Congress format description · ISO 32000-1, §14.11.5, output intents · ICC registry, CGATS21-2-CRPC6 · ICC, sRGB profiles · veraPDF validation profiles

How far the print PDF goes toward PDF/X-4, and why it claims nothing.

Question

What the sources say

What Scenet writes

What PDF/X-4 asks

Built on PDF 1.6; keeps live transparency and device-independent colour; an output intent with the printing condition’s profile embedded (X-4p may reference it); XMP with GTS_PDFXVersion, creation, modification and metadata dates, a document and version id; Trapped said; every font embedded; a TrimBox or ArtBox inside the BleedBox; no encryption, LZW, JBIG2 or JPEG 2000.

Everything that holds whatever a preflight would say: PDF 1.6, /Trapped /False, the boxes, embedded fonts, none of the forbidden filters. No XMP, no dates, no GTS_PDFXVersion.

An output intent without its profile

ISO 32000-1, Table 365: DestOutputProfile is required only when OutputConditionIdentifier does not name a standard condition. The registry’s Reference Name for GRACoL 2013 is CGATS21-2-CRPC6.

An identifier-only intent, /S /GTS_PDFX, naming the condition the CMYK twins were made for. Valid PDF; not PDF/X-4, which embeds the profile.

RGB pictures

Device RGB under a CMYK output intent is not PDF/X-4; an ICCBased space says what the numbers mean. The ICC’s sRGB2014.icc “may be copied, distributed, embedded” unaltered.

Every RGB and indexed-RGB picture tagged with sRGB2014.icc, written once; grey and CMYK pictures left in their device space, so black stays K alone.

What can check it

veraPDF’s profiles are PDF/A, PDF/UA and WTPDF; PDFBox’s preflight is PDF/A-1b; the free X-1a checkers do not read X-4. Acrobat Pro, callas pdfToolbox and Enfocus PitStop check PDF/X-4.

No claim: none of those was available, and a claim nothing has checked is worse than none.

OpenPose, ControlNet, GLIGEN, DiffSensei: the formats staging leaves in#

Load-bearing for --conditioning, as formats and consumers rather than as code.

Source

What it takes

What Scenet writes for it

OpenPose’s output format

people[].pose_keypoints_2d, flat x, y, confidence triplets in the COCO-18 order, on a canvas

The pose, from Panel Core’s joints and feature points

ControlNet: Zhang, Rao & Agrawala, ICCV 2023 (arXiv 2302.05543)

Condition images: a skeleton, a depth map, a segmentation

The pose, the depth map and the mask

GLIGEN: Li et al., CVPR 2023 (arXiv 2301.07093)

Boxes paired with phrases

The boxes, as fractions of the panel

DiffSensei: Wu et al., CVPR 2025 (arXiv 2412.07589)

Manga panels conditioned on character and dialog boxes, laid out on a page

The boxes, the semantics’ lettering boxes, and Page Core’s frames

Two conventions were taken as they are. OpenPose’s left and right are the subject’s, which for a body facing the reader is the reader’s other side. ControlNet’s depth maps run white near and black far (ComfyUI’s depth tutorial), the reverse of the backdrop’s aerial-perspective ladder above, so the depth export has its own. What white means is MiDaS’s relative inverse depth (Ranftl et al., TPAMI 2022, arXiv 1907.01341), and the depth ControlNet the export was checked against, control_v11f1p_sd15_depth, is by its own card not trained on any one estimator’s depth. Inverse depth is why a ground recedes as a straight vertical ramp: on a flat surface it is proportional to the distance below the horizon on screen.

The playground draws the pose as ControlNet’s OpenPose annotator draws a skeleton: its seventeen limbs and its eighteen colours, red round the wheel to rose, each limb in the colour at its own position, at half opacity, on black. The table is in scenet.emit.preview, as controlnet_aux inherited it from pytorch-openpose: taken as it is because it is what a reader who works with these models has seen. Only the colours and the limbs were taken; no code.

Deliberately not taken: a prompt. Two drafts of the exports proposed a scenet prompt turning a panel into positive and negative prompt strings. Dialects differ per model and change every few months, and turning structure into prose is the step WordsEye, above, leaves to the language side, not the compiler; the semantics export hands over the structure instead.

Future#

L-systems#

The other half of the rule-rewriting family, and still unused. Where CGA subdivides a shape, an L-system grows a string, which suits branching structure — a tree drawn as a tree rather than as a canopy silhouette, foliage with individual limbs. Nothing in the current backdrop needs it: masses are read as values, and a mass has no branches. It becomes interesting if props ever want to be drawn rather than massed.

Magi, a helper that could propose a contract#

The Manga Whisperer: Automatically Generating Transcriptions for Comics — Sachdeva & Zisserman, CVPR 2024

A single model that detects panels, text and characters on a manga page, clusters the characters by identity, links each line of text to whoever speaks it, and orders the text — to make manga readable to people who cannot see it.

What it would be here: a helper that proposes an artwork contract from a picture — faces, bodies, and who is who — for an author to correct and commit. Never a compiler pass: a detector inside the compiler would make output depend on a model’s version and a platform, could not run in the playground, and would put a large dependency through the licence gate. The contract on disk stays the source of truth, reviewed like any other file, and the compile stays deterministic. Not built: a contract is a handful of numbers, the debug overlay is its check, and a detector trained on manga pages, or MediaPipe’s trained on photographs, would still need every one of them checked by eye.

Examined and not reusable#

Source

Why not

CBML (TEI)

A scholarly XML vocabulary for encoding existing comics for analysis, not for generating them. It has no spatial semantics whatsoever. Its terminology is worth borrowing; its schema is not.

Graphviz / DOT

Useful only as a debug dump of the scene graph. Graph layout optimises for edge crossings and hierarchy, which has nothing to do with pictorial composition. A dead end as a layout engine.

POV-Ray SDL

A CSG raytracer scene language. Historically interesting as an early declarative scene description, but nothing transfers.

D3.js

A DOM data-binding library rather than a layout engine, and this project is Python. Its underlying idea is already covered by Vega-Lite.

MediaPipe Face Landmarker

478 3-D landmarks. A detection output, not a notation: 478 points is a measurement of a face, and a drawn face has nothing like that much detail to place. Its landmark indices are useful as a mapping target, and are recorded as one in the asset contract. Its face detector could propose the faces of an artwork contract, from a helper outside the compiler and never as a dependency of it; see Magi.

ARKit / MediaPipe blendshapes

52 continuous coefficients that “loosely correspond to FACS Action Units”. Continuous blending is the wrong model for comics, which use a small set of conventionalised glyphs rather than interpolations between them.

FACS

Codes anatomical muscle actions for observation, is continuous, and is documented as weak on the lower face. Wrong direction, wrong granularity.

A-star pathfinding for balloon tails

Frequently suggested, and wrong. A tail is a short tapered stroke from balloon rim to mouth; grid-based A-star produces jagged paths that look nothing like drawn tails. A straight tail with a collision test, bending to a single-control-point Bézier only when obstructed, is both simpler and better.

Physically based sky models — Preetham and Hosek-Wilkie

The obvious neighbours for time, and the wrong tool. They solve a radiometric problem — spectral radiance over a hemisphere, parameterised by turbidity and solar elevation — which this compiler does not have. Scenet produces a small number of flat tonal values for a drawn comic panel; it is not simulating scattering. The parametric rule it actually needs is aerial perspective, which is two numbers per hour and is recorded above as load-bearing. Adopting a sky model would import a physical simulation to answer a question about ink.

coloraide / colour-science at runtime

Genuinely good libraries, and the OKLab ladder was worth computing with one — during development. Shipping it would put a package through .github/allowed-licenses.txt to recompute a handful of neutral greys that never change. The values are hardcoded with the lightnesses they came from written beside them.

Imperative scene programs — Gumin et al. 2025#

Imperative vs. Declarative Programming Paradigms for Open-Universe Scene Generation — Gumin, Han, Yoo, Ganeshan, Jones, Aguina-Kang, Morris & Ritchie, arXiv 2504.05482

Recorded because it is the strongest published argument against the shape Scenet has, and because it was first proposed for this file — in an issue — as evidence for the opposite of what it found. The paper does not show that models do better emitting declarative constraints. It challenges that consensus: instead of a model stating constraints for a separate solver, the model writes a step-by-step program that places each object relative to those already placed, and an LLM-free pass then repairs collisions by adjusting the program’s parameters. In forced-choice studies, participants preferred its layouts to those of two declarative systems 82% and 94% of the time.

Scenet stays declarative for reasons specific to its domain, not as a rebuttal of the paper:

  • Even the imperative programs contain no absolute coordinates. Every placement is relative to something already placed. Whatever the paper argues, it is not that a model should emit coordinates — which is the proposal this entry exists to answer.

  • A panel’s hard requirements bind the whole cast at once. No balloon over any face, figures ordered left to right, a shot framed in head-heights for everyone in it: placed one figure at a time, the third cannot move the first two to make room. The staging solver resolves them together, by priority.

  • The problems differ in size. The paper targets complex, varied, highly structured 3D arrangements of many objects — exactly what it says is hard to express declaratively. A panel holds a handful of figures and boxes.

  • Determinism is a requirement here, and a solver over a stated system gives the same answer every time.

What does transfer is the repair loop. The paper corrects the generated program mechanically, without asking the model again; Scenet’s counterpart is structured diagnostics — a finding with a rule, a location and a fix, applied by the model or a person. Both start from the same observation: generated output is easy to get nearly right and hard to get exactly right, so the checking has to be mechanical.