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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix loading grayscale albedo map #466

Merged
merged 2 commits into from
Oct 13, 2021
Merged

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Oct 11, 2021

馃 Bug fix

Fixes #464

Summary

The Urban Station model appears red when loaded in ign-gazebo. This was due to using a grayscale texture map. The single channel texture is loaded into the red component of the diffuse texture. A check for grayscale textures was added to fix this issue before but it was added inside another check that never gets reached if the material is set through the dae file (and not set through the SDF element).

This PR makes minor tweak so that all textures set to the mesh are checked to see if it's grayscale.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • 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

Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@osrf-triage osrf-triage added this to Inbox in Core development Oct 11, 2021
@github-actions github-actions bot added 馃尡 garden Ignition Garden 馃彲 fortress Ignition Fortress labels Oct 11, 2021
@codecov
Copy link

codecov bot commented Oct 11, 2021

Codecov Report

Merging #466 (6fffe05) into ign-rendering6 (cde3e08) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           ign-rendering6     #466   +/-   ##
===============================================
  Coverage           53.49%   53.50%           
===============================================
  Files                 192      192           
  Lines               19560    19562    +2     
===============================================
+ Hits                10464    10467    +3     
+ Misses               9096     9095    -1     
Impacted Files Coverage 螖
ogre2/src/Ogre2Material.cc 92.13% <100.00%> (+0.32%) 猬嗭笍

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update cde3e08...6fffe05. Read the comment docs.

Core development automation moved this from Inbox to In review Oct 12, 2021
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

Thanks!

@chapulina chapulina enabled auto-merge (squash) October 13, 2021 00:37
@iche033 iche033 disabled auto-merge October 13, 2021 05:02
@iche033 iche033 merged commit 1c77a8a into ign-rendering6 Oct 13, 2021
Core development automation moved this from In review to Done Oct 13, 2021
@iche033 iche033 deleted the fix_grayscale_diffuse branch October 13, 2021 05:02
srmainwaring pushed a commit to srmainwaring/gz-rendering that referenced this pull request Oct 21, 2021
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@iche033 iche033 mentioned this pull request Dec 6, 2021
19 tasks
@j-rivero j-rivero removed this from Done in Core development May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃彲 fortress Ignition Fortress 馃尡 garden Ignition Garden
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants