-
Notifications
You must be signed in to change notification settings - Fork 203
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
make box-mode point cloud voxels render lighter on top than bottom #1058
make box-mode point cloud voxels render lighter on top than bottom #1058
Conversation
can you share a gif ? I tried with my discrete GPU, but I can't see any difference |
That's interesting! I guess the discrete GPU is doing the "real" lighting calculation, rather than the "fake-lighting" shading used in I attached two GIFs of a stereo camera looking at a tabletop, reduced using the PCL voxel_grid filter and rendered in Boxes mode in rviz. The first GIF shows the current behavior on "integrated GPU" machines, where the top of the voxels is darker than the bottom. This works fine, but just looks kind of weird because most scenes in the real world are lit from above. The second GIF shows what it looks like using this PR, with the top-side brighter in the fake-lighting shader. (Please ignore the dithering artifacts due to heavy compression in the GIFs, but at least they show the relative brightness) |
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.
Not sure what happened with those CI jobs. I don't think those failures were related to this tiny change (?) |
No, all of CI is having problems at the moment. We have a solution, just need for CI to come back so we can merge. |
So CI is still failing here because the repos file used needs to be updated to use the branches as specified in ros2/ros2#1479 . |
Thank you @clalancette Let's try again |
Previously, the GLSL 1.2 shader for box-mode rendering of point clouds resulted in the top of the voxels rendering darker than the bottoms of the voxels. I think it looks nicer the other way around (top lighter than bottom), since most scenes are lit from the top.
(The GLSL 1.2 program is being used because of #851 ; the GLSL 1.5 shaders calculate lightness differently.)
Strangely, this GLSL 1.2 shader program structure has been in rviz for at least 11 years (according to git-blame). Am I just using it incorrectly, or have the tops of voxels always been darker than the bottoms of voxels, when rendering point clouds as boxes?
It may be important to note that I'm using a machine with an integrated (Intel) GPU. I don't have access to a machine with a discrete GPU to test the behavior in that case, since I assume a different shader program is selected when a GPU is present. It would be interesting to know if the same behavior happens with a GPU.
To see the effect: