Skip to content

feat: add lod-decimate-chain example witnessing the modifier LOD contract#76

Merged
TMHSDigital merged 1 commit into
mainfrom
feat/lod-decimate-chain
Jul 19, 2026
Merged

feat: add lod-decimate-chain example witnessing the modifier LOD contract#76
TMHSDigital merged 1 commit into
mainfrom
feat/lod-decimate-chain

Conversation

@TMHSDigital

Copy link
Copy Markdown
Owner

Summary

Second example of the "game asset pipeline" arc (after #75): a retro toy rocket — lathed body, ogive nose, three swept fins, porthole, all closed form — evaluated at LOD0/1/2 through the Decimate modifier via the depsgraph. Decimation/LOD is the pipeline stage where AI-generated code bakes reductions into the base mesh, stacks ratios silently, or loses silhouette-critical extremes.

Contract witnessed

  1. Decimate is non-destructive, living in the depsgraph. Evaluated counts drop while obj.data keeps the closed-form counts (1,147 verts / 2,260 tris) — proven before and after evaluation; every evaluated reference released with to_mesh_clear().
  2. COLLAPSE ratio is a target, not a guarantee. Each LOD's evaluated tris must land within 5% of ratio × base: measured 0.00% at 0.5 (1,130 tris) and 0.44% at 0.18 (405 tris) — bounds set deliberately tight from measured behavior.
  3. Silhouette-critical dimensions survive. Bbox held within 1e-3 at every level (measured 7.7e-6); the closed-form bbox accounts for the asymmetric 3-fin span exactly.

Version witness: the Decimate API (decimate_type='COLLAPSE', ratio) is stable between 4.5 LTS and 5.1 — the example runs identically on both, measured values equal to the digit (verified locally on both binaries).

Falsification evidence (temporary breaks in scratch copies, 5.1.2, restored after measurement):

Probe Break Exit Measured
A second Decimate stacked at 0.5 8 tris 565 deviates 50.0% from ratio target 1,130
B modifier dropped entirely 6 evaluated tris 2,260 == base — reduction absent
C aggressive ratio 0.02 9 bbox drift 0.0206 — nose tip collapses (silhouette loss)

Probe C's finding is documented in the README: silhouette loss is the real failure mode of aggressive LODs, which is exactly what the bbox bound catches.

Visual / contact-sheet gate: lod-decimate-chain-contact-sheet.webp — candidate beside the pinned set (armature-bend, damped-track-aim, bmesh-gear). Per-criterion verdicts: stage darkness ✓, wedge warmth ✓, subject fill ✓ (comparable to the tubes), saturation ✓ (cream/red/teal reads saturated), thumbnail legibility ✓ (LOD progression + plaques read at 640×360). Mean luminance: candidate 139.2 vs calibration 139.4 / 100.1 / 143.4 (sRGB luma) — essentially identical to armature-bend.

Proven by live run vs inspection:

  • Live run, local: check-only exit 0 on .scratch/blender-5.1.2-windows-x64/blender.exe (Blender 5.1.2, hash ec6e62d40fa9) and .scratch/blender-4.5.11-windows-x64/blender.exe (Blender 4.5.11 LTS, hash 4db51e9d1e1e) — identical measured values. Render path exit 0 on both binaries (EEVEE), pixels iterated on this machine (4 drafts: framing clips, plaque legibility fixes). All three probes live on 5.1.2.
  • Live run, CI: both smoke series (4.5 LTS, 5.1) on the PR head SHA — see checks below.
  • Inspection only: nothing claims otherwise.

Test plan

  • Validate (structure/frontmatter), validate-manifest, validate-counts (README substring 25 examples)
  • Blender 5.1 smoke — new step runs examples/lod-decimate-chain/lod_decimate_chain.py -- check-only
  • Blender 4.5 smoke — same
  • Ecosystem drift check; Socket Security checks
  • Local binaries used for evidence: .scratch/blender-5.1.2-windows-x64/blender.exe (Blender 5.1.2) and .scratch/blender-4.5.11-windows-x64/blender.exe (Blender 4.5.11 LTS)

Integration: example dir + README, gallery.json entry, plugin manifest, smoke step, top-level README ("Game asset pipeline" category now 2, counts 24→25), generated gallery pages (read character-by-character: card alt and witnesses callout verified full), ROADMAP shipped entry.

🤖 Generated with Kimi Code

…ract

Game engines consume LOD chains, and the modifier-based chain is where
AI-generated code drifts: baking the reduction into the base mesh, stacking
ratios, or losing silhouette-critical extremes. A closed-form retro rocket
evaluated at LOD0/1/2 through the depsgraph pins all three: non-destructive
evaluation, ratio-bounded triangle counts, and bbox preservation.

The Decimate API is stable across 4.5 LTS and 5.1; the example demonstrates
that by producing identical measured values on both, and documents the
aggressive-ratio nose-tip collapse as the caught silhouette failure mode.

Signed-off-by: fOuttaMyPaint <TMhospitalitystrategies@gmail.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation ci labels Jul 19, 2026
@TMHSDigital
TMHSDigital merged commit 82e80b9 into main Jul 19, 2026
9 checks passed
@TMHSDigital
TMHSDigital deleted the feat/lod-decimate-chain branch July 19, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant