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

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:

ArgumentException: Failed SupportsTextureFormat; format is not a valid TextureFormat
  at UnityEngine.SystemInfo.SupportsTextureFormat (UnityEngine.TextureFormat format) [0x00000] in <00000000000000000000000000000000>:0
  at UnityEngine.Texture.ValidateFormat (UnityEngine.TextureFormat format) [0x00000] in <00000000000000000000000000000000>:0
  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
  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
  at UnityEngine.XR.ARFoundation.ARTextureInfo.CreateTexture (UnityEngine.XR.ARSubsystems.XRTextureDescriptor descriptor) [0x00000] in <00000000000000000000000000000000>:0
  at UnityEngine.XR.ARFoundation.ARTextureInfo.GetUpdatedTextureInfo (UnityEngine.XR.ARFoundation.ARTextureInfo textureInfo, UnityEngine.XR.ARSubsystems.XRTextureDescriptor descriptor) [0x00000] in <00000000000000000000000000000000>:0
  at UnityEngine.XR.ARFoundation.ARHumanBodyManager.UpdateTexturesInfos () [0x00000] in <00000000000000000000000000000000>:0

Known bug?

1 Like

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.

1 Like

ditto

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

17A5508m

17A5492t

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

17A5508m

Based on Apple’s talk on WWDC 2019: Bringing People into AR - WWDC19 - Videos - Apple Developer, 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?

2 Likes