glb_inspect: show normal, metallic-roughness, occlusion and emissive maps #1747

Merged
leonida/mandy
kirigayakazima merged 1 commit from codex/glb-inspect-material-maps into main 2026-11-28 19:28:14 +00:00

Pull request successfully merged and closed

kirigayakazima commented 2026-11-25 11:04:08 +00:00

Claimed in the coordination issue as: GLB-INSPECT-MATERIAL-MAPS

What and why

The character exporter writes normal and metallic-roughness textures, but the inspector only listed base color. The inspector now shows all other core material texture roles that were actually declared. Both reports use the existing image resolution rules, including extension images. A material without those roles retains its existing report shape.

Tested

The synthetic test covers all four roles, two roles sharing an extension image, an invalid boolean index and an unresolved declared index. An existing exact JSON comparison covers materials without additional maps.

  • python -I tests/test_glb_inspect.py on Windows with Python 3.14.7 ran 37 tests on this branch with one platform skip. The new tests also failed against the original inspector.
  • python -I scripts/check_no_game_data.py tools/glb_inspect.py tests/test_glb_inspect.py and git diff --check passed.
  • The shared base at bcaa13da passed 6,287 semantic tests across 488 files.

GPUs tested: N/A (CPU-only metadata inspection).
AI-assisted: Yes.

Checklist

  • Based on current upstream main.
  • One topic.
  • All test inputs are synthetic. No game data, keys or decryption.
  • Translator contract table: N/A.
Claimed in the coordination issue as: [GLB-INSPECT-MATERIAL-MAPS](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7160388047) ### What and why The character exporter writes normal and metallic-roughness textures, but the inspector only listed base color. The inspector now shows all other core material texture roles that were actually declared. Both reports use the existing image resolution rules, including extension images. A material without those roles retains its existing report shape. ### Tested The synthetic test covers all four roles, two roles sharing an extension image, an invalid boolean index and an unresolved declared index. An existing exact JSON comparison covers materials without additional maps. - `python -I tests/test_glb_inspect.py` on Windows with Python 3.14.7 ran 37 tests on this branch with one platform skip. The new tests also failed against the original inspector. - `python -I scripts/check_no_game_data.py tools/glb_inspect.py tests/test_glb_inspect.py` and `git diff --check` passed. - The shared base at `bcaa13da` passed 6,287 semantic tests across 488 files. GPUs tested: N/A (CPU-only metadata inspection). AI-assisted: Yes. ### Checklist - [x] Based on current upstream main. - [x] One topic. - [x] All test inputs are synthetic. No game data, keys or decryption. - Translator contract table: N/A.
lixonik reviewed 2026-11-25 11:19:52 +00:00
lixonik left a comment
No description provided.
Independent check at "bd605a6f". Windows: 36 tests reported, 1 platform skip. An extra CLI check resolved normalTexture through a KHR_texture_basisu image URI and emissiveTexture through a named core image. The JSON reported both roles and used the name in preference to the second image URI. AI-assisted review and CPU-only testing with synthetic inputs.
zmasi commented 2026-11-28 11:38:16 +00:00

#1747 | head bd605a6fb3778601f0d49167b3d6cadf29d260bc (merged cleanly with main 4a54aedcb) | python -I tests/test_glb_inspect.py | red on main: FAILED (errors=1, skipped=6) (KeyError: 'additional_textures') | green on PR+main: 37 tests OK (skipped=6) | Windows 11, Python 3.12.10 | AI-assisted: yes

Audited _material_report, _texture_name, and format_report in tools/glb_inspect.py (resolving declared metallicRoughnessTexture, normalTexture, occlusionTexture, and emissiveTexture bindings, including EXT_texture_webp sources and invalid/missing texture indices without fabricating entries when omitted). Also verified clean merge (0 conflicts) and combined execution with #1746 (40 tests OK (skipped=6)), plus tests/test_ci_registration.py (18 OK), tests/test_text_write_line_endings.py (3 OK), and scripts/check_no_game_data.py.

#1747 | head bd605a6fb3778601f0d49167b3d6cadf29d260bc (merged cleanly with main 4a54aedcb) | `python -I tests/test_glb_inspect.py` | red on main: `FAILED (errors=1, skipped=6)` (`KeyError: 'additional_textures'`) | green on PR+main: `37 tests OK (skipped=6)` | Windows 11, Python 3.12.10 | AI-assisted: yes Audited `_material_report`, `_texture_name`, and `format_report` in `tools/glb_inspect.py` (resolving declared `metallicRoughnessTexture`, `normalTexture`, `occlusionTexture`, and `emissiveTexture` bindings, including `EXT_texture_webp` sources and invalid/missing texture indices without fabricating entries when omitted). Also verified clean merge (`0` conflicts) and combined execution with #1746 (`40 tests OK (skipped=6)`), plus `tests/test_ci_registration.py` (`18 OK`), `tests/test_text_write_line_endings.py` (`3 OK`), and `scripts/check_no_game_data.py`.
MoonEyes commented 2026-11-28 19:28:10 +00:00

Red/green: tests/test_glb_inspect.py fails on main (KeyError: 'additional_textures') and passes with the PR merged, on GitHub Actions Linux and natively on Windows.
Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main 7daa4a4a5 in GitHub Actions: no new failure.
AI-assisted (Claude Code, Claude Opus 5.5)

Red/green: tests/test_glb_inspect.py fails on main (KeyError: 'additional_textures') and passes with the PR merged, on GitHub Actions Linux and natively on Windows. Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main 7daa4a4a5 in GitHub Actions: no new failure. AI-assisted (Claude Code, Claude Opus 5.5)
Sign in to join this conversation.
No description provided.