studio: list the shown model's size, meshes, materials and textures (STUDIO-MODEL-DETAILS) #2335
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!2335
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/studio-model-details"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull request successfully merged and closed
Claimed in the coordination issue as: STUDIO-MODEL-DETAILS (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7193990202)
What and why
A feature for the 3D studio (
viewer/studio.html, served bytools/gallery.py). Its stats panel gave a model's triangles, vertices and file size. Checking an export needs the next layer too: how big the model came out, how many meshes and materials it has, and which textures each material uses at what size. The panel now shows that, read from the loaded glTF alone:0.0215 mand a building48.3 m. A wrong scale, or a model exported in centimetres, shows at once.map 1024×512,normalMap 512×512). A material with neither a texture nor vertex colours is marked no texture in the accent colour: that flat-colour look is often a texture the export lost. Vertex-coloured materials say so instead.Details:
userData.origMaterial, asdisposeModeldoes), not the studio clay.loadModelsit next to the other stats, so this merges cleanly with the open studio PRs that edit the camera fit (#1490, #2136) and the others on this file (#1138, #2100, #2250).Tested
Windows 11, Node 26.12.1, Chromium (app browser pane). No game files:
node --test tests/test_viewer_studio.cjs: 15 pass. Three new tests on synthetic objects: the size, counts and per-material texture list of a model with a shared textured material, an untextured one, a vertex-coloured one, a texture without an image (?) and a non-mesh node, loaded in clay mode; hostile material names render as text and the details followsetLanguage('eu'); the panel before any model, after a stale load, after a failed load (unchanged) and for an empty model (list hidden). The three fail onmain(the panel has no such fields); the 12 existing tests pass.tests/test_viewer_streaming.cjs,tests/test_gallery.pyandtests/test_viewer_cdn_integrity.pyalso pass.python -I tools/gallery.py --models-dir <dir>with a synthetic 2.9 KB.glbwritten by a stdlib script (three glTF meshes, one with two primitives; materialsBodywith a 64×32 base colour and a 32×32 normal texture on two meshes, an unnamed flat one,Decals<b>withCOLOR_0). The panel showed4.5 × 1.4 × 0.0215 m,4 / 3 / 2and the three materials as expected in RU and EU, with the name escaped; no console errors besides the existing/vendor/404s that fall back to the CDN.scripts/check_no_game_data.pyon both files.GPUs tested: n/a (no GPU-specific code; WebGL in the browser pane)
AI-assisted: yes (Claude Code, Claude Opus 5.5)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code
Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review.
(AI-assisted triage.)
Now ready for review and
MERGEABLE. Clean-room verified: displaying model bounding dimensions, mesh/material/texture counts, and escaped material details inviewer/studio.htmlwith Node tests intests/test_viewer_studio.cjsis clean and verified (@lixonik).Approving — ready to merge once CI runs green on current
main.(AI-assisted review.)