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

Support loading glb with compressed jpeg textures #545

Merged
merged 3 commits into from
Oct 25, 2023
Merged

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Oct 18, 2023

🎉 New feature

Summary

Extended the AssimpLoader to support loading glb files with embedded compressed jpeg textures.

Previously if you tried to load one with jpeg texture, you would get a confusing error message about invalid texture settings but no meshes would be loaded.

To Test

Added a test to AssimpLoader_TEST that verifies a simple box glb mesh with jpeg can be loaded.

Tested with this DamagedHelmet glb mesh:

damagedHelment

Note: there are some discrepancies between the rendering in gz and the provided screenshot - that needs to be investigated later.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@iche033 iche033 requested a review from marcoag as a code owner October 18, 2023 01:58
@github-actions github-actions bot added 🌱 garden Ignition Garden 🎵 harmonic Gazebo Harmonic labels Oct 18, 2023
@codecov
Copy link

codecov bot commented Oct 18, 2023

Codecov Report

Merging #545 (86e99f3) into gz-common5 (60b1fdd) will increase coverage by 0.79%.
Report is 169 commits behind head on gz-common5.
The diff coverage is 78.24%.

❗ Current head 86e99f3 differs from pull request most recent head 2e91b02. Consider uploading reports for the commit 2e91b02 to get more accurate results

@@              Coverage Diff               @@
##           gz-common5     #545      +/-   ##
==============================================
+ Coverage       82.86%   83.65%   +0.79%     
==============================================
  Files              75       90      +15     
  Lines            9558    10272     +714     
==============================================
+ Hits             7920     8593     +673     
- Misses           1638     1679      +41     
Files Coverage Δ
av/include/gz/common/ffmpeg_inc.hh 0.00% <ø> (ø)
av/src/ffmpeg_inc.cc 0.00% <ø> (-65.00%) ⬇️
events/include/gz/common/Event.hh 100.00% <100.00%> (ø)
events/src/Event.cc 92.59% <100.00%> (ø)
events/src/KeyEvent.cc 98.11% <100.00%> (ø)
events/src/MouseEvent.cc 98.88% <100.00%> (ø)
...ial/include/gz/common/geospatial/ImageHeightmap.hh 88.88% <ø> (ø)
graphics/include/gz/common/Image.hh 97.05% <100.00%> (ø)
graphics/include/gz/common/Material.hh 0.00% <ø> (ø)
graphics/include/gz/common/MeshLoader.hh 100.00% <ø> (ø)
... and 70 more

... and 10 files with indirect coverage changes

EXPECT_EQ(math::Color(0.4f, 0.4f, 0.4f, 1.0f), mat->Ambient());
EXPECT_EQ(math::Color(1.0f, 1.0f, 1.0f, 1.0f), mat->Diffuse());
EXPECT_EQ(math::Color(0.0f, 0.0f, 0.0f, 1.0f), mat->Specular());
EXPECT_EQ(math::Color(0.0f, 0.0f, 0.0f, 1.0f), mat->Specular());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a duplicate call.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed duplicate call, 76be6e6

@mjcarroll mjcarroll merged commit 3742a5a into gz-common5 Oct 25, 2023
16 of 17 checks passed
@mjcarroll mjcarroll deleted the glb_jpeg branch October 25, 2023 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌱 garden Ignition Garden 🎵 harmonic Gazebo Harmonic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants