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

Add custom support for gltf2.0 file format #1061

Open
wants to merge 27 commits into
base: release-candidate
Choose a base branch
from

Conversation

MathiasPaulin
Copy link
Contributor

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

  • 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
    • 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.

@MathiasPaulin MathiasPaulin added Core Related to Ra::Core Engine Related to Ra::Engine IO Related to Ra::IO GUI Related to Ra::Gui Scripts examples labels Jul 19, 2023
@codecov
Copy link

codecov bot commented Jul 19, 2023

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 is 1.64%.

❗ 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

... and 6 files with indirect coverage changes

@MathiasPaulin MathiasPaulin added the WIP Work in Progress label Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Related to Ra::Core Engine Related to Ra::Engine examples GUI Related to Ra::Gui IO Related to Ra::IO Scripts WIP Work in Progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant