Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Bug Occluted objects are rendered as black arifact on Android devices.

Discussion in 'Android' started by ARTS_Premium, Jul 20, 2020.

  1. ARTS_Premium


    Jul 14, 2015
    We are making an AR app with Unity 2019.3.3f1 and Vuforia Engine 9.2.8 and there is a problem that occluded object are rendered as black artifacts on Android devices, such as Samsung Galaxy S8 and Google Pixle 4.

    After searching similar problems and we have tried couple solution that reported could solve the problem, like switching the Graphics API to GLES2 or Vulkan, this doesn't work for our project. Only setting the occluded object's material to transparent works but it change the appearance too much that we cannot apple it to all objects.

    Here is the similar issue reported that we have found.

    In Vuforia's release note they said that
    "On some Android devices (e.g. PixelXL), objects occluded by Vuforia Engine's "Custom/DepthMask" shader (used e.g. for Area Target occlusion) are rendered black. To work around this issue, set the occluded objects' materials to Rendering Mode -> Transparent."

    After we communicate with Vuforia Support, they said that this problem is related to Unity but we found that the DepthMask shader works fine without Vuforia Engine AR set up. So we decided to send them the test project to ask if they have any solution.

    Here is the test project we are using and there are 2 scenes inside.

    The first scene “SampleScene” is set up with Vuforia, there are 2 cubes set with transparent and regular unlight material under a plance set with DepthMask material.

    ARCamera and Image Target are set up with default setting with Vuforia's default assets.
    This scene reproduce the problem.

    The second scene “SampleScene_Usual Camera” is set up with default camera and the reset are the same.
    This scene doesn’t reproduce the problem

    Hope someone can give us some advice about this problem other then set the material to transparent.
    Thank you.

    Attached Files:

    Last edited: Jul 20, 2020