Search Unity

Resolved Arcore depth texture issue.

Discussion in 'AR' started by tomekkie2, Oct 22, 2020.

  1. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    973
    Why my depth texture looks like that? (Hello AR scene - ARCore Unity SDK v1.20.0):
    Screenshot_20201022-162325_ArcoreTest.jpg

    while it should look like this (Arcore depth lab):


    Screenshot_20201022-162224_Depth Lab.jpg
     
  2. mdurand

    mdurand

    Joined:
    Aug 1, 2016
    Posts:
    45
    Because our sample has a different approach to visualizing the depth. The depth per pixel will be the same - all that is different is how we map those values to colors.
     
    tomekkie2 likes this.
  3. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    973
    But my problem is not the visualisation only, looks like it is also a depth reading problem.
    The red areas hide my AR object the same way on both of these images.
    Means the AR object in the top image doesn't get hidden properly.
    Is there a way to fix this?
     
  4. KnewK

    KnewK

    Joined:
    Sep 2, 2012
    Posts:
    19
    I am trying to convert Unity AR Core Depth Lab samples (collider scene) to AR Foundation to generate the depth mesh. I have found that there are challenges concerning the underlying depth map. They appear to be fundamentally different in the pixel data format that represent depth.
    Left is the raw depth texture from Unity AR Core Depth Lab SDK.
    Right is the raw depth texture from AR Foundation.

    Screenshot_20210120-111803 small.png Screenshot_20210120-112241 small.png

    I am trying to get the depth textures consistent so I can get the AR Core Depth Lab compute shader to run under AR Foundation and generate the surface mesh. All suggestions are greatly appreciated. Been banging my head against this for weeks now.
     
  5. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,820
    The depth texture is the same. The difference between the two images is that a different shader is applied.
     
    tomekkie2 likes this.