-
-
Notifications
You must be signed in to change notification settings - Fork 467
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
Maintain original mesh materials for RobotLinks #1704
Maintain original mesh materials for RobotLinks #1704
Conversation
Previously all materials are set opaque when alpha option is set to 1. With this commit the materials are set to their original state when alpha is set to 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The resulting screenshots are convincing. But I don't yet understand what's happening.
Also, I noticed that the car is partially translucent, uncovering the underlying grid...
I do not understand what you mean here. Maybe it is a bit confusing that the wheels of the car are below zero level, while the vertices of the roof have a positive z value. So the grid cuts the car into two halves. |
Ah. That explains it. Thanks. |
Could you send me a simple urdf example illustrating the problem? Thanks. |
Here you go. Please don't forget to source package. Otherwise Rviz/Ogre won't find included materials. Execute *.launch file: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good in general. Thanks for the contribution.
I have added a few performance improvements, committed as a PR to your fork: UniBwTAS#2
Please test it on your side and merge the PR here.
…1704) rviz modifies a custom material (loaded together with a mesh model) within several functions, e.g. updateAlpha(). This destroys the original properties of this material, e.g. transparency. To be able to restore the original material, we store it additionally to the active one.
Currently, rviz modifies a custom material setting loaded together with a mesh model, e.g. within
updateAlpha()
.This destroys, for example, transparency within those original materials.
With this pull request, the original material is stored additionally to the active one, such that the original one can be restored if needed. This allows to correctly render e.g. glass: