Rope Bridge

showcase/rope-bridge/

A procedural rope footbridge — log posts, through-tenoned sills, twenty planks on two sagging foot ropes, lashed hand ropes, suspenders and staked tie-offs — carried through UVs, bake, LOD, compound 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: 8768 tris, two materials with 1356 timber and 3348 rope faces, UVs in 0..1 with zero AABB overlap and 18.8 baked texels per island, outer AABB 4.619×1.073×1.480 m, zmin 0, hygiene 0 including zero coplanar cross-shell pairs, four posts and four stakes grounded, every rope end and sill tenon biting its host, all 20 planks seated 4.0 mm on both foot ropes, 12 lashing turns hooped 2.4 mm, one connected assembly of 60 shells, posts plumb, plank pitch within 0.08 mm, hand ropes 0.87 m over the deck, and every plank top within 2.97 mm of a least-squares parabola with a 0.220 m sag. --vee-deck exits 19 on the parabola fit with its sag still in band; --float-suspenders exits 18 on the contact graph.

category Village

tags mesh export showcase

blender --background --python showcase/rope-bridge/rope_bridge.py --

A rope footbridge — two pairs of log posts, a squared sill through-tenoned across each end, twenty planks laid on two foot ropes that hang between the sills, two hand ropes lashed to the posts, suspenders tying hand rope to foot rope, and the foot ropes run back over the sills to ground stakes. A showcase piece, not an example — it witnesses no API contract. It asserts that generated geometry meets declared asset budgets, recomputed from the finished mesh.

What it composes#

Shipped contentUsed for
skills/mesh-editing-and-bmeshlathed logs, laid-rope sweeps, chamfered boards, UVs in one bmesh
skills/procedural-materials-and-shaderstimber grain along each member (GrainDir), per-member tone (PlankTone), hemp with a fibre bump
skills/bake-high-to-lowCycles tangent-space normal bake, high onto low
skills/engine-export-presetsUnity glTF (export_yup=True)
skills/depsgraph-and-evaluated-dataevaluated triangle counts for the LOD ratios
snippets/decimate_to_budget.pyLOD1 / LOD2 COLLAPSE chain
snippets/lod_chain.pyLOD naming and ratio pattern
examples/mesh-hygiene-audithygiene combinatorics (copied, not imported)

snippets/convex_hull_collider.py is deliberately not used; see Collider below.

The budget that matters#

A rope bridge can fail invisibly. A deck of planks laid on two straight ramps that meet at midspan has the same ends, the same sag, the same planks and the same bounding box as one that hangs; only the shape is wrong. A uniformly loaded cable hangs as a parabola, so the piece fits a least-squares parabola to the plank top-face centres read off the finished mesh — not to the function the generator used — and asserts every plank lands within 6 mm of it, with the fitted sag within 15 mm of the declared 0.22 m.

--vee-deck is the falsifier built for exactly this. It keeps the sill heights, the sag, the plank count, the pitch, every seat and the envelope, and swaps the parabola for two straight ramps. Its fitted sag is 0.215 m — inside the sag tolerance — and every other budget passes. Only the residual sees it: 32.5 mm against a 6 mm band.

The measured residual on the true deck is 2.97 mm, not zero, and that is the model rather than noise: each plank's underside is set from the foot rope's own reach at its station (below), and the three-strand lay turns under the deck, so the planks ride a few millimetres up and down on the strands.

Budgets#

Declared in the script as named constants, recomputed from the generated mesh. Measured values are from Blender 5.2.1; every one is byte-identical on 4.5.11 and 5.1.2.

BudgetBandMeasured
Base triangles8300–92008768
LOD1 ratio0.32–0.620.5000
LOD2 ratio0.10–0.350.2199
Material slotsexactly 2, distinct2
Timber faces≥ 11001356
Rope faces≥ 28003348
UV boundsinside 0..1(0.0016, 0.0016)–(0.9984, 0.9984)
UV AABB overlap≤ 1e-50.000000
Baked texels per UV island≥ 1218.84 (610 islands, 512 px)
Outer AABB4.619 × 1.073 × 1.480 m ± 0.0204.6185 × 1.0733 × 1.4800
Collider triangles≤ 400360
Normal bake{'FINISHED'} with image data{'FINISHED'}, has_data=True
glTF exportfile written, non-empty~300 kB
Hygieneall zeroloose 0/0, non-manifold 0, zero-area 0, doubles 0, n-gons 0, coplanar cross-shell pairs 0
Grounded AABB\zmin\≤ 1e-40.00000
Named supports4 posts + 4 stakes, each zmin ≤ 1e-38 at 0.00000
Hand-rope ends inside their postsdeepest vertex ≥ 0.030 m0.05669
Foot-rope ends inside their stakesdeepest vertex ≥ 0.020 m0.03347
Sill tenons inside their postsdeepest vertex ≥ 0.010 m0.01980
Plank seat on each foot rope20 planks, bite 0.002–0.008 m0.00400 on all 40
Lashing hoop12 turns, bite 0.0005–0.005 m0.00238–0.00246
One connected assembly1 component1 (60 shells)
Plumb (posts and stakes)bottom-to-top slab centroid ≤ 0.004 m0.00000
Deck parabolaevery plank top within 0.006 m; sag 0.22 ± 0.015 m0.00297; 0.22037
Plank pitchevery gap within 0.003 m of the mean0.00008 (mean 0.1689)
Rail height at midspan0.80–1.00 m above the deck0.86521
Right-angle edges00

Real-world size: a 3.6 m span between post centres carrying a 3.2 m walkable deck of 0.80 m planks, hand ropes 0.87 m over the deck at midspan, posts 1.48 m tall — a garden or gorge footbridge module, 4.6 m overall with its stakes.

Construction#

Conventions walked#

Every convention in showcase/README.md, and whether it applies here.

ConventionAppliesHow
Deterministic, budgets declared, assertions recomputeyesseed 31; every value above is read off the mesh
Falsifier fails the budget it targetsyestable below, proven on all three binaries
Hygiene incl. cross-shell coplanaryesexit 15; KD-tree range query, cross-shell
Named supportsyes4 posts + 4 stakes (--float-post)
Joint-fit / a joint bitesyesrope ends and sill tenons, deepest vertex by signed distance (--short-rails)
Diagonal from stationsyessuspenders run from the foot-rope centre to the hand-rope centre at a plank gap
Even shaping terms / mirror symmetrynothe laid rope is chiral: a right-hand lay mirrors to a left-hand one, so the body has no mirror partner by design
Wrappers follow the host's profileyeslashings take the lathe profile's radius at their height
Seat conformance (banded)yesplank seats and lashing hoops, both banded (--float-planks, --loose-lashings)
Plumb and real-world sizeyesposts and stakes plumb (--lean-post); rail height (--slack-rails)
Band hooped, never flushyeslashings bite 2.5 mm
Member tenoned into its seatyessills end at the post centres
Segment counts are a silhouette budgetyes16-segment posts, 12-segment stakes, smooth-shaded
Material face floorsyestimber ≥ 1100, rope ≥ 2800
Shading is part of the modelyesposts, stakes and ropes smooth (round, organic); planks and sills flat (sawn)
One substance, one slotyestimber (posts, sills, planks, stakes), rope
Edge treatment: no right anglesyesexit 20 (--sharp-plank)
Sort bmesh operator inputsyesbevel edges sorted by index
Variation into surface, never functionyesplank length, tone and post wobble vary; plank pitch is asserted (--drift-planks)
A platform bears on somethingyesevery plank seats on both foot ropes, counted
One connected assemblyyesexit 18 (--float-suspenders)
Bake texels per UV cellyesexit 21 (--low-bake)
Bake cage narrower than the nearest neighbouryesCAGE_EXTRUSION 0.01 m
Rope is laid, not pipedyesabove
Identical boards read as CGyesPlankTone and GrainDir per shell
Level on the stage; stage 60 myesturned about Z only; 60 m floor and wall
Keep a falsifier's envelope stillyesworst deltas: --float-post +12 mm Z, --loose-lashings +13 mm X/Y, against 20 mm
Masonry, vessels, scatter, fixtures, roofs, forgings, rings, iron, paintnothe piece has no stone, vessel, scatter, plate, roof, forging, ring hardware or paint

Falsifiers#

Each breaks one pipeline stage so a named budget fails. All fourteen were run on 4.5.11, 5.1.2 and 5.2.1 and exited the same declared code on all three.

FlagTarget budgetBreaksExit
--skip-decimateLOD1 ratiodrops the DECIMATE modifiers, LOD1 ratio goes to 1.00009
--stray-vertmesh hygieneadds one loose vertex above the deck, inside the envelope15
--lift-zgrounded zminlifts the whole mesh 50 mm16
--float-postnamed supportsfloats one post 12 mm; the others still ground the AABB16
--short-railsjoint bitestops each hand rope 20 mm short of its post; deepest end vertex −19.3 mm17
--float-planksplank seatlifts every plank 7 mm off the ropes; bite −3.0 mm18
--loose-lashingslashing hoopsizes every lashing 6.5 mm wider; bite −4.0 mm18
--float-suspendersone connected assemblystops both ends of every suspender 30 mm short; 15 components18
--lean-postplumbleans one post 20 mm at the top, lashings and all; 19.4 mm off plumb19
--vee-deckdeck parabolatwo straight ramps with the same ends and sag; 32.5 mm off the fit19
--drift-planksplank pitchshifts alternate planks ±15 mm along the rope; 31.7 mm off the mean gap19
--slack-railsrail heighthangs the hand ropes 0.40 m instead of 0.10 m; rail 0.565 m19
--sharp-plankedge treatmentleaves the middle plank unchamfered; 12 right-angle edges20
--low-bakebaked texels per UV islandbakes at 256 px; 9.42 texels21

Exit codes#

File-local and sequential. 9 is a valid check code. 1 is the FATAL wrapper — a crash, never a named check.

CodeMeaning
0Success
1Uncaught exception (FATAL wrapper)
2argparse / usage
3Mesh did not build, or has no UV layer
4Base triangle count outside band
5Material slots, or a material's face floor
6UVs outside 0..1
7UV AABB overlap above tolerance
8Outer AABB off declared size
9LOD1 or LOD2 ratio outside band (--skip-decimate)
10Framing gate (examples/gallery_framing.py, render path only)
11Collider triangles above ceiling
12Normal bake failed or produced no image data
13glTF export missing or empty
14--output produced no file
15Mesh hygiene (--stray-vert)
16Grounded zmin, or a named support floating (--lift-z, --float-post)
17A rope end or sill tenon not biting its host (--short-rails)
18Plank seat, lashing hoop, or the contact graph (--float-planks, --loose-lashings, --float-suspenders)
19Plumb, deck parabola, plank pitch or rail height (--lean-post, --vee-deck, --drift-planks, --slack-rails)
20Right-angle edges (--sharp-plank)
21Baked texels per UV island below floor (--low-bake)
22Gallery asset-quality violation (render path; the floors' 11 is remapped here)

Run it#

# Budget check, no render. ~2.2 s on 4.5, ~2.0 s on 5.1, ~2.2 s on 5.2.
blender --background --python rope_bridge.py --

# Falsifier: the deck stops hanging as a parabola. Must exit 19.
blender --background --python rope_bridge.py -- --vee-deck

# Falsifier: every suspender stops short of both ropes. Must exit 18.
blender --background --python rope_bridge.py -- --float-suspenders

# Render the gallery still (EEVEE; --engine cycles on a GPU-less host).
blender --background --python rope_bridge.py -- --output bridge.webp

Smoke runs the check-only path. It does not pass --output or any falsifier.

Cross-version measurements#

Value4.5.115.1.25.2.1
Base triangles876887688768
LOD1 tris / ratio4384 / 0.5000samesame
LOD2 tris / ratio1928 / 0.2199samesame
Face counts (timber / rope)1356 / 3348samesame
Outer AABB4.6185 × 1.0733 × 1.4800samesame
Collider tris360360360
Deck fit residual / sag0.00297 / 0.22037samesame
glTF bytes300212300212300212
Check wall-clock~2.2 s~2.0 s~2.2 s

DECIMATE COLLAPSE is the usual cross-version suspect. Here it happens to produce identical LOD counts on all three binaries; the gate is still a ratio band, not an exact count.

Source

showcase/rope-bridge/rope_bridge.py View the script on GitHub →
A wooden rope bridge whose plank deck sags between two pairs of log posts, with hemp hand ropes lashed to the posts, vertical ropes tying rail to deck, and foot ropes run back to ground stakes.