Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement glTF #122

Open
cochrane opened this issue Apr 2, 2021 · 4 comments
Open

Implement glTF #122

cochrane opened this issue Apr 2, 2021 · 4 comments

Comments

@cochrane
Copy link
Owner

cochrane commented Apr 2, 2021

That way the whole thing would be a lot more useful again.

@cochrane
Copy link
Owner Author

cochrane commented Apr 3, 2021

Rough outline:

  • Implement version 1.0 first, including binary format and default material extension
  • Each primitive of a mesh becomes a mesh in its own right
  • 2.0 as next step after that, with its fancy shaders.

cochrane added a commit that referenced this issue Apr 8, 2021
Initial support for rendering glTF 1.0 files! Very, very limited so far, but that doesn't have to remain the case. In particular:

- No materials whatsoever, even the default material is not implemented correctly.
- Only triangles, no other types of primitive
- No binary file (*.glb) support
- No glTF 2.0 support whatsoever, trying to load those files will probably fail in funny ways
- No support for files without indices
- Probably many more

This is the first major step for issue #122.
@cochrane
Copy link
Owner Author

cochrane commented Apr 8, 2021

Immediate next steps (order TBD):

  • Support binary files
  • Support files without indices

@cochrane
Copy link
Owner Author

cochrane commented Apr 9, 2021

Gear change: Support only glTF 2.0. Rationale:

  • glTF 1 doesn't seem to have widespread adoption; exporters and validators only deal with glTF 2
  • Existing models that you can find on the internet all seem to use glTF 2
  • glTF 1 and 2 have incompatible schemas (glTF 1 uses objects where glTF 2 uses arrays) which makes supporting both annoying
  • glTF 1's default material model of "just put the whole shader file in there" is problematic for e.g. ports to Metal in the far future. The alternative KHR_materials_common is broken (the extension specification does not match the official sample files) and all work at fixing it seems to be targeted at glTF 2, which also has a reasonable (though challenging) materials model.

Will probably also rip out support for glb version 1 because there's no need for it in the glTF 2 world.

cochrane added a commit that referenced this issue Apr 9, 2021
The original plan was to support both eventually, but for reasons explained in #122, that was probably not a great idea.
@Stylistc86
Copy link

Stylistc86 commented Jul 28, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants