mogumbo / rviz_lighting

RViz plugin that provides ambient, directional, point, and spot lights.
24 stars 17 forks source link

rviz Markers aren't lit by rviz_lighting lights #2

Open lucasw opened 7 years ago

lucasw commented 7 years ago

This is probably more an issue for rviz, the solution could go into a follow up to your https://github.com/ros-visualization/rviz/pull/1146

I've tried CUBE_LIST and SPHERE_LIST and it looks like they use a different hard-coded light rather than the head light, it would be nice to be able to light them like any other geometry. Haven't tried other marker types yet but I will follow up.

mogumbo commented 7 years ago

In a sane world, this should be as easy as enabling GL_LIGHTING when the markers are drawn.

It would be nice if Markers had a "receive light" flag because I sort of like giving them the glowy look (brightly colored and partly transparent without any lighting).

lucasw commented 7 years ago

It looks like the Marker spheres (and cubes, cones, and cylinders) are binary Ogre .mesh objects in the /rviz/ogre_media/models folder- they mostly aren't readable the first two lines are:

^@^P[MeshSerializer_v1.8]
^@0Ï^V^@^@^@^@@<8c>^L^@^@BaseWhiteNoLighting

I wonder if they have lighting baked in, and nothing in the rviz code is going to change they way they look (except color still works). I haven't looked too far but there weren't any setLightingEnabled calls in the marker code.