Skip to content

glTF 2.0 Model Export Format - #725

Open
blitzingeagle wants to merge 17 commits into
KillzXGaming:masterfrom
blitzingeagle:gltf-exporter
Open

glTF 2.0 Model Export Format#725
blitzingeagle wants to merge 17 commits into
KillzXGaming:masterfrom
blitzingeagle:gltf-exporter

Conversation

@blitzingeagle

@blitzingeagle blitzingeagle commented Feb 16, 2026

Copy link
Copy Markdown

Summary

This PR adds a glTF 2.0 model exporter to the application as an alternative to the existing DAE model exporter.

glTF has become the industry-standard interchange format and is now significantly better supported in modern tools such as Blender, which has phased out official Collada (DAE) support since 5.0. Adding glTF provides a more future-proof export option.

The implementation uses SharpGLTF as a new dependency and supports exporting both:

  • .gltf (JSON + external images and buffers)
  • .glb (binary container)

Changes

  • Added SharpGLTF dependency for writing glTF format
  • Exporting a single model through the interface now allows you to use the .gltf and .glb file extensions, though not explicitly prompted through the file format dropdown
  • The option to select .gltf and .glb have been added to Batch Model Export
  • glTF exporter is able to export vertex, normals, colors, UVs, bone nodes, skins (joints + weights)
  • Added Runtime detection for Animal Crossing: New Horizons, with an addition two texture types, done to refine the guesswork of the texture type enum logic
  • Added .gitignore for generated .dll

Improvements

  • GLTF export settings should be prompted for in the UI for better user experience
  • Separate AO, Metallic, and Roughness textures are not added to the glTF export model yet, though are still raw dumped
  • ACNH specific "Mix" textures still need a bit of research, unclear what use the various channels are, as it changes based on model type. (e.g. for furniture R=Metallic, G=Ambient Occlusion, R=Roughness, but those settings don't work for clothing)

Will still need a bit of work and testing to ensure a clean user experience, but as it stands it has mostly achieved parity with the DAE model exporter, since DAE does not use PBR materials and instead dumps textures alongside the export.

@ariankordi

Copy link
Copy Markdown

There are a couple of issues I found out about for my use case of exporting Mii body models (Wii U Mii Maker, MiiBodyMiddle.bfres from main.sgarc.cmp), and importing those .glb files + .smd animations into iqmtool.

  • ariankordi@fd2f214: Removes the first "Armature" node, as I found it was unnecessary and caused iqmtool to say "Error: bone all_root has inconsistent parents".
  • ariankordi@2f62df4: Properly resolves bone indices.
    • This fixes deformations in models where not all bones are enabled for skinning/rigging.
    • For example, the Mii body has all_root / skl_root that are not actually used to influence the final model. That causes mismatched IDs that this fixes.
  • ariankordi@ab6a874: Add vertex tangents to the export.
    • Didn't check if this was the only missing attribute. In any case, this was vibe coded and should be redone.

Feel free to cherry-pick or redo these fixes.

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.

2 participants