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.
ARDK version :1.3.1
Unity version :2021.3.2
Device type & OS version : pixel 2 XL /android
Host machine & OS version : Windows
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.
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.