Skip to content

fix: crate-stack, depsgraph-export and unapplied-scale-gltf quality pass - #227

Merged
TMHSDigital merged 4 commits into
mainfrom
fix/quality-pass-crate-stack-depsgraph-unapplied-scale
Sep 23, 2026
Merged

TMHSDigital merged 4 commits into
mainfrom
fix/quality-pass-crate-stack-depsgraph-unapplied-scale

Conversation

@TMHSDigital

Copy link
Copy Markdown
Owner

Quality pass: three items, one per track. Everything below comes from live runs on .scratch/blender-{4.5.11,5.1.2,5.2.1}-windows-x64/blender.exe, which report 4.5.11 LTS / 5.1.2 / 5.2.1 LTS, unless it is labelled inspection.

A — showcase/crate-stack

Took 3 inspection rounds: r0 baseline, r1 fixes, r2 tuning. Each round rendered six orthos, two three-quarters, clay, wireframe, 9 joint close-ups and a ground-contact view. A separate probe coloured each crate on its own, which showed that the crossed boards between crates in the clay pass are just three crates yawed differently. The joints are sound.

Defects found in r0

  1. The iron L-straps are unbevelled 3.5 mm slabs with razor edges on all 12 straps. Revealed by the corner-strap and lid-rail close-ups, and the clay three-quarter.
  2. The straps carry no fasteners, so a plain dark plate reads as black tape. Revealed by the hero and every joint close-up.
  3. The iron reads matte black with no highlight or rust. Revealed by the hero.
  4. Every plank is the same tone with no grain, so the timber reads as MDF or plastic. Revealed by three-quarters a and b, and the hero.
  5. The temp .glb export leaked into the working directory (repo-wide item from the last queue).

Defects found only after fixing (by the new budgets, r1)
6. bmesh.ops.bevel gave the iron chamfer faces material slot 0. The plates rendered and classified as timber (iron faces 1008, expected ~1500).
7. Each strap was two boxes sharing their outer corner edge. Once chamfered, both laid strips on that line: 12 coplanar cross-shell pairs (the z-fight budget caught this).
8. The nail audit's fixed 10 mm size classifier dropped 8 of 48 nails once the heads grew, because a yawed head's world AABB is wider than the head (r2).

Fixes, and why each is structural rather than a nudge

  • 1 and 7: the strap is now a single L-section extrusion (quads only, one outer corner), chamfered at IRON_BEVEL = 0.8 mm. That bevel is sized to the stock, not to a screenshot.
  • 6: the bevel passes material=METAL_IDX.
  • 2: 48 frustum nail heads, placed from each plate's own outer face and normal (px, py, IRON_WRAP, strap height), so they follow the strap when any dimension changes.
  • 3: iron base colour and rust wear retuned.
  • 4: paint_planks writes PlankTone (seeded per shell) and GrainDir (each shell's long axis, recovered from its own vertices) as face attributes. The wood shader stretches its grain along GrainDir, not along a world axis, which a yawed crate would be 5–6° off.
  • 8: the threshold is derived from the strap (IRON_WRAP * 0.5).
  • 5: the export is removed after it is measured.

New budgets. Measured identically on 4.5.11, 5.1.2 and 5.2.1.

Budget Band Measured
Nail seat (exit 18) 48 nails, bite 0.3–1.0 mm, proud ≥ 1.0 mm 48, 0.60 mm, 1.80 mm
Edge treatment (exit 21) manifold edges within 5° of 90°: 0 timber 0, iron 0

Re-fitted around the new measurements: base tris 3200–7200 → 5200–7000, iron face floor 120 → 900, timber face floor 600 → 1800. The body footprint now includes nail proud (BODY_PROUD). The existing hygiene set is unchanged and still all zero, including zfight 0.

Triangles: 4380 → 6060. Collider 208 → 230 (ceiling 260). LOD2 is now 1332 / 0.2198 on all three versions; it used to split 5.2 against 4.5/5.1. Same-binary determinism: two runs on 5.2.1 match on every measured line.

Falsifiers: --float-nails → 18 (bite −0.90 mm) and --sharp-iron → 21 (216 right-angle iron edges), on all three binaries. tests/check_falsifier_targets.py passes (183 falsifiers).

Hero re-rendered on 5.2.1 through scripts/render_hero.py. check_framing runs without deviation=: fill y 0.728, min margin 0.128. Contact sheet: docs/gallery/contact-sheets/crate-stack-contact-sheet.webp. Luma 0.212 sits inside the calibration band (0.151 damped-track-aim to 0.305 bmesh-gear), stage 0.197, warmth +0.150, saturation 0.167. Thumbnail reads as three nailed crates. No asset sheet: no showcase piece has one yet (#202).

B — examples/depsgraph-export

Presentation change: each object now has an edge cage over it. On the base cube it is its 12 edges. On the evaluated object it is the same SUBSURF followed by WIREFRAME, so the cage draws exactly the 98-vertex topology the OBJ ships. Before, the still was "a teal cube and a ball", and nothing in frame showed base versus evaluated. The cages are separate render-path objects created after check().

Contract unchanged. check(), the assertions and the exit codes are untouched; the diff is confined to render_still.

4.5.11 5.1.2 5.2.1
default, before → after 0 → 0 0 → 0 0 → 0
--unevaluated, before → after 5 → 5 5 → 5 5 → 5

Framing: fill x 0.812, min margin 0.062. Contact sheet: docs/gallery/contact-sheets/depsgraph-export-contact-sheet.webp, luma 0.246, inside the band.

C — examples/unapplied-scale-gltf

README improvements:

  • Quotes the exact export_apply RNA description.
  • States the finding that export_apply=False writes the identical node scale and POSITION.
  • Adds a "who hits this" section: engine-side symptoms, and the fix, which is to apply scale in Blender, not flip an exporter flag.
  • Names the witnesses (nodes[0].scale, the POSITION range) and says why vertex count cannot tell applied from unapplied.
  • Adds API links (current and 4.5), consistent with the other READMEs.

Re-verification (live probe):

Claim 4.5.11 5.1.2 5.2.1
export_apply description "Apply modifiers (excluding Armatures) to mesh objects -WARNING: prevents exporting shape keys" same same
node.scale, export_apply=True / False [2, 0.5, 1] / [2, 0.5, 1] same same
POSITION range ±1 ±1 ±1
after --bake no scale key, POSITION x ±2, y ±0.5, z ±1 same same
default / --identity / --bake exit 0 / 3 / 4 0 / 3 / 4 0 / 3 / 4

Documented behaviour is correct. The old README said "same on 4.5 and 5.2"; it now covers 5.1 as well. No code change.

Also

  • showcase/README.md conventions: edge treatment (no right angles, bevel material=), L-sections as one shell, fastener classifiers derived from the host, plank tone and grain variation.
  • docs/gallery/index.html carries both card alts in the depsgraph commit, because one build regenerates both.

🤖 Generated with Claude Code

TMHSDigital and others added 4 commits September 23, 2026 10:12
…eated nails, grained planks

Adds two budgets: nail seat (exit 18, --float-nails) and zero right-angle
edges (exit 21, --sharp-iron). The corner strap is now one L-section
extrusion; two overlapping boxes put coplanar chamfer strips on every
outer corner. The iron bevel pins material=METAL_IDX. Per-plank tone and
grain direction ride as face attributes read by the wood shader. The temp
glTF export is removed after it is measured.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
…ge cages

Render path only. The check, its assertions and exit codes are unchanged.
docs/gallery/index.html also carries the crate-stack card alt from the
previous commit, since both regenerate in one build.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
…hits it, and 5.1 re-verification

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
… host-derived part classifiers, plank variation

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: TMHSDigital <154358121+TMHSDigital@users.noreply.github.com>
@TMHSDigital TMHSDigital added the needs-5.1 Opt-in Blender 5.1 smoke on this PR. Default matrix stays 4.5 + 5.2. Auto-label will not apply this. label Sep 23, 2026
@github-actions github-actions Bot added examples Runnable smoke-gated examples under examples/ showcase Budget-conformance props under showcase/ documentation Improvements or additions to documentation labels Sep 23, 2026
@TMHSDigital
TMHSDigital merged commit c05c6c5 into main Sep 23, 2026
13 checks passed
@TMHSDigital
TMHSDigital deleted the fix/quality-pass-crate-stack-depsgraph-unapplied-scale branch September 23, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation examples Runnable smoke-gated examples under examples/ needs-5.1 Opt-in Blender 5.1 smoke on this PR. Default matrix stays 4.5 + 5.2. Auto-label will not apply this. showcase Budget-conformance props under showcase/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant