Search Unity

[ARKit 3 Human Segmentation] Depth Mode Full Screen Resolution throws exception

Discussion in 'AR' started by Aaron-Meyers, Jun 20, 2019.

  1. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    305
    I'm working on getting human segmentation working and I found the Standard Resolution option on the Depth texture to be quite chunky so I tried turning it up to "Full Screen Resolution" on the ARHumanBodyManager component. When I build it to a 12.9" iPad Pro, the XCode console gets flooded with the following exception:

    Code (CSharp):
    1. ArgumentException: Failed SupportsTextureFormat; format is not a valid TextureFormat
    2.   at UnityEngine.SystemInfo.SupportsTextureFormat (UnityEngine.TextureFormat format) [0x00000] in <00000000000000000000000000000000>:0
    3.   at UnityEngine.Texture.ValidateFormat (UnityEngine.TextureFormat format) [0x00000] in <00000000000000000000000000000000>:0
    4.   at UnityEngine.Texture2D..ctor (System.Int32 width, System.Int32 height, UnityEngine.TextureFormat textureFormat, System.Boolean mipChain, System.Boolean linear, System.IntPtr nativeTex) [0x00000] in <00000000000000000000000000000000>:0
    5.   at UnityEngine.Texture2D.CreateExternalTexture (System.Int32 width, System.Int32 height, UnityEngine.TextureFormat format, System.Boolean mipChain, System.Boolean linear, System.IntPtr nativeTex) [0x00000] in <00000000000000000000000000000000>:0
    6.   at UnityEngine.XR.ARFoundation.ARTextureInfo.CreateTexture (UnityEngine.XR.ARSubsystems.XRTextureDescriptor descriptor) [0x00000] in <00000000000000000000000000000000>:0
    7.   at UnityEngine.XR.ARFoundation.ARTextureInfo.GetUpdatedTextureInfo (UnityEngine.XR.ARFoundation.ARTextureInfo textureInfo, UnityEngine.XR.ARSubsystems.XRTextureDescriptor descriptor) [0x00000] in <00000000000000000000000000000000>:0
    8.   at UnityEngine.XR.ARFoundation.ARHumanBodyManager.UpdateTexturesInfos () [0x00000] in <00000000000000000000000000000000>:0
    Known bug?
     
    ina likes this.
  2. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    305
    Same thing happens when I choose "Half Screen Resolution" for the depth mode. All three options appear to work fine for the stencil mode. Only Standard Resolution works for depth mode.
     
    ina likes this.
  3. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
  4. todds_unity

    todds_unity

    Joined:
    Aug 1, 2018
    Posts:
    324
    We will look into the issue.

    What is the full iOS version of your device?
    General -> About -> SoftwareVersion. Tap on the '13.0' value, and it will expand with additional values that look like "13.0 (17A5508m)".

    Todd
     
  5. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    305
    17A5508m
     
  6. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    17A5492t
     
  7. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,084
    17A5508m on latest iPad Pro 12.8" - same texture issues

    A
    rgumentException: Failed SupportsTextureFormat; format is not a valid TextureFormat

    at UnityEngine.SystemInfo.SupportsTextureFormat (UnityEngine.TextureFormat format) [0x00000] in <00000000000000000000000000000000>:0



    etc
     
  8. HypeVR

    HypeVR

    Joined:
    Aug 28, 2018
    Posts:
    11
    17A5508m

    Based on Apple's talk on WWDC 2019: https://developer.apple.com/videos/play/wwdc2019/607, they apply matting on stencil buffer and dilating on depth buffer to make them have the same resolution as the camera image. Right now in Unity only Standard Resolution works for depth (either half or full on depth will crash in XCode), is that because dilating is something not in the Unity ARKit 3 package yet?
     
    JonBFS and ina like this.