Add custom support for gltf2.0 file format
Pull Request Description
Add loading/rendering/writing of gltf2.0 files.
gltf is intended for data and material exchanges between content creation tools and renderers. The gltf specification follows the same principle than OpenGL, Vulkan, ... See https://www.khronos.org/gltf/ for more information
Implementation follows as much as possible the official specification from https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html
The current implementation support only a few extension (at the moment of the PR) Some extensions (KHR and EXT) will be added in the future in RadiumEngine, others will be available only as a radium client library (e.G. ADOBE, NVIDIA, ...) see https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0.
Please check if the PR fulfills these requirements
- [x] The commit message follows our guidelines
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
Be aware that the PR request cannot be accepted if it doesn't pass the Continuous Integration tests.
-
What kind of change does this PR introduce?
- [ ] bug fix
- [x] feature
- [ ] docs update
- [ ] other:
-
What is the current behavior? (You can also link to an open issue here) gltf2.0 loading using assimp is quite old and non compliant with the specification
-
What is the new behavior (if this is a feature change)? loading and rendering of gltf asset is compliant with the specification
-
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?) No
-
Other information: This PR includes a writer in gltf format, in the IO library. This writer is enabled by default and add dependency of IO library on Engine library. writing gltf files could be disabled (-DRADIUM_IO_GLTF_WRITER=OFF) at configure time. The IO lib compiled after that will not depend on engine.
Codecov Report
Merging #1061 (d5fbcca) into release-candidate (a349c0c) will decrease coverage by
7.13%. Report is 1 commits behind head on release-candidate. The diff coverage is1.64%.
:exclamation: Current head d5fbcca differs from pull request most recent head 0d5abb8. Consider uploading reports for the commit 0d5abb8 to get more accurate results
@@ Coverage Diff @@
## release-candidate #1061 +/- ##
=====================================================
- Coverage 45.65% 38.53% -7.13%
=====================================================
Files 312 346 +34
Lines 23063 27588 +4525
=====================================================
+ Hits 10530 10630 +100
- Misses 12533 16958 +4425
| Files Changed | Coverage Δ | |
|---|---|---|
| src/Core/Material/BaseGLTFMaterial.cpp | 0.00% <0.00%> (ø) |
|
| src/Core/Material/BaseGLTFMaterial.hpp | 0.00% <0.00%> (ø) |
|
| src/Core/Material/GLTFTextureParameters.hpp | 0.00% <0.00%> (ø) |
|
| ...rc/Core/Material/MetallicRoughnessMaterialData.cpp | 0.00% <0.00%> (ø) |
|
| ...rc/Core/Material/MetallicRoughnessMaterialData.hpp | 0.00% <0.00%> (ø) |
|
| ...c/Core/Material/SpecularGlossinessMaterialData.cpp | 0.00% <0.00%> (ø) |
|
| ...c/Core/Material/SpecularGlossinessMaterialData.hpp | 0.00% <0.00%> (ø) |
|
| src/Engine/Data/GLTFMaterial.hpp | 0.00% <0.00%> (ø) |
|
| src/Engine/Data/MetallicRoughnessMaterial.hpp | 0.00% <0.00%> (ø) |
|
| src/Engine/Data/SpecularGlossinessMaterial.hpp | 0.00% <0.00%> (ø) |
|
| ... and 29 more |