Quad Drone

showcase/quad-drone/

A procedural camera quadcopter — a two-tone moulded shell with panel lines, grilles, a sensor visor, a battery pack and a GPS puck, four folding arms hinged on pinned clevises with lock rings, slotted brushless motors carrying twisted, swept two-blade propellers, rubber-footed skids and a three-axis gimbal camera — through UVs, bake, LOD, collider, and Unity glTF, asserting recomputed budgets rather than an API contract.

Rendered headless by the showcase piece itself. Select it to enlarge.

witnesses Recomputed: 41048 tris, eight materials with 1720 shell, 2304 carbon, 6472 gunmetal, 524 glass, 760 light, 1296 rubber, 8464 graphite and 2184 anodised faces, UVs in 0..1 with zero AABB overlap, outer AABB 0.692×0.569×0.243 m, zmin 0 and all 4 feet grounded, hygiene 0 including zero coplanar cross-shell pairs, the 4 motor axes on an exact X about the body centre (gaps 90.000°, diagonals 0.52000 m, axes vertical, hubs level), every neighbouring prop disc cleared by 0.0365 m (band 0.028–0.050), mass centre 0.115 m inside the feet's footprint (floor 0.090), wheelbase 0.520 m, one connected assembly of 171 shells, LOD ratios in band, collider 374 tris, non-empty glTF. --skip-decimate exits 9; --stray-vert 15; --lift-z 16; --float-foot 16; --unlock-arm 17; --long-blades 18; --narrow-skids 19; --drop-lens 20.

category Vehicles

tags mesh export showcase

blender --background --python showcase/quad-drone/quad_drone.py --

A showcase piece, not an example, and the first in the vehicles category. It builds a procedural prosumer camera quadcopter on an X frame:

The layout is solved from named constants. The motor axes sit at 45°, 135°, 225° and 315°, 0.26 m from the body centre (a 0.52 m diagonal). The hinge pin of each arm is placed where a level ray at arm height leaves the shell's closed-form surface, plus a named gap. Grilles and the visor are laid on that surface along its own normal, and the battery is seated below the lowest point of the crown under its footprint.

Three things the coplanar budget forced:

Shading follows what each part is. The shell, tubes, blades and lathes are smooth-shaded; grilles, chamfers, knurls and slots stay crisp through sharp edges above 35° and at every material boundary. The navigation lights are one emissive material whose colour is chosen from object-space X: red forward of the body centre, green aft of it.

It asserts budget conformance of the generated result. It does not witness an API contract. "It rendered without error" is not a check.

Composes skills mesh-editing-and-bmesh, bake-high-to-low, depsgraph-and-evaluated-data, engine-export-presets, and snippets bake_normal_high_to_low.py, setup_bake_target_image.py, lod_chain.py / decimate_to_budget.py, convex_hull_collider.py, export_preset_unity.py (helpers copied inline, not imported).

Intended size: a 0.52 m motor-to-motor diagonal, 0.33 m propellers, and a body shell 0.255 m long and 0.136 m wide. The outer AABB is 0.692 × 0.569 × 0.243 m. The props, as parked, set X and Y; the battery and spinners set the top. The origin is under the body centre, so the drone lands on its feet.

Budgets#

Every budget is declared as a named constant. Every gate recomputes its value from the mesh, materials, UVs, evaluated LOD, collider, or export file.

AxisDeclaredMeasured (5.2.1)
Base triangles40000–4200041048
LOD1 ratio0.32–0.62 of base0.5000
LOD2 ratio0.10–0.35 of base0.2200
Materialsexactly 8 distinct; ≥1580 shell, ≥2120 carbon, ≥5950 gunmetal, ≥480 glass, ≥700 light, ≥1190 rubber, ≥7800 graphite, ≥2000 anodised faces8 slots; 1720 / 2304 / 6472 / 524 / 760 / 1296 / 8464 / 2184
UVsin 0..1, AABB overlap ≤ 1e-5in range, overlap 0
Outer AABB(0.692, 0.569, 0.243) m ± 0.01(0.6924, 0.5693, 0.2433), zmin 0
Collider tris≤ 540374
Exportwritten, size > 0, removed after measuring3121080 / 3121080 / 3121072 bytes (4.5.11 / 5.1.2 / 5.2.1)

Every falsifier leaves the triangle count at 41048: they move, scale or narrow parts, never add or remove them.

DECIMATE COLLAPSE triangle counts are not identical across Blender series, so the LOD gate is a ratio band, not an exact count. Bake pixels are stochastic, so the bake gate is has_data plus operator FINISHED, not byte-identity. Construction uses no RNG; two default runs print identical measurements.

Hygiene#

Recomputed from the generated mesh, not asserted about the script.

AxisDeclaredMeasured
Non-manifold edges00
Loose verts / edges0 / 00 / 0
Doubles merged at 1e-500
Zero-area faces00
N-gons00
Coplanar cross-shell face pairs (KD range 0.05 m, plane ε 1e-4)00
Grounded: zminwithin 1e-4 of 00.0000
Feet: each of the 4 rubber feet has its own zminwithin 1e-4 of 00, 0, 0, 0

Motor layout, propeller clearance, stance and assembly#

AxisDeclaredMeasured
Motor layout: the 4 stator bells' axes (vertex mean; tilt by PCA) about the body shell's centreangular gaps 90° ± 0.3°; radii within 1 mm of each other; the two diagonals within 1 mm; axes within 0.5° of vertical; 4 hubs at one height ± 0.5 mm and each on its motor's axis ± 0.3 mm; motor centroid within 1 mm of the body centre45, 135, 225, 315°; 0 error; 0.000 mm; diagonals 0.52000, 0.52000; 0°; 0 mm; 0 mm; 0 mm
Propeller clearance: each prop's disc (farthest blade vertex from its motor's axis) against each neighbouring prop's disc; 2 blades per prop, each overlapping its hubgap 0.028–0.050 mdiscs 0.16558 m; gaps 0.03653 m (all four)
Stance: mass centre (shell volumes × density per material) inside the convex footprint of the feet's soles (each foot's lowest ring)≥ 0.090 m inside every edge0.1146 (3.46 kg, centre at x 0.0067)
Wheelbase (mean motor-to-motor diagonal)0.520 m ± 0.0030.52000
Body shell length and width0.255 × 0.136 m ± 0.0030.2546 × 0.1360
One connected assembly (union of shells whose BVH trees overlap)1 component1 (171 shells)

A camera drone's layout is its flight controller's assumption: the mixer treats the four thrust axes as the corners of an exact square, level, in one plane. An arm that did not lock fully open is the commonest way to break that in the field, and the layout budget sees it as an angular gap. The clearance budget is the other half: a prop that fouls its neighbour's disc is the failure a longer prop invites. The densities are named constants (the moulded shell at 350 kg/m³ for a hollow moulding with its electronics, carbon 1600, aluminium 2700, glass 2500, lights and rubber 1200, graphite plastic 1400), and the volumes come from the mesh.

Falsifiers#

Each falsifier violates one named budget. Every one was run on 5.2.1 and exited its declared code. None moves the envelope: every run measured the same outer AABB as the default.

FlagBudget violatedExit
--skip-decimateLOD1 ratio band (measured 1.0000)9
--stray-vertloose vertex count is 0 (measured 1, placed inside the envelope)15
--lift-zbounding box zmin is 0 (measured 0.05000)16
--float-footevery foot on the ground (front-left foot 3 mm up: its zmin 0.00300, the other three 0)16
--unlock-armmotor axes on an exact X (rear-left arm 2.5° short of locked open: worst gap 1.491° off 90°, motor centroid 1.69 mm off centre)17
--long-bladespropeller clearance (rear-left blades 14 mm longer: disc 0.1795 m, gap to both neighbours 0.0226 m)18
--narrow-skidsstance (skids drawn in to ±0.075 m: margin 0.0776 m)19
--drop-lensone connected assembly (glass element 12 mm out of its barrel: 2 components)20

The rear-left arm is the one both --unlock-arm and --long-blades move because its prop is parked across its arm, so neither its tips nor its motor ever set the envelope. --unlock-arm leaves the prop gaps inside their band (0.0317 and 0.0412 m), so only the layout budget sees it. --long-blades leaves every motor where it was. --float-foot lifts one foot while the other three still ground the box. --narrow-skids keeps the feet on the ground and the envelope unchanged; only the footprint shrinks. It stops at ±0.075 m on purpose: drawn in to ±0.044 m, the front struts ran through the gimbal's roll arm and the run exited 15 on 69 coplanar pairs instead of 19. The stance footprint is each foot's sole (its lowest ring) rather than only the vertices touching the floor. Otherwise --float-foot also collapsed the footprint to a triangle (margin 0.0039 m) and broke two budgets at once.

Run#

blender --background --python quad_drone.py --
blender --background --python quad_drone.py -- --skip-decimate
blender --background --python quad_drone.py -- --stray-vert
blender --background --python quad_drone.py -- --lift-z
blender --background --python quad_drone.py -- --float-foot
blender --background --python quad_drone.py -- --unlock-arm
blender --background --python quad_drone.py -- --long-blades
blender --background --python quad_drone.py -- --narrow-skids
blender --background --python quad_drone.py -- --drop-lens
blender --background --python quad_drone.py -- --output drone.png

Smoke passes no flags.

The hero turns the piece HERO_YAW_DEG (−118°), so the nose and the gimbal camera face the lens and the X of the arms reads in depth from above. The wall stands 2.2 m behind the drone, where the floor seam falls above the far propeller tips, and the warm wedge pools on it.

Exit codes#

File-local. 9 is a valid check code. 10 is reserved for gallery_framing.check_framing on the --output path. 15–19 are the hygiene and joint-fit family. 20 is file-local. 21 is the asset-quality floor on the render path: check_asset_quality returns 11, which this piece already spends on the collider ceiling, so the call site remaps it.

CodeMeaning
0Success
1Uncaught exception (FATAL wrapper)
2argparse / usage
3Mesh did not build / no UV layer
4Base triangle count outside range
5Material count ≠ 8 distinct slots, or a face-count floor missed
6UVs outside 0..1
7UV AABB overlap above tolerance
8World AABB off declared outer size
9LOD ratio band (--skip-decimate lands here)
10Framing gate (render path only)
11Collider triangle count above ceiling
12Bake did not finish or image has no data
13Export file missing or empty
14--output produced no file
15Mesh hygiene: loose, non-manifold, zero-area, doubles, n-gons, coplanar cross-shell pairs
16Not grounded: bounding box zmin off 0, or a foot off the ground, or not 4 feet (--lift-z, --float-foot)
17Motor layout: axes off an exact X (angular gap, radius, diagonal, tilt, hub height, hub off axis, centroid), or not 4 motors and 4 hubs (--unlock-arm)
18Propeller clearance: a neighbouring disc gap outside its band, a prop without 2 blades, or a blade not in its hub (--long-blades)
19Stance and size: mass centre within 90 mm of the feet's footprint edge, wheelbase, or body length and width (--narrow-skids)
20Assembly splits into more than one connected component (--drop-lens)
21Asset-quality floor (render path only; remapped from 11)

Source

showcase/quad-drone/quad_drone.py View the script on GitHub →
A white-and-graphite camera drone seen from above on a dark studio floor: four carbon arms with red lock rings, two-blade props on slotted motors, skids, and a gimbal camera under the nose.