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

Fix transparency over heightmap #811

Merged
merged 5 commits into from
Jan 27, 2023
Merged

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Jan 26, 2023

🦟 Bug fix

Fixes #789

Summary

Semi-transparent objects were always rendered behind the heightmap as seen in #789. This PR fixes the issue by setting a new render queue for objects with transparency as recommended in https://forums.ogre3d.org/viewtopic.php?t=96950

To test with gazebo:

  1. launch gazebo (fortress) with the heightmap world:
ign gazebo -v 4 heightmap.sdf
  1. Select Translate tool and click on any of the models. You should see the RGB axes rendered properly over the heightmap.

  2. Right click on the model -> View > Transparent. The model should also be rendered properly over heightmap

transparency_over_heightmap

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.

…or transparnecy objects

Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@osrf-triage osrf-triage added this to Inbox in Core development Jan 26, 2023
@github-actions github-actions bot added the 🏯 fortress Ignition Fortress label Jan 26, 2023
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@codecov
Copy link

codecov bot commented Jan 26, 2023

Codecov Report

Merging #811 (3312c33) into ign-rendering6 (d8df46a) will decrease coverage by 0.02%.
The diff coverage is 57.14%.

@@                Coverage Diff                 @@
##           ign-rendering6     #811      +/-   ##
==================================================
- Coverage           77.76%   77.75%   -0.02%     
==================================================
  Files                 146      146              
  Lines               13418    13429      +11     
==================================================
+ Hits                10435    10442       +7     
- Misses               2983     2987       +4     
Impacted Files Coverage Δ
ogre2/src/Ogre2Material.cc 64.42% <25.00%> (-0.47%) ⬇️
ogre2/src/Ogre2Mesh.cc 89.79% <100.00%> (+0.28%) ⬆️
...e/ignition/rendering/base/BaseGaussianNoisePass.hh 100.00% <0.00%> (+3.33%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

ogre2/src/Ogre2Mesh.cc Show resolved Hide resolved
test/integration/heightmap.cc Outdated Show resolved Hide resolved
test/integration/heightmap.cc Outdated Show resolved Hide resolved
test/integration/heightmap.cc Outdated Show resolved Hide resolved
Core development automation moved this from Inbox to In review Jan 26, 2023
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@iche033 iche033 requested a review from ahcorde January 26, 2023 23:31
static_cast<Ogre::HlmsPbsDatablock *>(derived->Datablock()));
auto datablock =
static_cast<Ogre::HlmsPbsDatablock *>(derived->Datablock());
if (databock)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (databock)
if (datablock)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops fixed. 3312c33

Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@iche033 iche033 merged commit af050dc into ign-rendering6 Jan 27, 2023
Core development automation moved this from In review to Done Jan 27, 2023
@iche033 iche033 deleted the transparency_over_heightmap branch January 27, 2023 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏯 fortress Ignition Fortress
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants