ROS indigo rviz OGRE mesh wrong lighting
Hi All,
i got another issue with the ROS rviz plugin while moving from hydro to indigo version. I wrote a rviz-plugin which loads and display a ogre mesh (a vehicle to be more exact). In ROS hydro everything is the more or the less fine, the mesh is drawn as it should and also the lighting is correct.
If i change nothing in the plugin and only change the ROS version to indigo, some really strange things happen:
- The lighting of the mesh seams to be broken, nearly all surfaces are drawn black.
- The mesh seams to be drawn twice. I tried to add a GLSL shader program which adds a simple phong-shading to some surfaces / materials. Despite of that the model and view matrix will not get passed correctly to the shader (i used the auto params) i got some heavy z-fighting on surfaces which definitely are not modeled double sided.
What i already tried / did:
- Double checked normals, they are ok.
- Viewed the model with the Ogre Max Viewer, which also uses OGRE Version 1.8.1 (same as the ROS indigo) - Lighting is correct!
- Wrote a simple test program which not uses ROS. - Lighting is correct!
- Updated mesh with the Update Utility of OGRE.
- Tested another mesh - Same issue!
- Programmatically changed Face Culling, Light, various material values of the mesh, use own GLSL shader (see above) Nothing changed. ( Set ambient light in scene-manager, add additional light to scene ... )
- Exported a simple cube from Blender (start scene cube) 2.69.0 with blender2ogre-0.6.0 and tested this mesh in both ROS versions. Same here, Cube is black in ROS indigo and white (correct lighting) in ROS hydro. Both with identical rviz plugin.
- Cloned newest rviz version (indigo-devel-branch) to ROS-hydro version so rviz 1.11.3 will run under ROS-hydro, everything works well! I also tested the old rviz version 1.10.18 (hydro-devel-branch) under ROS-indigo, lighting still broken. So it seems that the new Ogre-Version 1.8.1 is the cause of this problem, or maybe a not correctly adapted rviz.
What seems to work:
- Emissive materials seems to work in ROS indigo. The cube will be red if emissive set to 1 0 0 1 in ogre-material file.
Did someone of you encounter the same problems drawing OGRE Meshes in ROS-indigo-rviz?
Mesh in ROS Hydro:
Mesh in ROS Indigo:
Asked by Torsten on 2014-11-20 02:51:18 UTC
Comments
Fixed your image links: links to html pages won't work.
Asked by gvdhoorn on 2014-11-20 04:12:32 UTC
Thank you for fixing my post again!
Asked by Torsten on 2014-11-20 04:17:38 UTC
@Torsten: have you considered reporting this to the RViz bugtracker? It seems like you have already narrowed things down pretty well.
Asked by gvdhoorn on 2014-11-20 10:01:41 UTC
@gvdhoorn: i added a new issue to the RViz bugtracker and added a link to this post, hopefully this ok!
https://github.com/ros-visualization/rviz/issues/830
Asked by Torsten on 2014-11-21 02:03:36 UTC
Yes, that is ok. You could perhaps summarise the contents of your question here in the issue on github, so the issue stands on its own.
Asked by gvdhoorn on 2014-11-21 06:00:54 UTC
Done. Don't take me wrong but this process seams to be very time consuming. Thank you for your help.
Asked by Torsten on 2014-11-21 07:01:03 UTC
Which process? The ROS Answers forum is moderated and frequented by volunteers (in addition to OSRF employees), it is not a dedicated support forum :).
And for reporting bugs -- as you essentially did -- it is always a good idea to directly go to the github repository of the relevant package.
Asked by gvdhoorn on 2014-11-21 10:00:24 UTC