Occlusion not working properly

Description of the issue:
While creating the object placement project(by following Tutorial: Basic Placement — Niantic Lightship Augmented Reality Developer Kit release-2.0 documentation), I encountered a problem with the occlusion not working properly.

Hi Naveen,

Could you please give me some more details about the problem you are experiencing? What about the occlusion is not working properly? Also any I see a bunch of the ARDK managers in your scene, is there a specific error you are seeing? Please give us as much information as you can.


Hi @Jason_Rose1 as you can see from the screenshot, when you move your hands, the object placed on the plane is displayed above your hands.

Hi Naveen.
Since you have ARDepthManager enabled and OcclusionMode set to ScreenSpaceMesh, you should be able to place your hand above the virtual object, as this is a dynamic occlusion. However, if you use both static and dynamic occlusions you may get undesired results.

Try to disable static Meshing occlusions by disabling Dynamic Occlusion in the Unity Mesh Renderer for the mesh prefab your ARMeshManager is using.

Hi @Manos_Tsotros thanks for your replay , but I still facing that issue

Then it could be that you have misplaced your managers in the Hierarchy.

Can you just load the Contextual Awareness - Mesh Occlusion template on an empty scene and then just add the ARDepthManager onto the ARSceneCamera GameObject (just under ARRenderingManager) and set its OcclusionMode to ScreenSpaceMesh?

Try it. It should work and you can use this setup for your next steps.

Hey @Naveen ,
So if your goal is simply to get the tutorial functioning the proper way, here are a few things you can do to improve the performance:

  • Lower the Key Frame Frequency to 20.
  • Wait until the Plane has been detected by the AR Plane Manager before placing the object or trying the occlusion: I’d suggest adding the PlanePrefab so that it is visible.
  • Unless you have a specific reason for using the Screen Space Mesh as the occlusion mode, I’d suggest just using the Depth Buffer or Auto mode.
    @Manos_Tsotros suggestion is also a good one, might be a good idea to try with a “clean” project.

Hi @Gilberto thanks for your reply, but your solution is not working, I still facing the issue

Hi @Manos_Tsotros thanks for your solution , but the result is a crash when that scene runs.

I am still facing this problem in android, can anyone help me?, I tried out different ways, rearranged the managers, started as a fresh project, followed the Tutorial: Basic Occlusions — Niantic Lightship Augmented Reality Developer Kit release-2.1 documentation tutorial, but none of them worked for android.

@Naveen ,
So I want to make sure there isn’t any exterior reasons to why this isn’t working for you.
Can you try downloading the lightship templates and trying out the occlusion template ?
If the behavior persists I am afraid it may just be outside of our ability to help you, it could be things like bad lightning, closeness to the camera, quick movements, your device is experiencing performance issues…