Lattice Deform
A 2x2x2 Lattice modifier set to KEY_LINEAR on all three axes, with two top control points moved through LatticePoint.co_deform, read back through the depsgraph (evaluated_get, to_mesh, to_mesh_clear).
examples/car-mirror-symmetry/
A stylized hatchback lofted as one half (52 stations, 13-point rings) and completed by the Mirror modifier, evaluated through the depsgraph. Wheels, lamps, grille, door mirrors and handles mirror about object origins parked on the symmetry plane; the grille is authored as a half and welded on it.
Rendered headless by the example itself. Select it to enlarge.
runs on 4.5 LTS · 5.1 · 5.2 LTS
blender --background --python examples/car-mirror-symmetry/car_mirror_symmetry.py --
falsify it Breaks the contract on purpose and must exit 5
blender --background --python examples/car-mirror-symmetry/car_mirror_symmetry.py -- --no-mirror
A runnable example that builds a stylized hatchback as one half — a loft of 52 stations, each a 13-point half-ring from the bottom centerline out to the roof centerline — and completes it with a Mirror modifier, evaluated through the depsgraph, following depsgraph-and-evaluated-data. Wheels, headlamps, taillamps, grille, door mirrors and door handles are separate objects mirrored the idiomatic way: the object origin sits on the symmetry plane and the mesh data is offset — mirror mirrors about the object's own origin, so you offset the data, never the object. The grille is the one part authored across the plane: a half profile whose end points lie exactly on x = 0, welded into one grille by the merge.
What it witnesses: the original datablock keeps only the authored half while the depsgraph carries the mirrored whole, and both directions are closed forms:
(1248, 2474, 1228)).2n − c = 1248 verts (probe: use_mirror_merge = False → exit 5, 1352 verts — the doubled seam; probe: one centerline vert pulled off the plane → exit 4, 103 ≠ 104 welded; probe: mirror axis off → exit 5, 676 — the half-car). The evaluated shell is watertight (every edge borders 2 faces) with Euler characteristic 2 — the two halves weld into a topological sphere.min.x == −max.x).x == 0 (probe: headlamp origin at x = 0.01 → exit 12; probe: front wheel's mirror axis off → exit 14, (390, 361)). The split grille authors 36 verts with 8 on the plane and must evaluate to 2n − 8 = 64 with exactly 8 on-plane verts (probe: grille merge off → exit 14, 72 verts / 16 on the plane — two grilles; probe: one grille end point moved to x = 0.004, beyond the merge threshold → exit 13, 7 ≠ 8 on the plane).Why the checks target the modifier, not the base: mutating a non-plane base vertex cannot break the ±X pairing — the evaluated set is always half ∪ mirror(half), symmetric by construction. Realistic failures live in the modifier (merge off, axis off, modifier applied into data, origin off the plane), which is what the probes break.
Version witness: check output is byte-identical on Blender 4.5.11 LTS, 5.1.2 and 5.2.1 LTS. Mirror, evaluated_get / to_mesh / to_mesh_clear (no argument — passing the mesh raises TypeError on both), BVHTree, and TRACK_TO constraint behavior are stable across them; only the EEVEE engine id is version-gated.
The render is the proof: hide the mirror and the still is literally half a car — one headlamp, one door mirror, half a grille, a hood cut open at the centerline. The camera stands on the key light's side, high enough to look down the hood centerline so both halves read at once. The weld itself is not a pixel witness — the hood and roof are nearly flat across the plane, so an unwelded seam renders within 12/255 of the welded one; the 2n − c count is what catches it.
Render notes: the 13-point loft reads faceted at gallery size, so the --output path — after check() has asserted every closed-form count on the Mirror-only stack — stacks a Subdivision Surface modifier (level 2) after MirrorHalf. Order matters: subdividing the half first would pull the centerline off the plane; subdividing the welded whole keeps it exact. Panel breaks stay crisp through a crease_edge attribute: every material border (glass, pillars, arch cladding, the chrome window-sill strip) creases fully and the fascia cap outlines half-crease, so the nose keeps its shape. The body is smooth-shaded with hard shading only at material borders; the separate parts keep a 40° dihedral split, and their boundary edges on the plane take the angle to their own mirror image, acos(1 − 2nₓ²), so centerlines shade smooth. The paint is candy red over a faint metallic base under a softened clear coat; the rim light is large and dim and set steep — a small bright rim mirrors in the roof as a clipped white slab, and a shallow one prints its own terminator line across the floor. Tires carry a 72-groove tread bump masked to the outward-facing band, and the rims are a half-metallic alloy (a full metal mirrors the black stage and the spokes vanish). The previous faceted loft had a thin pink-white streak on the hood by the windshield: not a seam (it sat at |x| 0.11–0.38, on the mirrored half, and all weld checks passed) but a sliver facet — the loft's greenhouse points collapsing onto the hood — flat-shaded and facing the key almost head on (n · −key = 0.967). The redesigned ring lerps a hood layout into a cabin layout, so no such sliver exists. Panel classes are by construction position: underbody, rocker and arch cladding are trim; side glass is the sill-to-glass-top segment under the roof, broken by a trim B-pillar; the drip rail becomes the A-pillar; windshield and hatch glass are the roof bands where the cabin factor ramps. The glass is a dark dielectric whose base colour ramps toward steel blue at grazing angles (Layer Weight → Color Ramp) — on a near-black stage there is little to reflect, and flat dark glass read as dull paint. Lamps, grille, mirrors and handles are closed superellipse pods seated on the skin by a BVHTree ray cast, with a chrome bezel and an inset lens rather than flat boxes.
# Cheap correctness check (no render) — the CI check:
blender --background --python car_mirror_symmetry.py --
# Falsifier: Mirror X off. Must exit non-zero (evaluated verts stay at n).
blender --background --python car_mirror_symmetry.py -- --no-mirror
# Also render a still (EEVEE on a GPU host; use --engine cycles on GPU-less hosts):
blender --background --python car_mirror_symmetry.py -- --output car.png
blender --background --python car_mirror_symmetry.py -- --output car.png --engine cycles
Per-script sequential checks. 9 is a valid check code; there is no rule against it.
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Uncaught exception (FATAL wrapper) |
| 2 | argparse / usage |
| 3 | Body datablock is not the authored half |
| 4 | Authored centerline vert count ≠ 28 |
| 5 | Evaluated verts ≠ 2n − c (--no-mirror lands here) |
| 6 | Evaluated on-plane verts ≠ centerline; also --output produced no file |
| 7 | Evaluated Euler characteristic ≠ 2 |
| 8 | Non-manifold edges in the evaluated shell |
| 9 | Evaluated verts lack a mirrored partner |
| 10 | Gallery framing violation (--output path only; gallery_framing) |
| 11 | Asset-quality floor violation (--output path only; gallery_asset_quality) |
| 12 | Mirrored-part origin off the plane |
| 13 | Mirrored-part datablock is not the authored half (verts, faces, on-plane verts) |
| 14 | Mirrored-part evaluated counts ≠ 2n − weld / 2f, or on-plane verts ≠ weld |
| 15 | Mirrored-part partner check failed |
| 16 | Mirrored-part evaluated mesh stayed on one side |
| 17 | Mirror partner deviation above tolerance |
| 18 | Evaluated bbox not symmetric about X |
The blender-smoke workflow runs the check on Blender 5.2 LTS and 4.5 LTS (5.1 on the weekly cron, the needs-5.1 PR label, or manual dispatch). Smoke does not pass --output. Its catalog falsifier is --no-mirror (expects exit 5).