Traffic Cones

showcase/traffic-cones/

A procedural roadworks set on a cut-out patch of asphalt — a broken-edged asphalt slab with a worn white road line and two sealed tar cracks; seven 720 mm PVC traffic cones, each a hollow lathed body with a moulded bead and a rolled lip round an open tip, bonded into a square rubber base with chamfered corners, a raked top, a collar, four moulded lugs and a recess underneath, and hooped with 4 in and 6 in retroreflective collars; three standing in a taper line, three nested in a stack whose wall thickness sets the nesting pitch, and one knocked over onto the edge of its base and the lip of its tip, its roll solved so both touch; a folding A-frame barricade of four square steel legs hinged in pairs on pivot bolts, spread by pinned straps on spacers, each foot in a rubber pad, carrying two boards on each face split on 45-degree lines into orange and white retroreflective stripes and bolted to the legs; and a warning lamp with amber fresnel lenses on a bracket bolted to the top board — 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: 45816 tris, eleven materials with 6048 cone PVC, 4088 reflective, 8096 rubber, 596 asphalt, 56 road paint, 496 tar, 64 orange sheeting, 384 board, 2912 steel, 720 black plastic and 696 lens faces, UVs in 0..1 with zero AABB overlap, outer AABB 3.037×2.037×1.335 m, zmin 0, hygiene 0 including zero coplanar cross-shell pairs, all 10 supports (five cone bases, the fallen cone's body and four barricade pads) 1.5 mm into the slab (band 0.8–3.0 mm), 4 boards biting their legs 1.5 mm at all 8 joints (band 0.8–3.0 mm), 14 collars seated 0.600 mm into their bodies and 1.400 mm proud, 6 upright cones 0.0000° off plumb at 0.720 m on bases 0.356 m across the flats, the barricade's 4 legs mirrored within 0.0001 mm, one stack of 3 at a 0.036 m pitch with each inner wall bearing 0.847–1.105 mm on the wall below (band 0.4–2.0 mm), one connected assembly of 125 shells, LOD ratios in band, collider 342 tris, non-empty glTF. --skip-decimate exits 9; --stray-vert 15; --lift-z 16; --float-cone 16; --gap-board 17; --float-band 18; --lean-cone 19; --skew-leg 19; --loose-stack 20; --loose-lamp 21.

category Vehicles

tags mesh export showcase

blender --background --python showcase/traffic-cones/traffic_cones.py --

A showcase piece, not an example, and the seventh in the vehicles category: things that direct movement. It builds a roadworks set standing on a cut-out patch of asphalt:

Everything that stands on the patch bears 1.5 mm into it: every base, the fallen cone's base and body, and the barricade's pads. Boards bear 1.5 mm into the legs they are bolted to; collars bear 0.6 mm into their bodies and stand 1.4 mm proud of them.

The stack is the piece's own invariant. A cone's wall is thick enough, for the slope of its body, that the next cone down seats on it one nesting pitch lower: WALL_H = BODY_SLOPE × STACK_PITCH + NEST_BITE. So each upper cone's inner wall bears 1 mm on the lower cone's outer wall along the whole overlap, and the bases hang 36 mm apart with the lower collar inside the upper recess (6 mm clear above it, 16 mm around 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: the patch is 3.04 × 2.04 m with its jittered edge; the lamp housing sets the top at 1.335 m. A cone is 0.720 m tall on a base 0.356 m across the flats; the barricade's hinges stand 1.0 m over the slab. The origin is under the patch centre at the slab's underside.

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 triangles45300–4640045816
LOD1 ratio0.32–0.62 of base0.5000
LOD2 ratio0.10–0.35 of base0.2200
Materialsexactly 11 distinct; ≥5560 cone PVC, ≥3760 reflective, ≥7440 rubber, ≥540 asphalt, ≥50 road paint, ≥450 tar, ≥58 orange sheeting, ≥350 board plastic, ≥2670 steel, ≥660 black plastic, ≥640 lens faces11 slots; 6048 / 4088 / 8096 / 596 / 56 / 496 / 64 / 384 / 2912 / 720 / 696
UVsin 0..1, AABB overlap ≤ 1e-5in range, overlap 0
Outer AABB(3.0365, 2.0374, 1.3354) m ± 0.01, read off the vertices(3.0365, 2.0374, 1.3354), zmin 0
Collider tris≤ 540342
Exportwritten, size > 0, removed after measuring3327800 / 3327800 / 3327792 bytes (4.5.11 / 5.1.2 / 5.2.1)

Every falsifier leaves the triangle count at 45816 and the envelope at (3.0365, 2.0374, 1.3354): they move 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, and 4.5.11 and 5.1.2 print the same measurements as 5.2.1 (the export differs by 28 bytes).

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: every standing base, the stack's bottom base, the fallen cone's base and body, and the four pads, each against the slab top read off the asphalt10 supports; sink 0.8–3.0 mm10; 1.5 mm each

The first draft measured 205 coplanar pairs, none of them in a part:

Stance, joints, collars, size and assembly#

AxisDeclaredMeasured
Boards into legs: each board's back face against the front face of each leg it is bolted to, both planes read off the faces and compared along the board's normal4 boards, 8 joints; bite 0.8–3.0 mm4, 8; 1.5 mm each
Collar seat: per collar, per angular segment, the innermost vertex against the host body's outer wall (a ray toward the axis along the vertex's own radial), and the outermost vertex's stand-off14 collars, each on a host; seat 0.2–1.5 mm; proud ≥ 1.0 mm14; 0.600 mm; 1.400 mm
Plumb and size: each upright body's bottom-slab against top-slab centroid; its top over its base's bottom; the base's width across the flats (support function about the axis)6 upright cones; tilt ≤ 0.2°; 0.720 m and 0.356 m ± 3 mm6; 0.0000°; 0.720; 0.356
Mirror: the barricade's four legs paired across the boards' centre, extents compared4 legs; ≤ 1 mm4; 0.0001 mm
Nesting: coaxial upright bodies form stacks; per pair, the pitch between body bottoms and, by rays at 40 mm stations and 16 angles along the overlap, the lower's outer wall less the upper's inner wall1 stack of 3; pitch 0.030–0.042 m; bite 0.4–2.0 mm1 of 3; 0.036, 0.036; 0.847–0.949 and 1.034–1.105 mm
One connected assembly (union of shells whose BVH trees overlap)1 component1 (125 shells)

The nesting bite varies round each pair because the stacked cones are yawed differently, so a lower facet meets an upper facet off its middle; the chord sag of a 48-segment body is 0.29 mm at the bottom.

Falsifiers#

Each falsifier violates one named budget. Every one was run on 5.2.1 and 4.5.11 and exited its declared code, with the triangle count and envelope unchanged and every budget checked before the target 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-coneevery support bedded in the slab (the right-hand standing cone lifted 4 mm: sink −2.5 mm, the rest 1.5 mm)16
--gap-boardboards bite their legs (the lower front board 3 mm off its legs: −1.5 mm at both)17
--float-bandcollar seat (the left cone's 6 in collar 2 mm out: seat −1.4 mm)18
--lean-coneplumb (the middle standing cone's body tipped 1.5° in its base: tilt 1.431°)19
--skew-legleg mirror symmetry (the right front leg 2.5 mm toward the centre: 2.500 mm)19
--loose-stacknesting (the top cone lifted 10 mm: pitch 0.046, bite −0.576 to −0.505 mm)20
--loose-lampone connected assembly (the lamp 3 mm off its board: 2 components, 9 and 116 shells)21

--float-cone lifts a whole cone while the slab still grounds the box. --lean-cone tips the body and its collars about the collar top and leaves the base flat, so the supports hold; its measured tilt is a little under 1.5° because the slabs it compares are cut level through a leaning body. --skew-leg moves the front leg inward, into the 3 mm gap its washer fills, so it stays clear of its strap and its board's bite is unchanged. --loose-stack first lifted the top cone 12 mm, which put its base bottom on the middle cone's collar-top plane and exited 15 on 192 coplanar pairs; 10 mm keeps every horizontal plane of the two cones at least 2 mm apart. --loose-lamp pulls the lamp level off the board rather than along the board's normal, which had lifted the envelope's top 0.8 mm.

Run#

blender --background --python traffic_cones.py --
blender --background --python traffic_cones.py -- --skip-decimate
blender --background --python traffic_cones.py -- --stray-vert
blender --background --python traffic_cones.py -- --lift-z
blender --background --python traffic_cones.py -- --float-cone
blender --background --python traffic_cones.py -- --gap-board
blender --background --python traffic_cones.py -- --float-band
blender --background --python traffic_cones.py -- --lean-cone
blender --background --python traffic_cones.py -- --skew-leg
blender --background --python traffic_cones.py -- --loose-stack
blender --background --python traffic_cones.py -- --loose-lamp
blender --background --python traffic_cones.py -- --output cones.png

Smoke passes no flags.

The hero looks from the front left and above, so the taper line of cones reads in front of the barricade, the stack's three bases show at the left and the fallen cone's open base and recess face the lens. The wall stands 6 m behind the patch, and the warm wedge pools on it to the right. Default stage; no deviation.

Shading#

The cone bodies, bases, lens, housing and every lathe are smooth-shaded; chamfers, the patch's rims and every material boundary stay crisp through sharp edges above 35°. The stripes are cut into the board's own faces, so their boundaries are hard edges on a flat face and cannot z-fight. Every cone, board and leg carries a PartTone face attribute that the shaders read to move each part between two tones, so no two cones are the same orange. Grime rises from the slab on every part; scuffs are sparse and small. The cone PVC and its collars also carry level rub marks, black on the orange and grey on the sheeting: a noise squashed sixteen-fold in height, so each mark runs round the cone like a tyre or boot rub rather than up it. The steel is galvanised, grey and rough, with a studio reflection term so it does not read as plastic on a dark stage.

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 and 21 are file-local. 22 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 ≠ 11 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 support outside its sink band, or not 10 supports (--lift-z, --float-cone)
17A board's bite into a leg outside its band, or not 4 boards and 8 joints (--gap-board)
18A collar's seat or stand-off outside its band, or a collar with no host, or not 14 collars (--float-band)
19A cone not plumb, its height or base width off, or the legs not mirror-symmetric, or not 6 upright cones and 4 legs (--lean-cone, --skew-leg)
20Nesting: not one stack of 3, or a pitch or wall bite outside its band (--loose-stack)
21Assembly splits into more than one connected component (--loose-lamp)
22Asset-quality floor (render path only; remapped from 11)

Source

showcase/traffic-cones/traffic_cones.py View the script on GitHub →
Scuffed orange cones on a patch of asphalt, three in a row, three stacked and one knocked over showing its open base, before a striped A-frame barricade with an amber lamp.