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

Merged
kirigayakazima merged 1 commit from upstream-pr/1747 into main 2026-11-28 19:28:14 +00:00
kirigayakazima commented 2026-11-25 11:04:08 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kirigayakazima on 2026-11-25T11:04:08Z.


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.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5490085275 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1747). Originally posted by [kirigayakazima](https://github.com/kirigayakazima) on 2026-11-25T11:04:08Z. --- 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 commented 2026-11-25 11:19:52 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-25T11:19:52Z.

Review: COMMENTED


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6056671213 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1747#pullrequestreview-6056671213). Originally posted by [lixonik](https://github.com/lixonik) on 2026-11-25T11:19:52Z. **Review:** COMMENTED --- 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 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T11:38:16Z.


#1747 | head bd605a6fb3 (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.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7238683055 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1747#issuecomment-7238683055). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T11:38:16Z. --- #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 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T19:28:10Z.


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)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7244566944 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1747#issuecomment-7244566944). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T19:28:10Z. --- 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 reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!1747
No description provided.