Issues with screen space mesh occlusion

Include the following details (edit as applicable):

  • Issue category: Real-time Mapping-Depth
  • Host machine & OS version: Mac
  • Issue Environment : On Device / Editor
  • ARDK version: 2.3.0
  • Unity version: 2021.3.11

Description of the issue:
Hey all, so i’ve been having some weird issues with ar depth manager occlusion.
Whenever i test with a mock scene or on device i get inconsistent results with depth estimation where half of an object gets occluded while it should be completely visible or obscured. I’ve messed around with the ARDK scripts to fix this but have yet to find a solution.

Here is some footage:

Some info about the setup in editor:

I’m using URP and to get everything displayed on 2 screens i’m rendering the camera footage to a render texture and the AR footage to a separate render texture to overlay them both on a canvas. This is the reason i can’t use the depth texture since that doesn’t render to a texture at all in my tests.

I know this is very specific, not expecting a fully ready solution but just hoping for a few pointers or tips :slight_smile:

Turn mock location off

Thanks for responding but that wouldn’t really resolve anything since it simulates the depth occlusion on device, which looks just as bad as it does with mock environment enabled in editor.

Hi Merijn, sorry to see the mock location tip didn’t work. I’m in touch with our engineers to see if there are any other tweaks that might be helpful

1 Like

Hi Bill,

Happy to say i managed to fix this issue by using a custom blit renderfeature to copy the camera view to a rendertexture without having to set this in camera component output texture. This way we don’t have to use screen mesh occlusion and can use the depth buffer instead, the depth buffer works as expected.

Still the question remains as to why the depth buffer occlusions didn’t render to a rendertexture as i expected. I’d like to add that this is a very specific use-case that i don’t think lot’s of developers are troubled by. (displaying the AR scene to 2 screens i mean)

Great news Merijn! I’d love to keep this thread open for a few more days to make sure others can see this fix if it’s ok with you