BBox Generator
The node where the layout finally becomes numbers
- bbox_json
This is the payoff node. The Shot Record Loader gives you a shot, the Composition Layout Generator gives you a plan, and this node finally answers the question the whole pack exists for: where does everything go? Its single input is layout_json from the Composition Layout Generator, and its single output - bbox_json - is a JSON object mapping each subject name to a box: {"knight": {"x": 0.28, "y": 0.30, "width": 0.28, "height": 0.52}}.
How it turns slots into boxes
Every assignment in the layout plan has a slot index. The BBox Generator resolves that index to actual geometry:
- Subjects within the composition's slot count get the slot's box, straight from
compositions.json.rule_of_thirdsslot 0 is the left-third box, slot 1 is the right-third box - those are hand-tuned numbers, not random. - Subjects beyond the slot count (say a four-subject shot under a two-slot composition) land on a deterministic overflow grid - evenly spaced cells with a small frame margin, each box filling 80% of its cell.
Either way the result is clamped into the frame and rounded to four decimal places. Same layout in, same boxes out, every run. That determinism is the point: this is a layout engine, not a generator, and you can diff two outputs and know exactly what changed.
The coordinate system (read this once)
All boxes are normalized to the 0.0–1.0 range, independent of resolution - the same plan works at 512×512 or 2048×1024. Origin (0, 0) is the top-left of the frame, x increases right, y increases down (which flips your mental model if you're used to math-style y-up). A valid box satisfies x + width ≤ 1.0 and y + height ≤ 1.0.
Why normalized? So the bbox_json you save with Export Tools can be consumed by anything - a ControlNet/region workflow, a crop-and-paste graph, or a completely external layout tool - without caring what resolution you eventually render at.
Where the output goes
bbox_json has two natural consumers in the pack:
- Storyboard Preview Renderer - feed it the boxes and get a labeled rectangle diagram to eyeball placement before rendering anything.
- Export Tools - bundle the boxes into a versioned project JSON file for hand-off.
The output is a plain JSON string, so it's also trivially inspectable - paste it into any JSON viewer and you can read your layout like a spec sheet. This is very much the "JSON first, no black boxes" design principle the pack's README leads with.
Common issues
- "expected layout JSON, got empty input" - you wired the node but forgot to actually feed
layout_jsonfrom the Composition Layout Generator. Note it wants the layout, not the shot - feeding the raw shot JSON straight into this node is a classic first-time mistake and will fail schema validation. - "received a list" - one-shot-only rule strikes again. The pack processes a single layout per execution in v0.1.
- Boxes that look "wrong" are usually the overflow grid doing its job: if you have more subjects than the composition has slots, extras get tiled into grid cells rather than thrown away. Fewer subjects, or a composition with more slots, fixes it.
For a node that's basically one JSON string in and one JSON string out, it does the one thing that matters and does it boringly well - which, in this part of the ecosystem, is a feature.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| layout_json | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| bbox_json | STRING | — |