Consider adding support for glTF
Ryder17z opened this issue · 6 comments
Just a suggestion.
Reference:
https://github.com/KhronosGroup/glTF
Thanks for the issue! It is actually planned from the beginning, but I have not done it yet since it has never been an important milestone, nor was it requested by anyone. If it would be useful to you in the near future, or to anyone passing by this issue, please let me know!
I'd like to try to build something with this engine so gltf support would be handy as I don't need to convert third party assets if gltf was supported directly.
I've been considering integrating https://github.com/spnda/fastgltf for a few weeks now, I can certainly start working on this in the near future 👌
glTF & GLB files are now finally supported 🎉
This is not yet merged on the main branch, but will be anytime next week. In the meantime, you can try it out in advance on dev
. If you do, please let me know if there's anything not working as expected!
- Only images with an URI (file path) are supported, buffered images (such as those in GLBs) cannot be loaded yet;
- Only PNG and TGA images are supported, JPEG ones aren't yet.
glTF & GLB files are now officially supported on the main branch!
Also, I've finally integrated stb_image, which not only adds support for many more image formats to be loaded, but also allows them to be from byte data, which works just fine for the files I've tested with. This effectively removes both limitations I've mentioned in my previous message.
The only issue I'm aware of is a weird mismatch between textures in some cases, notably in the Sponza sample model. I have no idea if it happens for others; I'll have to get on this in the future, but it should be good enough for most files.
Please let me know if there are any issue on your side!
Done by 90fa223..44b1baa.