Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

ARKit 2.0 Beta support

Discussion in 'AR' started by jimmya, Jun 5, 2018.

  1. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
    Hi folks,

    Many of you have asked about ARKit 2.0. Apple announced it and released Beta today. We're right there with them - for example the Lego app that was shown at the keynote uses the version of the plugin that we're releasing to all developers today.

    First a little intro: https://blogs.unity3d.com/2018/06/0...cbook-pro-arkit-2-0-available-for-unity-devs/

    As pointed out, we have uploaded the code to Bitbucket, but it is in a branch since this is a Beta release:
    https://bitbucket.org/Unity-Technologies/unity-arkit-plugin/src/arkit2.0_beta/

    If you would like the latest version of the code packaged up into a zip: https://bitbucket.org/Unity-Technologies/unity-arkit-plugin/get/arkit2.0_beta.zip

    There is a bit of documentation in the https://bitbucket.org/Unity-Technol.../src/arkit2.0_beta/docs/WhatsNewInARKit2_0.md file. (needs a bit more work)

    Hope you have fun with it, and let us know if there are any issues or things that could be better.
     
    Last edited: Jun 5, 2018
  2. rob_ice

    rob_ice

    Joined:
    Nov 11, 2016
    Posts:
    112
    Very much looking forward to checking this out! Thanks for posting about it here also
     
  3. gmxtian

    gmxtian

    Joined:
    Jul 10, 2012
    Posts:
    8
    Awesome. Thanks for being on top of this!
     
  4. ifeltdave

    ifeltdave

    Joined:
    Aug 28, 2012
    Posts:
    16
    I'm running into an issue when trying to use Image Anchors with this new ArKit2.0 plugin. I had it working in ArKit 1.5. I'm getting these errors when running on device via XCode 10 Beta.

    The error claims the defined images either are not 100px big, or do not have a physical size defined. Image anchors do indeed meet the mentioned requirements of pixel size and physical size set in the project.


    2018-06-05 16:02:46.094761-0700 arkitscene[866:87857] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
    2018-06-05 16:02:46.094971-0700 arkitscene[866:87857] [MC] Reading from public effective user settings.
    2018-06-05 16:02:46.102191-0700 arkitscene[866:87857] [framework] -[CUINamedRecognitionGroup initWithName:contentsFromCatalog:usingRenditionKey:fromTheme:] couldn't find object named 'unitywhiteonblack' skipping
    2018-06-05 16:02:46.102563-0700 arkitscene[866:87857] [framework] -[CUINamedRecognitionGroup initWithName:contentsFromCatalog:usingRenditionKey:fromTheme:] couldn't find object named 'unitylogoreferenceimage' skipping
    2018-06-05 16:02:46.449096-0700 arkitscene[866:88078] [Technique] Could not add planar object for detection: <ARReferenceImage: 0x2808a3930 name="unitylogoreferenceimage" physical-size=(0.000, 0.000)> Reason: 4
    2018-06-05 16:02:46.449131-0700 arkitscene[866:88078] [Technique] Could not add planar object for detection: <ARReferenceImage: 0x2808af750 name="unitywhiteonblack" physical-size=(0.000, 0.000)> Reason: 4
    2018-06-05 16:02:46.449314-0700 arkitscene[866:88078] [Session] Session (0x1059caad0): did fail with error: Error Domain=com.apple.arkit.error Code=300 "Invalid reference image." UserInfo={NSLocalizedFailureReason=One or more reference images have an invalid size: unitylogoreferenceimage, unitywhiteonblack, NSLocalizedRecoverySuggestion=Make sure that all reference images are greater than 100 pixels and have a positive physical size in meters., ARErrorItems=(
    unitylogoreferenceimage,
    unitywhiteonblack
    ), NSLocalizedDescription=Invalid reference image.}
    2018-06-05 16:02:47.713616-0700 arkitscene[866:87857] [App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction
    2018-06-05 16:02:47.714408-0700 arkitscene[866:87857] [App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction
    2018-06-05 16:02:57.480662-0700 arkitscene[866:87989] [BoringSSL] Function boringssl_session_errorlog: line 238 BoringSSL [C2.1:2] [0x105acf760] [boringssl_session_read] SSL_ERROR_ZERO_RETURN(6): operation failed because the connection was cleanly shut down with a close_notify alert
    2018-06-05 16:02:57.481573-0700 arkitscene[866:87989] [BoringSSL] Function boringssl_session_errorlog: line 238 BoringSSL [C2.1:2] [0x105acf760] [boringssl_session_read] SSL_ERROR_ZERO_RETURN(6): operation failed because the connection was cleanly shut down with a close_notify alert


    EDIT: This also happens when I publish the provided UnityARImageAnchor scene straight from the project as it is downloaded without any modifications on my end.

    EDIT 2: Confirmed this happens in the same version of Unity the downloaded package was created with (2017.4.4f1)

    FINAL EDIT: When removing all image anchors from the Resource set, I finally can get camera feed and the testing cube gameobject. Seems to be some problem in the way its creating those assets on build in Xcode?
     
    Last edited: Jun 6, 2018
    AlexeySeverin likes this.
  5. DanielNeubig

    DanielNeubig

    Joined:
    Jan 17, 2018
    Posts:
    1
    @ifeltdave

    the error message is a bit missleading. Try setting your Deployment Target (in Unity or later in Xcode) to 12.0. This fixes the issue for me.
     
    ForgeDk, whkona, mkusan and 1 other person like this.
  6. rob_ice

    rob_ice

    Joined:
    Nov 11, 2016
    Posts:
    112
    Had custom written something that sets reflection probes based off the camera feed, however the new ARKit 2.0 version of custom location based reflections works much smoother - thankyou very much!
     
  7. Elliott-Mitchell

    Elliott-Mitchell

    Joined:
    Oct 8, 2015
    Posts:
    86
    Thanks for implementing ARKit 2.0!

    BUG Report: I made a quick ARKit 2.0 app yesterday in Unity 2018.1.3f1 - When tried to compile in Xcode 10 beta, I had errors relating to my signing certificate and provisioning profile. I tried a bunch of times with out success (used multiple pre-existing profiles that I know work too). In the end, I rebuilt the project in Unity Unity 2017.4.2f2 and that build worked with Xcode 10 beta. ¯\_(ツ)_/¯

    I'll likely step back one version from 2018.1.3f1 for a test build; I was just in a rush yesterday.

    Cheers,
    Elliott
     
    Last edited: Jun 6, 2018
  8. rob_ice

    rob_ice

    Joined:
    Nov 11, 2016
    Posts:
    112
    2018.1.0f2 seems to be working fine on our dev mac - having fun with the new features also!
     
    Elliott-Mitchell likes this.
  9. mp-paramlabs

    mp-paramlabs

    Joined:
    Oct 31, 2017
    Posts:
    9
    @jimmya
    I was testing with worldmap demo. I want to know that how can i extract anchors from saved worldmap.
     
    whogas and gmxtian like this.
  10. akhella

    akhella

    Joined:
    Apr 14, 2015
    Posts:
    9
    I am compiling the ARkit 2.0 examples with Unity 2018.1.3f1 and XCode 10, and all apps are crashing upon launch. I changed deployment target to 12, and that didn't work.

    Could this be a Unity version issue? What's the latest version of Unity that I can use that is compatible with ARkit 2.0?

    Thanks!
     
  11. Elliott-Mitchell

    Elliott-Mitchell

    Joined:
    Oct 8, 2015
    Posts:
    86
    I had issues with Unity 2018.1.3f1 too. I suspect it's a Unity bug. rob_ice mentioned it works with 2018.1.0f2. I suspect there will be a fix in 2018.1.3f2 (or whatever is next).
     
    akhella likes this.
  12. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
  13. mp-paramlabs

    mp-paramlabs

    Joined:
    Oct 31, 2017
    Posts:
    9
    @jimmya is persistent ar possible with v2.0? I would like to save placed objects and surrounding features in a file and it can be loaded for future sessions.
    So far I've been able to get only horizontal and vertical planes from UnityARWorldMap scene.
     
  14. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
    Yes you can do it. For all the virtual objects, you would save their positions and rotations in your current coordinate system along with the ARWorldMap (possibly in a json file that describes the prefabs they use and their position and rotation). Then after you have relocalized with the ARWorldMap, just instantiate and position the virtual objects as before, and they will be in the right places.
     
    mp-paramlabs and JoeStrout like this.
  15. Tuni

    Tuni

    Joined:
    May 24, 2013
    Posts:
    74
    Have you found a solution? I have the same problem. Can't get a ARKit build with Xcode 10 on an iOS 12 device.
     
  16. Jason-RT-Bond

    Jason-RT-Bond

    Joined:
    Mar 26, 2012
    Posts:
    89
    This is great. So glad to be able to play with these new features right away in Unity.
     
  17. sabari_2

    sabari_2

    Joined:
    Oct 9, 2015
    Posts:
    10
    is there any tutorial on how to create my own object as .arobject in object detection example scene. i tried using object scanner scene. but i don't know how to achieve it. thanks in advance:)
     
  18. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    Multiuser AR experiences mean only two users or many users can play the same ar?
     
  19. mp-paramlabs

    mp-paramlabs

    Joined:
    Oct 31, 2017
    Posts:
    9
    Thanks @jimmya, that's the one way to do it.
    But worldmap documentation says Anchored objects(feature points or virtual contents) are also saved. so does the current version expose a way to do that? and what is the way to add an anchor to instantiated object?
     
    robkohout likes this.
  20. dnoparker

    dnoparker

    Joined:
    Aug 28, 2013
    Posts:
    63
    Hello,

    I am trying to compile the object tracking scenes and I am gettings errors on Xcode like -

    Use of undeclared identifier 'ARWorldMap'
    Use of undeclared identifier 'ARReferenceObject'
    Unknown type name 'ARWorldMap'

    Any ideas?
     
  21. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    Are you using latest beta Xcode?
     
  22. dnoparker

    dnoparker

    Joined:
    Aug 28, 2013
    Posts:
    63
    Oh no, this could be it then. Thank you!
     
  23. jalemanyf

    jalemanyf

    Joined:
    Jun 16, 2013
    Posts:
    25
    Hello,

    I'm trying to test the track eyes and tongue Scene.

    In Unity all works fine but when I compile on xCode y have 11 errors ( a lot repeated ) about the ARWorlMap:

    -Unknown type name 'ARWorldMap'

    -Use of undeclared identifier 'ARReferenceObject'

    Captura de pantalla 2018-06-13 a las 9.39.27.png

    Captura de pantalla 2018-06-13 a las 9.39.39.png

    Any ideas about what I'm doing wrong?

    Thanks in advance!

    Best Regards,

    Josep Alemany
     
  24. dnoparker

    dnoparker

    Joined:
    Aug 28, 2013
    Posts:
    63
    How is the object scanning scene suppose to work? We are pointing it at objects and hitting the buttons but nothing is happening (apart from the yellow tracking points)

    EDIT -

    Okay! Think i was just missing some prefabs.
     
    Last edited: Jun 13, 2018
  25. dnoparker

    dnoparker

    Joined:
    Aug 28, 2013
    Posts:
    63
    You need the XCode 10 beta!
     
    gothParrot and jalemanyf like this.
  26. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
    All the anchors that are created in the session where you save the worldmap will still be there when you use the worldmap to reset the session - you will get AddAnchor events for all of the ones that were saved. But the virtual objects themselves (e.g. what mesh etc) you will have to generate on your end.
     
    gmxtian likes this.
  27. shaundavies

    shaundavies

    Joined:
    Jan 31, 2017
    Posts:
    44
    I am running your share spheres app and I can't get past the "look around with device to map area screen" step. What am i missing. Is the next scene supposed to auto load at a certain point?
     
  28. Blarp

    Blarp

    Joined:
    May 13, 2014
    Posts:
    267
    I bought https://arworldmap.com

    That is my only contribution to this thread, lol. (bought pointcloudmap.com as well)

    My body is ready
     
  29. jalemanyf

    jalemanyf

    Joined:
    Jun 16, 2013
    Posts:
    25
    Thanks a lot dnoparker! I make the next step...

    Now xCode Beta compiles, OK

    But, when the Apps is launched on my iPhone X it crash and I can read this message on the xCode console:

    NullReferenceException: A null value was found where an object instance was required.

    at UnityEyeManager.Start () [0x00000] in <filename unknown>:0

    I'm only trying the eyes and tongue sample.

    Any ideas? Thanks!
     
  30. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
    Are there any other messages? Maybe you did not check the box for facetracking? see https://forum.unity.com/threads/sub...re-without-face-tracking.504572/#post-3297235
     
  31. sabari_2

    sabari_2

    Joined:
    Oct 9, 2015
    Posts:
    10
    Hi @jimmya i can able to create my own object as .arobject file using object scanner. but my .arproject file is not detecting while using the ARobjectAnchor scene. And how i can identify which object i can scan to detect(i can't find Preview for the .arobject).????? thanks
     
  32. mp-paramlabs

    mp-paramlabs

    Joined:
    Oct 31, 2017
    Posts:
    9
    Well, this one worked perfectly.:cool:

    That cleared some doubt, but need to test it. BTW thanks @jimmya
     
    jimmya likes this.
  33. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    400
    Hi All
    I am starting with AR developer with ARKit and Unity, for it and only to confirm it.... Did Anybody try any ARKit2 Beta for Unity with Ipad 2017 and IOS 12 beta? ( I am thiking in buying this one at the moment
    Thanks in advance
    Alejandro
    Ps. Sorry for my little english
     
    sanketprabhu likes this.
  34. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
  35. jalemanyf

    jalemanyf

    Joined:
    Jun 16, 2013
    Posts:
    25
    Hi,

    I finally compiled the eyes tracking and togue! It works Like a charm ;)

    But now I have another question... Wich is the best way to know exactely where I’m looking on the screen?

    Any best algoritm or strategy? Any sample of How to control the screen with the eyes?

    Thanks!
     
    Deleted User likes this.
  36. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
    The lookAt point is exposed in the plugin (see ARFaceAnchor.lookAtPoint) - I just did not use it in the example I did. Someone seems to have used it though - https://twitter.com/jimmy_jam_jam/status/1006259283799859201
     
    Burglecut likes this.
  37. harperAtustwo

    harperAtustwo

    Joined:
    Nov 15, 2016
    Posts:
    25
    Hey Jimmy.

    I am having an issue where when I populate "Detection Images" with an ARRefrenceImageSet it stops the camera feed? This problem started after I updated the plugin to the latest version. If I remove the Detection Images the camera feed works fine. I get no error. Has anything changed around the workflow in Xcode maybe that would cause this issue? I still add the detection image in the Xcode project as I did before.
     

    Attached Files:

  38. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
    When you say latest version, are you using XCode 10 Beta? If so, you will need to make your target SDK 12.0 since XCode's actool does not like it otherwise for referenceimages. It's prolly something along the lines of: https://forum.unity.com/threads/ark...ices-that-dont-have-11-3.518806/#post-3442561
     
    harperAtustwo likes this.
  39. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
    right now you will have to keep track of the object names when scanning and rename them when copying to your project. in the future, i can see us saving a preview image with the created object, but we do not do it yet.
     
    sabari_2 likes this.
  40. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    400
    Hi jimmya
    Thanks for the info !!!!
    Regards
    Alejandro
     
  41. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    400
    Hi
    Could you say me what is the Best Unity and XCode versions for ARKit 2 developing?
    Thanks
     
  42. mattcucco

    mattcucco

    Joined:
    Jan 11, 2017
    Posts:
    1
    Hey @jimmya was wondering if Rectangle detection was added already or if it will be added at some point. I can find the references in the Apple Vision documention but not here. Thanks!
     
    Burglecut likes this.
  43. dnoparker

    dnoparker

    Joined:
    Aug 28, 2013
    Posts:
    63
    XCode has to be beta 10.
     
    castana1962 likes this.
  44. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    400
    Hi dnoparker
    So, I will install XCode 10 Beta and the Unity 2018.1.0f2 version
    Thanks for your help !!!
    castana1962
     
  45. ifeltdave

    ifeltdave

    Joined:
    Aug 28, 2012
    Posts:
    16
    I'm now able to get the app to build to my device, but upon loading the scene with my Image Anchors (that worked previously in ArKit 1.5), I get this error for each of my image objects within my image set:


    [framework] -[CUINamedRecognitionGroup initWithName:contentsFromCatalog:usingRenditionKey:fromTheme:] couldn't find object named 'Secondary-Bottom-Right' skipping


    I've tried recreating the ArReferencesImages, and also their set, from scratch to no avail.

    Any help on this would be appreciated!

    Edit: More info, I am using Xcode 10 beta.
     
  46. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
    Please read recent posts in the forum before you post - in your case, see this answer: https://forum.unity.com/threads/arkit-2-0-beta-support.534639/#post-3533581
     
  47. ifeltdave

    ifeltdave

    Joined:
    Aug 28, 2012
    Posts:
    16
    Hi Jimmy, I did see that link but am still running into the same error without any resolution.

    I ensured my sdk deployment target is 12.0 is Xcode 10 Beta. I also checked out the Contents.json, per the Apple Developer link you shared. Unless I'm missing something, editing that file gets me nowhere.

    Am I missing the solution or is this a known bug with Apple / Unity?
     
  48. jimmya

    jimmya

    Unity Technologies

    Joined:
    Nov 15, 2016
    Posts:
    793
    Does the image tracking fail after those errors? See if it works despite the errors.
    This is not a known bug - I have tried this on various devices, and have shown a video of the image tracking working. So maybe it's something with your setup? Check that you do not have any differences from the arkit2.0_beta branch of the plugin, and you have the iOS 12 beta installed on your device. Check all the steps you've taken.
     
  49. ifeltdave

    ifeltdave

    Joined:
    Aug 28, 2012
    Posts:
    16
    The scene with the image markers + arkit stuff crashes when it gets loaded, and then the errors for each of my reference images gets spit out so no real image tracking is occurring at this time.

    I can confirm I have iOS12 Beta on my device as well.
    Unity version we are on is 2017.4.2f2, this should not be a problem right?

    This is in a project that was working in iOS11.4 / ArKit 1.5, so perhaps something is missing from the source when I brough in the 2.0 stuff. I'll take a stab at reimporting all that to see where it gets me!
     
  50. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    400
    Hi All
    I am trying with ARKit2 and Unity( in my Ipad 2017) and I could get one free Apple account developer to deploy my AR projects only for 6 days. Since I need it for testing only( after that I will buy it), for it, is there any way to get more time this Free Apple Developer account? Thanks for your time