Full glTF model export #8

Open
opened 2026-11-26 20:55:40 +00:00 by github-bot · 0 comments
Owner

@⁠nineforge0 on GitHub · 2026-11-24 07:34 UTC · original

Export 3D models from 0DRP paged resources to glTF 2.0.

Goal

  • src/formats/resource.rs detects paged resources and resolves their virtual (0x5000_0000 + off) and physical (0x6000_0000 + off) pointers. Build on it to:
    1. walk the drawable object graph (drawable → model list per LOD → models → geometries → vertex buffer / meshlet buffer),
    2. decode vertex streams (positions, normals, UVs) and meshlet triangle lists,
    3. write .gltf + .bin with one mesh per geometry and one node per model.
  • forge9 model archive.rpf <index> -o out.gltf.

Notes

  • glTF writing needs no new dependency; JSON can be emitted by hand like forge9 list --json.
  • Good to split into PRs: object graph walk + forge9 resource --objects listing first, then geometry decode, then glTF output.
  • Skeletons, materials and textures are follow-ups.

See CONTRIBUTING.md for build, test and style notes. Please don't attach game files to the PR; build test data in memory.

**@⁠nineforge0** on GitHub · 2026-11-24 07:34 UTC · [original](https://github.com/nineforge0/forge9/issues/8) Export 3D models from 0DRP paged resources to glTF 2.0. **Goal** - `src/formats/resource.rs` detects paged resources and resolves their virtual (`0x5000_0000 + off`) and physical (`0x6000_0000 + off`) pointers. Build on it to: 1. walk the drawable object graph (drawable → model list per LOD → models → geometries → vertex buffer / meshlet buffer), 2. decode vertex streams (positions, normals, UVs) and meshlet triangle lists, 3. write `.gltf` + `.bin` with one mesh per geometry and one node per model. - `forge9 model archive.rpf <index> -o out.gltf`. **Notes** - glTF writing needs no new dependency; JSON can be emitted by hand like `forge9 list --json`. - Good to split into PRs: object graph walk + `forge9 resource --objects` listing first, then geometry decode, then glTF output. - Skeletons, materials and textures are follow-ups. See [CONTRIBUTING.md](https://github.com/nineforge0/forge9/blob/main/CONTRIBUTING.md) for build, test and style notes. Please don't attach game files to the PR; build test data in memory.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:55:40 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.