Cargo Loader

showcase/cargo-loader/

A procedural sci-fi industrial cargo loader, a bipedal powered-lift exoframe standing in a crouch and holding a corrugated cargo crate off the ground on two forged L-tines — broad flat feet with rubber soles, grip cleats and toe bumpers; hydraulic legs of lofted box-section shins and thighs pinned at the ankle, knee and hip; arms hung from shoulder yokes, each joint a clevis of two lug bushings straddling an eye bushing with a chrome pin through all three; eight rams (hip and knee, shoulder and elbow), each a collared steel cylinder with a chromed rod, a pinned clevis bracket at each end and a hose from its port; fork carriages with hazard-striped faces; an open roll-cage cockpit with a bucket seat, four-point harness, joystick consoles, amber beacon and work lights; a power pack with a slatted grille, cooling fins, hazard bands, exhaust stacks and cable looms — 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: 44600 tris, ten materials with 2736 paint, 608 hazard, 3128 chrome, 15328 steel, 2740 rubber, 480 seat-vinyl, 640 harness, 256 beacon, 152 work-light and 516 crate-paint faces, UVs in 0..1 with zero AABB overlap, outer AABB 2.827×1.689×2.974 m, zmin 0 with both soles on the floor, hygiene 0 including zero coplanar cross-shell pairs, all 28 clevis pins 0.000 mm off the axis of each of their three bushings and 0.000° to them (caps 0.3 mm, 0.3°), the crate's base biting both tines by 0.0020 m at every station along a 0.74 m run (band 0.0010–0.0040, run ≥ 0.50), both soles flat and level to 0.000 mm and 0.000° (caps 0.5 mm, 0.2°), all 8 ram rods 0.000 mm off their cylinders' axes and 0.0096° to them (caps 0.3 mm, 0.3°) with 0.1591–0.2858 m of rod exposed (band 0.080–0.340) and 0.060 m engaged (floor 0.040), a 2380.6 kg loader and crate whose mass centre stands 0.4473 m inside the soles' support polygon (floor 0.200), one connected assembly of 414 shells, LOD ratios in band, collider 532 tris, non-empty glTF. --skip-decimate exits 9; --stray-vert 15; --lift-z 16; --float-foot 16; --offset-pin 17; --lift-crate 18; --tilt-sole 19; --skew-rod 20; --bottom-ram 21; --overload 22; --loose-light 23.

category Vehicles

tags mesh export showcase

blender --background --python showcase/cargo-loader/cargo_loader.py --

A showcase piece, not an example, and the fourth in the vehicles category. It builds a procedural sci-fi industrial cargo loader: a bipedal powered-lift exoframe with an open cockpit, standing on its two feet and holding a cargo crate off the ground in its forks. It is a generic warehouse and starport machine, not a copy of any film prop, and carries no brand names or badges.

The pose is solved from named joint stations in the side view (ankle, knee, hip, shoulder, elbow, wrist), mirrored across the centreline. Every member is lofted between two stations; every ram runs pin to pin between two brackets whose standoff is read off the member's own section at that station, and its gland sits at a fixed fraction of that length, so the exposed rod is whatever the pose leaves.

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: 2.97 m to the top of the beacon, 1.69 m across the pin heads of the arm joints, 2.83 m from the power pack's grille to the tine tips. The crate is 0.78 × 1.12 × 0.62 m, its base 1.00 m off the ground. The origin is under the loader's centre, so it lands on its soles.

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 triangles44000–4500044600
LOD1 ratio0.32–0.62 of base0.5000
LOD2 ratio0.10–0.35 of base0.2190
Materialsexactly 10 distinct; ≥2550 paint, ≥560 hazard, ≥2900 chrome, ≥14300 steel, ≥2550 rubber, ≥440 seat vinyl, ≥590 harness webbing, ≥235 beacon, ≥140 work-light, ≥480 crate paint faces10 slots; 2736 / 608 / 3128 / 15328 / 2740 / 480 / 640 / 256 / 152 / 516
UVsin 0..1, AABB overlap ≤ 1e-5in range, overlap 0
Outer AABB(2.827, 1.689, 2.974) m ± 0.01(2.8272, 1.6890, 2.9740), zmin 0
Collider tris≤ 760532
Exportwritten, size > 0, removed after measuring3450636 / 3450636 / 3450628 bytes (4.5.11 / 5.1.2 / 5.2.1)

The collider is the convex hull of the whole loader; the power pack, the beacon, the shoulder pins and the tine tips carry its outline.

Every falsifier leaves the triangle count at 44600 and the outer AABB unchanged: they move, turn or reweigh 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
Supports: each of the 2 soles has its own zminwithin 1e-4 of 00, 0

Parts set out in a row share planes by construction. The first draft measured 1185 coplanar cross-shell pairs: the foot cleats' buried bottom caps (all on one plane inside the foot), the beacon's top cap standing on the lens's top, and the crate's corner posts starting on the wall loft's bottom cap. Later drafts found the cage collars' bottoms on the tubes' end caps, the pack fins' buried inner faces on one plane, and each crate post against its lower corner casting (two faces per post; the casting moved 0.6 mm). Every one was fixed by staggering the part (0.3–0.6 mm steps, or a bite past the host's cap), never by widening a band.

Joints, rams, crate, soles, stance and assembly#

Each part the audits read is found by a face attribute (Role, Unit) stamped at build time: pin, bushing, ram cylinder, ram rod, sole, tine, crate base. The tag only says which shell is which; every value below is read off that shell's vertices or faces.

AxisDeclaredMeasured
Clevis joints: every pin's axis (a turned part's axis is the eigenvector whose eigenvalue stands apart from its equal radial pair) through each of its three bushings' centres, and parallel to theirs; each bushing inside the pin's span28 joints × 1 pin + 3 bushings; offset ≤ 0.3 mm, tilt ≤ 0.3°28; 0.000 mm, 0.000°
Crate on the tines: each tine's blade top against the crate base's underside, a ray down onto the tine and a ray up into the base at stations every 10 mm along the tine's centre line (20 mm off the base's chamfered rim)2 tines, every station's bite 0.0010–0.0040 m; each tine under the base for ≥ 0.50 m0.0020–0.0020 m both; 0.74 m both
Soles level: each sole's bottom faces (normal z < −0.9)height spread ≤ 0.5 mm, plane tilt ≤ 0.2°0.000 mm, 0.000° both
Rams coaxial: each rod's axis on its cylinder's axis8 rams; rod centre ≤ 0.3 mm off, tilt ≤ 0.3°8; 0.000 mm, 0.0096°
Ram stroke: each rod's length past the gland face, and still inside the barrel, along the cylinder's axisexposed 0.080–0.340 m; engaged ≥ 0.040 m0.1591–0.2858 m; 0.060 m
Stance: mass centre of loader and crate together (shell volumes × density per material) inside the convex polygon of both soles' contact rings≥ 0.200 m inside every edge0.4473 (2380.6 kg, 457.3 kg of it cargo; centre at x 0.252, y 0.000, z 1.515)
One connected assembly (union of shells whose BVH trees overlap)1 component1 (414 shells)

The crate budget reads the faces, not the corners. The blade has vertices only at its root and tip, and its tip now stands past the crate's front, so a test that took the highest tine vertex under the base would find none or the root's corner. The stations sample the tine's top face and the base's underside where they meet, and the chamfered rim is left out because the base's underside rises into it. The band's floor is a bite, not a touch: a crate resting a hair above its tines passes a gap test and hovers.

The ram budget is two readings along one axis. The exposed rod is how far the rod reaches past the gland face; below the floor the rod eye is crushed against the gland (the ram has bottomed out), above the ceiling the piston is near the end of its travel. The engaged length is how much rod is still in the barrel, so a rod cannot be drawn out of its cylinder. Densities are named constants (painted frame, pack and pelvis as hollow panels with their contents 900 kg/m³, chrome 7800, gunmetal steel 4500, rubber 1100, seat foam 150, webbing 300, lenses 1200 and 1500, the loaded crate 450), and the volumes come from the mesh. The crate's centre is held 1.42 m ahead of the ankles; the power pack behind the seat counterweighs it.

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 and triangle count as the default, and every budget checked before the target stayed green.

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-footboth soles on the ground (left sole 5 mm up into its foot: zmin 0.00500, the right 0)16
--offset-pinclevis pins coaxial with their bushings (left knee pin 2.5 mm forward: 0.002500 m off)17
--lift-cratecrate resting on both tines (crate 6 mm up: bites −0.0040 m on both)18
--tilt-solesoles level (left sole turned 0.6° about its toe edge: spread 0.012545 m, tilt 0.600°)19
--skew-rodrams coaxial (left hip ram's rod turned 1° about its eye: tilt 1.0000°, 0.002184 m off)20
--bottom-ramram stroke (left knee ram's barrel run up to 40 mm short of the rod eye: exposed 0.0440 m)21
--overloadstance (the crate 14 times as dense: 6401.9 kg of cargo, margin −0.3853 m)22
--loose-lightone connected assembly (left work light 60 mm out along its aim, off its bracket: 2 components)23

--float-foot lifts only the left sole, into its foot, so the foot stays on its sole and the right sole grounds the box. --tilt-sole turns the sole about its own front bottom edge, so the toe stays on the ground and only the heel lifts; its contact shrinks to that edge, which drops the stance margin to 0.2097, but the level budget is checked first. --offset-pin moves one pin across its three bushings, inside them, and leaves them where they are. --lift-crate moves the whole crate, so every station along both tines sees the same gap; the crate also loses contact with the assembly, which is why the contact budget is checked before connectivity. --skew-rod turns the rod about its own eye, so the eye end stays pinned and only the barrel end wanders. --bottom-ram lengthens one barrel, not the ram: both pins, the rod and the envelope stay put. --overload changes a density, not the mesh, which is the point: the machine that stands with 457 kg in its forks tips with 6.4 t. --loose-light moves the lamp head 60 mm, well clear of the bracket's end, and the head is held by that one bracket only.

Run#

blender --background --python cargo_loader.py --
blender --background --python cargo_loader.py -- --skip-decimate
blender --background --python cargo_loader.py -- --stray-vert
blender --background --python cargo_loader.py -- --lift-z
blender --background --python cargo_loader.py -- --float-foot
blender --background --python cargo_loader.py -- --offset-pin
blender --background --python cargo_loader.py -- --lift-crate
blender --background --python cargo_loader.py -- --tilt-sole
blender --background --python cargo_loader.py -- --skew-rod
blender --background --python cargo_loader.py -- --bottom-ram
blender --background --python cargo_loader.py -- --overload
blender --background --python cargo_loader.py -- --loose-light
blender --background --python cargo_loader.py -- --output loader.png

Smoke passes no flags.

The hero turns the piece HERO_YAW_DEG (−62°), so the front and the right side come toward the lens: the crate in its forks, the right leg's rams and clevises, the shoulder yoke and vent, the cockpit through the cage, and the power pack's fins and hazard band. The wall stands 5 m behind the loader, 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–23 are file-local. 24 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 ≠ 10 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 sole off the ground, or not 2 soles (--lift-z, --float-foot)
17Clevis joints: not 28 joints of one pin and three bushings, a bushing off its pin's axis or tilted to it, or outside its span (--offset-pin)
18Crate on the tines: a station's bite outside its band, or a tine under the base for too short a run (--lift-crate)
19Soles not level: a sole's bottom spread in height or its plane tilted (--tilt-sole)
20Rams: not 8, or a rod off its cylinder's axis or tilted to it (--skew-rod)
21Ram stroke: a rod's exposed length outside its band, or too little of it left in the barrel (--bottom-ram)
22Stance: mass centre within 0.200 m of the soles' support polygon's edge (--overload)
23Assembly splits into more than one connected component (--loose-light)
24Asset-quality floor (render path only; remapped from 11)

Source

showcase/cargo-loader/cargo_loader.py View the script on GitHub →
A yellow bipedal cargo loader in a crouch, hydraulic rams on its legs and arms, an open roll-cage cockpit with an amber beacon, holding a blue-grey crate on its forks.