com.unity.perception icon indicating copy to clipboard operation
com.unity.perception copied to clipboard

Issue with Transparent Shader Blocking Annotations in Perception Package

Open asadhazenai opened this issue 1 year ago • 1 comments

Hello,

I am encountering an issue with the transparent shader used in distractors. While the object is visible to the human eye, it does not appear in the annotations. When I disable the transparency, I notice that some polygons are obstructing the object behind it.

I have attached two screenshots for your reference.

Could you please advise if there is a solution to this? Additionally, I would like to understand how the perception package generates annotation boxes. Does it utilize raycasting for this process? I’ve set the object layer to ignore raycasting, but the transparent parts of the distractor still seem to block the object.

I appreciate your assistance. Rendering_01 Rendering_02

asadhazenai avatar Sep 03 '24 14:09 asadhazenai

I haven't used perception package for quite some time but if I recall correctly it used a custom pass to create a mask (like segmentation) and convert it to bounding boxes. That's why leaves, which are basically planes with an alpha threshold applied, obstructs the car and creates a smaller bounding box. According to the documentation there's an "Alpha Threshold" setting under the "Perception Camera Component", playing with it could solve your problem. Have you tried creating segmentation masks of the scene, do they have the same problem?

esgnn avatar Sep 04 '24 08:09 esgnn