webots icon indicating copy to clipboard operation
webots copied to clipboard

RangeFinder does see fully transparent texture

Open Thomas-Feldmeier opened this issue 4 years ago • 1 comments
trafficstars

Sample world "range_finder". change DEF GREEN_BOX solid > shape > appearance PBRAppearance > baseColorMap ImageTexture > url > https://raw.githubusercontent.com/cyberbotics/webots/R2021b/projects/default/worlds/textures/ladybug.png

now some regions of the texture have alpha channel 0 (fully transparent), but still visible by RangeFinder.

see similar issue #3405. Pull request #3436 code seems to fix only transparency=1 in material, but not alpha channel in textures.

Thomas-Feldmeier avatar Jul 15 '21 12:07 Thomas-Feldmeier

You're right, ideally it should take into consideration the alpha level of each individual pixel but that might not be nearly as easy to fix (or at least, to do so in a computationally efficient way). Whatever the case, it still makes sense to make fully transparent objects invisible to the camera so the existing PR makes sense in of itself, but as you mentioned it only addresses part of the issue.

If you're willing to tackle the larger issue, feel free to open a PR about it.

ad-daniel avatar Jul 19 '21 09:07 ad-daniel