fix(illustration): make the road constrain where vehicles can be in the seed - #57
Conversation
…he seed The illustration clip is seeded with our own deterministic schematic raster, but the seed was drawn in the blueprint palette, which is built to be read by a person who already knows they are looking at a diagram. As an instruction to an image-to-video model it is close to useless, and this is measured rather than guessed: the carriageway (#16242e) against the background (#0e1a22) is a 1.11:1 luminance contrast ratio, and the survey grid is BRIGHTER than the road. Rendered, the seed contains no visible road at all. It reads as one dark textured field with two bright shapes on it, so a model handed it has no surface to keep vehicles on, and live renders duly produced a vehicle arriving over ground that is not a carriageway. Asking the model in words to stay on the road was already tried and failed (handover 4b, attempt #25), so this does not ask. It makes the road unmistakable in the seed, which is our own deterministic render and therefore fully under our control: a dominant high-contrast carriageway on a distinctly non-drivable verge, a bright kerb line, white lane markings, no survey grid, and a vehicle outline legible against every body colour. The kerb is derived from the drivable surface rather than enumerated per layout: the road primitives are rasterised into a mask, eroded, and the difference is the carriageway's own outline. That cannot be geometrically wrong for any layout, so it wraps a T-junction's corners without drawing a wall across its mouth, and the roundabout's central island is punched out of the surface rather than special-cased. All five layout templates are covered by the test loop. Confined to the seed by a seed_style flag that defaults off. Every sealed artifact -- hero_png, the animation frames, the SVG -- keeps the blueprint palette and its exact bytes, asserted directly. Geometry is untouched: this changes colours and strokes only, so the world-to-pixel mapping, and therefore camera.py's push computed in that same mapping, is exactly as it was. Verified on two live renders (pixverse-v6-i2v, production parameters, different clip seeds). In both, every vehicle stayed on the carriageway across the whole clip and the road structure was preserved. Two samples of an intermittent failure is evidence, not proof. The separate known defect where the model paints an extra vehicle is NOT fixed by this and still shows: both clips keep the flat seed glyph and add a rendered car beside it, though on the correct lane travelling the correct direction.
|
Closing unmerged, by the owner's decision and not on the merits. Both submissions are now SUBMITTED on Devpost with their YouTube links, and the owner may be unavailable through the deadline. Merging here fires an automatic Cloud Run deploy of the exact URL judges will open, and the illustration geometry is a known limitation the architecture already contains and discloses. Not worth risking a submitted product for while nobody is watching. The branch The short version for whoever is next:
|
The sealed schematic and the AI clip disagreed, and in the clip a vehicle arrived from off the road entirely, driving over ground that is not a carriageway.
The measured cause
The clip is already seeded with our own deterministic schematic raster, but that raster is drawn in the blueprint palette, which is designed to be read by a person who already knows they are looking at a diagram. As an instruction to an image-to-video model it is close to useless:
#16242e#0e1a22#17303dRendered, the seed contains no road at all. It reads as one dark textured field with two bright shapes on it. A model handed that has no surface to keep vehicles on, and "off the carriageway" is not even expressible in the input. The frame the demo case was actually seeded with is the top image below.
What this does
Prompt-level geometry instructions were already tried and failed (handover 4b, attempt #25), so this does not ask the model for anything. It makes the road unmistakable in the seed, which is our own deterministic render and therefore fully under our control:
The kerb is derived, not enumerated
Stroking each road rectangle would draw a wall straight across a T-junction's mouth, and hand-enumerating union boundaries for five layouts is exactly where this would go wrong. Instead the road primitives are rasterised into a mask, the roundabout island is punched out of it, the mask is eroded, and the difference is the carriageway's own outline. It never knows which layout it is looking at, so it cannot be geometrically wrong, and a new layout needs no new case. All five templates are in the test loop; the roundabout's island and the parking lot's single slab both come out right.
Sealed artifacts are untouched
Confined to the seed by a
seed_styleflag that defaults off.hero_png, every animation frame and the SVG keep the blueprint palette and their exact bytes, asserted directly rather than assumed:Geometry is untouched: colours and strokes only, so the world-to-pixel mapping is identical and
camera.py's push, which is computed in that same mapping and passedseed_scale, stays correct with no change.seed_scale_foris deliberately not touched, so this measures one lever.Tests
The new test measures the thing that was wrong rather than just asserting bytes moved: it samples the carriageway and the verge and asserts the contrast ratio, and asserts the old palette's ratio is under 1.5 at the same two points, so the regression this fixes cannot come back quietly. A second test asserts a bright kerb exists where the carriageway ends and that nothing like it exists in the old palette.
580 passed, coverage 97.57% against the 90% gate.
Live verification, and what it does and does not prove
Two live renders,
pixverse-v6-i2vwith the production parameters (same prompt, negative prompt, duration, quality, aspect ratio) and two different clip seeds so the second is an independent sample rather than a repeat.In both clips, every vehicle stayed on the carriageway for the whole clip. The road structure was preserved exactly: kerbs, verge, T-junction, centre lines, the stop sign sitting in the verge beside the road. Direction agreed with the schematic in both.
Two samples of an intermittent failure is evidence, not proof, and it is worth saying so: the handover documents this failure appearing in some renders and not others across ten.
Not fixed, and still visible: the separate known defect where the model paints an extra vehicle. Both clips keep the flat seed glyph and render a photorealistic car beside it, so two white bodies appear where the scene declares one. Worth noting that both are in the correct lane travelling the correct direction, which is a milder failure than the third-vehicle-at-an-impossible-angle renders documented earlier, but it is not fixed and this PR does not claim it is.