ros-visualization/rviz

Mesh with normal have no light in latest release 1.14.13 (regression since 1.14.11)

Closed this issue · 12 comments

Hello @rhaschke ,

Affect version : ROS Noetic , ubuntu 20.04
RViz 1.14.13 installed using ubuntu apt upgrade on Jan 27th 2022

In my ROS setup I display some meshes generated using blender. After rviz upgrade the RVIZ 3D scene seems to have no light.

I cloned rviz in my catkin workspace and checked out tag 1.14.11: no issue

I compared the changes between 1.14.11 and HEAD of noetic-devel, I found some changes in mesh_loader.
After investigation I found that you removed the transformation of normals.

By re-applying the transformation on normals , the mesh is well rendered.

My local revert:
2022-01-27_21h22_27

with lastest release:

2022-01-27_21h36_05

With the patch:

2022-01-27_21h35_04

Here a mesh:
truck.zip

Could you please provide an example mesh file exhibiting this behavior?

I believe that the complicated transform is not needed, because it just rescales the normals, which is subsequently undone by normalizing the vectors. However, it looks like I removed the transform completely. I think #1703 should already solve the issue. Could you please verify? Please, provide an example mesh in any case. Thanks.

Thanks for your quick reply, I am not allowed to attach the small car, but I attached a truck, I am testing #1703 and come back to you asap

Note that in my case, the truck is loaded like a robot using an urdf

I cherry picked #1703 on top of noetic-devel:

2022-01-28_10h45_51

2022-01-28_10h37_17

I couldn't find the truck mesh file - there was no attachment. But from your pictures, I conclude that my simpler fix resolves the issue for you?

no, in my previous comment , the first screenshot is with the "simple" fix.
I will add the mesh in my https://github.com/xbroquer/rviz_collada_marker this afternoon along with launch + rviz conf file

I will reply here when this will be available...

Can you please try: roslaunch rviz_collada_marker test_truck.launch from https://github.com/xbroquer/rviz_collada_marker

Using #1703:
2022-01-28_13h42_14
It's not completely dark when moving the rviz camera:
2022-01-28_13h42_33

Here using xbroquer@3ac6cf4
2022-01-28_13h44_21
2022-01-28_13h44_35

I fixed the issue in #1703. Thanks for providing the mesh file. This helped to debug this issue.

Thanks! Do you know when I should expect this fix released and available on deb repo for Noetic ?

I will prepare a release within next week latest.
However, both Melodic and Noetic just recently had a sync: https://discourse.ros.org/c/release/16. Thus, it will take a month or so until the next release will be available. Consider using the debian packages from the ROS testing repo meanwhile.

Fixed via #1703