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

Emissive map no longer works in ign-rendering6 (ogre2) #499

Closed
iche033 opened this issue Dec 3, 2021 · 2 comments · Fixed by #503
Closed

Emissive map no longer works in ign-rendering6 (ogre2) #499

iche033 opened this issue Dec 3, 2021 · 2 comments · Fixed by #503
Labels
bug Something isn't working

Comments

@iche033
Copy link
Contributor

iche033 commented Dec 3, 2021

Environment

  • OS Version: Ubuntu 18.04
  • Source or binary build?
    source build: ign-rendering6 branch

Description

  • Expected behavior: objects are rendered with emissive map
  • Actual behavior: emissive map has no effect

I think the feature is broken when we ported from ogre 2.1 to 2.2.

Steps to reproduce

  1. Test with ignition gazebo's fuel_textured_mesh.sdf world
ign gazebo -v 4 fuel_textured_mesh.sdf
  1. The tubes in the Tube Light model do not appear to be lit when emissive map is used.

Here is a comparison of the Tube Light model in Ignition Fortress (top) and Dome (bottom)

emissive_map_fortress_vs_dome

Things I've tried

The call to set ogre2 emissive map is done here:
https://github.com/ignitionrobotics/ign-rendering/blob/ign-rendering6/ogre2/src/Ogre2Material.cc#L473

  • I verified that this->ogreDatablock->getUseEmissiveAsLightmap() returns false and this->ogreDatablock->_hasEmissive() returns true
  • setting emissive values (this->ogreDatablock->setEmissive) works
  • I tried debugging the code in 800.PixelShader_piece_ps.any for applying emissive map and it looks like the emissive_map property is not set hence it does not affect the final color.
@iche033 iche033 added the bug Something isn't working label Dec 3, 2021
@iche033
Copy link
Contributor Author

iche033 commented Dec 3, 2021

partial fix in #501. It's now rendering red color for grayscale emissive maps. We may need to look for a way to tell ogre that the emissive map is grayscale or convert the grayscale emissive texture to RGB.

@iche033
Copy link
Contributor Author

iche033 commented Dec 4, 2021

fix for loading grayscale emissive map in #503

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant