Skip to content

The generic 3D formats in the graphic engine: glTF, meshopt, Draco, KTX2 and texture compression read once for 3D Tiles and models - #654

Merged
graffkevin merged 11 commits into
mainfrom
slice-19-formats
Dec 5, 2026

Conversation

@graffkevin

Copy link
Copy Markdown
Collaborator

Slice 19 of the migration, step 1: the generic 3D formats in isard-graphic-engine::formats, read the same by 3D Tiles, the models and the tools.

  • glTF, meshopt, Draco, KTX2, texture compression (BC1/ETC1) and bytes reading moved from legacy/crates/tiles3d/src/decode to isard-graphic-engine::formats; glTF splats (KHR_gaussian_splatting, SPZ) read in formats::gltf; the models' pose in scene::rig. New features animation, draco, ktx2; tiles3d's own features switch them on.
  • KTX2's formats are isard_rhi::BlockFormat: one list of GPU block formats, the WebGL mapping kept once next to the wasm export.
  • 3D Tiles (b3dm, i3dm, pnts, cmpt) decode through the new formats; the scene, the tools and the fuzz targets import them directly, no re-export left in legacy. The old decode/{gltf,accessor,meshopt,draco,animation,splats}.rs, parse_glb, texture.rs, bytes.rs are deleted.
  • Contract test, written first: crates/technique/graphic-engine/data/gltf.json, 14 models (Khronos glTF-Sample-Assets at e124e8d8, the textured box in Draco and meshopt, Lille's photomesh tiles, the helix points) read by glTF Transform 4.5.1 (scripts/test/gltf-fixture.ts); it passed on the old decoder before the move and passes on the new one.
  • Benches moved to isard-graphic-engine/benches/formats.rs (glb meshopt in three variants, Draco, KTX2 with transcoding, the meshopt streams).

The Draco and KTX2 wasm modules are unchanged here; their reduction to the decoder alone, the models layer, COLLADA and IFC follow in the next steps of slice 19.

Performance

Decoding benches, main → branch (--quick): glb meshopt 8.63 → 8.75 µs, quantized 8.94 → 8.92 µs, filtered 9.17 → 9.00 µs; meshopt streams 958/666/888 → 966/663/897 ns: within noise. No frame path changes. Module sizes (gzip): 3D Tiles 102.0 KB (budget 98.5 → 107), SOG 167.4 KB (162.9 → 175.8), Draco 192.8 KB, KTX2 414.9 KB within budget.

@graffkevin
graffkevin merged commit 27e58b6 into main Dec 5, 2026
16 of 18 checks passed
@graffkevin
graffkevin deleted the slice-19-formats branch December 5, 2026 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant