Search Unity

Question Can we use ARKit 6?

Discussion in 'AR' started by s-elliot-perez, Jun 10, 2022.

  1. s-elliot-perez

    s-elliot-perez

    Joined:
    Mar 4, 2016
    Posts:
    22
    Hello! I'm interested in the 4k option of the new ARKit 6, announced by Apple, but it's not clear to me how to actually use it. I'm new to following Apple releases and can't find info on its release or how to use it with Unity. Is it already released? As is, the very simple syntax they show in the video at the 5:00 mark doesn't seem available in Unity C# or Xcode... I have the latest version of the Unity ARKit XR Plugin installed: Version 4.2.3

    upload_2022-6-10_12-2-1.png
     

    Attached Files:

    newguy123 and DiveshNaidoo like this.
  2. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    ARKit 6 is currently not supported by AR Foundation.
     
    andyb-unity likes this.
  3. s-elliot-perez

    s-elliot-perez

    Joined:
    Mar 4, 2016
    Posts:
    22
    Thank you for your reply. Are there any plans in the near future to support it?
     
    Rayd-GmbH likes this.
  4. tafkams

    tafkams

    Joined:
    Oct 5, 2021
    Posts:
    46
    I am also very interested in using ARKit 6 because of the simultaneous use of front and back camera. Are there any update plans?
     
  5. Rayd-GmbH

    Rayd-GmbH

    Joined:
    Jun 3, 2015
    Posts:
    6
    Any information/news on this topic? All our clients really want the higher quality image :)
     
  6. DiveshNaidoo

    DiveshNaidoo

    Joined:
    Apr 1, 2018
    Posts:
    23
    Would also like to know this. We could really use the high resolution capture feature.
     
  7. DiveshNaidoo

    DiveshNaidoo

    Joined:
    Apr 1, 2018
    Posts:
    23
    Would be nice to know if there are any plans to support the new Arkit features in Unity.
     
  8. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    Hi all,

    I'm confirming that we are indeed working on ARKit 6 support. We will make a full announcement later covering the full scope of this work, but in the meantime I want to let you know that 4K video is available now via the
    ARCameraManager
    and does not require a new AR Foundation version.

    To access 4K video configurations on compatible devices:
    • Install the Xcode 14 beta to your Mac via Apple Developer downloads, and install the iOS 16 beta on a compatible device (iPhone 11 and up or iPad Pro 5th Generation)
    • Set up a scene to request a 4k camera configuration (sample code provided below)
    • Build your Unity project as normal for iOS
    • Open the resulting iOS project in Xcode 14, then build and run the application on your iOS 16 device

    Here's a sample MonoBehaviour you could add to your Main Camera to switch to the 4K camera configuration. (On my iPhone 13 Pro, there is only one 4K configuration available.)

    Code (CSharp):
    1. using System.Collections;
    2. using Unity.Collections;
    3. using UnityEngine;
    4. using UnityEngine.XR.ARFoundation;
    5.  
    6. [RequireComponent(typeof(ARCameraManager))]
    7. public class CameraConfigurator : MonoBehaviour
    8. {
    9.     IEnumerator Start()
    10.     {
    11.         // Wait for configurations to become available
    12.         yield return new WaitForEndOfFrame();
    13.  
    14.         // Get available camera configurations
    15.         var cameraManager = GetComponent<ARCameraManager>();
    16.         using var configs = cameraManager.GetConfigurations(Allocator.Temp);
    17.  
    18.         // Switch to the first available 4k camera configuration
    19.         var fourKResolution = new Vector2(3840, 2160);
    20.         foreach (var c in configs)
    21.         {
    22.             if (c.resolution == fourKResolution)
    23.             {
    24.                 Debug.Log($"Switching to 4k camera configuration:\n{c}");
    25.                 cameraManager.currentConfiguration = c;
    26.                 break;
    27.             }
    28.         }
    29.     }
    30. }
    31.  
     
  9. jawatkins03

    jawatkins03

    Joined:
    Apr 9, 2021
    Posts:
    2
    Hello,

    Will AR Foundation support whatever the new SDK Apple will include with
    the AR/VR Headset when it becomes ava
     
  10. tomicz

    tomicz

    Joined:
    Mar 16, 2015
    Posts:
    152
    There is probably going to be another SDK for that. There is a very low chance that Apple will ever release AR headset, those are speculations only.
     
  11. jawatkins03

    jawatkins03

    Joined:
    Apr 9, 2021
    Posts:
    2
    Why develop another SDK If you believe there is a very low chance Apple will ever release a XR Headset unless you are referring to an AR only Headset. I’m trying to determine if AR Foundation will support ARKit 6 in addition to the developers SDK when the Headset is finally released.
     
    Last edited: Aug 22, 2022
  12. garrido86

    garrido86

    Joined:
    Dec 17, 2013
    Posts:
    233
    I was wondering, could this be also used to force a Full-HD (1920x1080) mode?
     
  13. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    @garrido86 If your device has an available 1920x1080 camera configuration, then yes this would work. Note that your device might also have multiple 1920x1080 camera configurations at different frame rates. I would recommend logging all the configurations on your device inside the loop above to see your options. (You should not assume that all user devices will have a particular camera configuration available.)
     
  14. garrido86

    garrido86

    Joined:
    Dec 17, 2013
    Posts:
    233
    Great, I had no Idea one could choose a different camera on ARKit for the AR session.
     
  15. Olli_Win11

    Olli_Win11

    Joined:
    Jul 27, 2022
    Posts:
    1
    Dear Unity, as it is "later" now, I really am curious when ARKit 6 will be finally supported. Is there any roadmap you could share with us?

    best regards,

    Olli
     
  16. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    Thanks for checking in! Here's where things stand at the moment.

    Complete
    • 4K video is available now. See my post above.
    • Newly added ear joints on 2D skeleton body tracking. You can see these in the 2D body tracking sample in our Samples project
    • ARKit 6 introduced a change to the way that plane tracking works under the hood. We made a corresponding change so that your apps are unaffected and continue to work the same on iOS 16 as older versions.
    • iOS 16 also quietly introduced a change to the behavior of multithreaded rendering. We released a patch to address this, and another patch is coming soon to further address follow-up issues that users have reported. You can follow this conversation on GitHub.
    In Progress

    The following ARKit 6 features require API changes to the Apple ARKit XR Plug-in, and won't be available until our next minor version. We are unable to share any potential release dates at this time.
    • Configurable capture device settings
    • High resolution background image
    • Accessing EXIF tags

    Blocked
    • HDR. ARKit 6 HDR is dependent on lower-level Graphics changes that will take some time.

    Does that answer your question?
     
    KyryloKuzyk and newguy123 like this.
  17. tafkams

    tafkams

    Joined:
    Oct 5, 2021
    Posts:
    46
    Hey @andyb-unity, thanks for providing us with the roadmap! Do you have any info on when we can use simultaneous face and world tracking on the front and back cameras? :)
     
  18. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
  19. ThomasPzr

    ThomasPzr

    Joined:
    Oct 11, 2022
    Posts:
    4
    Do you know if we will be able to add anchors to the ARMeshes (and so save the ARMesh with the ARWorldMap) ?
    Any update about the roadmap ?
     
  20. ThomasPzr

    ThomasPzr

    Joined:
    Oct 11, 2022
    Posts:
    4
  21. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    @ThomasPzr Please start a new thread for this question as we're veering away from the ARKit 6 discussion in this thread. I also don't fully understand your question so if you wouldn't mind elaborating a bit as well that would help!
     
  22. butts270

    butts270

    Joined:
    Dec 18, 2022
    Posts:
    2
    I am so confused, being new to AR the new Unity Hub i have is the most up to date but, doesnt support ARFoundation packages simply put, what ARHub do I need with what plugins to create spatials Anchors remotely on Google Maps...