Skip to content

conformance: visual sweep tooling, NIST findings, and the MovieDecoder ADR#34

Merged
delta9000 merged 3 commits into
mainfrom
chore/poc-conformance-sweep
Jun 28, 2026
Merged

conformance: visual sweep tooling, NIST findings, and the MovieDecoder ADR#34
delta9000 merged 3 commits into
mainfrom
chore/poc-conformance-sweep

Conversation

@delta9000

@delta9000 delta9000 commented Jun 28, 2026

Copy link
Copy Markdown
Owner

The Web3D/NIST visual conformance sweep, what it found, and the fixes for the three concrete gaps it surfaced. Pairs with #33 (the sweep drives the PoC's --front).

Tooling

  • scripts/poc_conformance_sweep.py — headless parse+extract probe over the NIST set (bucketed, resumable).
  • scripts/visual_conformance_sweep.py — renders each scene through the PoC (--front, xvfb+mesa), fetches the matching NIST *-front.jpg, and scores "same subject?" with a local OpenAI-compatible vision model. Resumable JSONL; --no-front for bindable-Viewpoint scenes whose reference is the bound view. Always exits 0 (diagnostic, not a gate).
  • scripts/fetch_conformance_nist.sh + mise tasks.

Fixes (each root-caused to a distinct layer)

Other findings

ADR-0041 — MovieDecoder seam

Ship royalty-free + permissive codecs (pl_mpeg/MPEG-1, then Theora, WebM/VP8-9); leave patent-encumbered / copyleft (H.264/265, FFmpeg, GStreamer) to implementors behind the same frozen seam. Added to nav + seam-status matrix.

Verified: all 48 C++ tests, golden, conformance-gate, and both example consumers (validate-examples) pass; strict docs-build clean.

…ST) set

A diagnostic that runs the OpenGL PoC over the full 763-scene X3D Conformance
(NIST) example set to surface parser/extractor gaps the unit conformance suite
doesn't cover.

- scripts/fetch_conformance_nist.sh: download the official web3d.org bundle and
  extract the .x3d (+ --textures) into .x3d-corpus/x3d-code/ (gitignored).
- scripts/poc_conformance_sweep.py: per-scene headless parse+extract probe
  (OK / OK_EMPTY / PARSE_FAIL / CRASH / TIMEOUT / ERROR), opt-in --gl pass that
  drives the real OpenGL pipeline via poc --screenshot under xvfb + mesa
  (llvmpipe). Bucketed by section; failures collapsed by normalized signature.
- mise tasks: conformance-nist-fetch, poc-conformance-sweep.

First run: 737/763 (96.6%) extract OK; GL pass 15/15 on a Geometry sample. The 26
zero-item scenes split into legit-empty (bindable/script/interpolator-only,
EXTERNPROTO decls, newScene) and real gaps — notably <Extrusion/> with default
crossSection/spine extracts no geometry (reproduces in cpuraster too, so it is an
SDK extraction gap, not poc-specific).
…Decoder ADR

Adds the vision-model visual conformance sweep and records what it surfaced:

* scripts/visual_conformance_sweep.py — renders each ConformanceNist scene
  through the PoC (--front, xvfb+mesa), fetches the matching NIST *-front.jpg
  reference, and scores "same subject?" with a local OpenAI-compatible vision
  model. Resumable JSONL; --no-front for bindable-Viewpoint scenes whose
  reference is the bound view, not a canonical front. Always exits 0 (diagnostic).

* findings.yaml — VIS-EXTRUSION-EMPTY (Extrusion default/simple -> 0 geometry),
  VIS-ELEV-SPACING-EMPTY (ElevationGrid x/zSpacing -> 0), VIS-SPHERE-NOUV (Sphere
  ImageTexture not applied — no texcoords), VIS-MOVIE-DECODE (deferred -> ADR-0041);
  each item count verified by poc --headless. SEAM-TEXT-METRICS confirmed (length
  compression renders as bars now that a real atlas is wired).

* ADR-0041 — MovieDecoder seam: ship royalty-free + permissive codecs (pl_mpeg
  MPEG-1, then Theora, WebM/VP8-9), leave patent-encumbered / copyleft
  (H.264/265, FFmpeg, GStreamer) to implementors behind the same frozen seam.
  Added to the nav + seam-status matrix.
… unlit textures

Three conformance gaps surfaced by the visual NIST sweep, each root-caused to a
distinct layer:

- Extrusion with unauthored crossSection/spine extracted no geometry
  (default_extrusion.x3d, test_simpleorient.x3d). Root cause was the GENERATOR,
  not the extractor: the MF-struct default emitter collapsed any multi-element
  array default to its first element, so the Extrusion binding defaulted
  crossSection to {1,1} and spine to {0,0,0} instead of the 5-point unit square
  and the 2-point segment. Fixed by chunking the scalar list into element-sized
  groups (emit/defaults.py) + regenerating Extrusion.hpp; an authored 1-point
  spine still culls (the "< 2 spine points => empty" contract holds).

- ElevationGrid test_xSpacing/test_zSpacing authored only one dimension and left
  the other at its 0 default, so the xd>=2 && zd>=2 guard zeroed the output.
  Infer the missing dimension from height.size() when it divides evenly by the
  authored dimension (conservative, documented leniency matching the NIST refs).

- Sphere with an ImageTexture and NO Material rendered flat white. The extractor
  was already spec-correct (no Material => Unlit with the image on the Emissive
  slot, §12.2.5); the PoC's unlit shader simply had no texcoord/sampler. Added
  aTexCoord + sampler2D to unlit.vert/frag and bound the texture in the unlit
  draw path.

Findings VIS-EXTRUSION-EMPTY, VIS-ELEV-SPACING-EMPTY, VIS-SPHERE-NOUV flipped to
fixed; conformance view regenerated. All 48 C++ tests, golden, conformance-gate,
and both example consumers pass.
@delta9000 delta9000 force-pushed the chore/poc-conformance-sweep branch from 422a1a1 to 6b65dc9 Compare June 28, 2026 02:58
@delta9000 delta9000 marked this pull request as ready for review June 28, 2026 03:24
@delta9000 delta9000 merged commit 3cabd61 into main Jun 28, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant