4 Replies
      Latest reply on Nov 8, 2017 9:12 PM by FDurocher
      thomas.pintaric Level 2 Level 2 (55 points)

        On quite a few of our test devices (various iPhones 6/6s/7 and iPad Pros), ARKit's video background appears blurry and noticeably out of focus. I did a bit of investigating (using private APIs to access the underlying AVCaptureDevice) and found that ARKit will always set camera's lens position (*) to a fixed value of 0.752941.



        (*) https://developer.apple.com/documentation/avfoundation/avcapturedevice/1624643-lensposition



        As the SDK documentation explicitly states, the same lens position value does not "represent a consistent focus distance from device to device". So, I wonder what motivated the decision to use this specific lens position value across all devices...?



        Calling setFocusModeLocked(lensPosition:completionHandler:) (**) does enable me to change the lens position to a more appropriate value, causing the video background to appear crisp and in focus, which incidentally doesn't seem to affect tracking stability at all. But I obviously we're not allowed to use this "workaround" in the App Store as it relies on private API methods.



        (**) https://developer.apple.com/documentation/avfoundation/avcapturedevice/1624617-setfocusmodelocked


        So, I guess my question is: Is there any way at all to re-focus the camera in ARKit (without the need for private API calls)? And if not, why not?