Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

What's actual best practice for ARKit development?

Discussion in 'AR' started by jseagull, Jan 10, 2019.

  1. jseagull

    jseagull

    Joined:
    Aug 20, 2018
    Posts:
    5
    I'm trying to shift from Vuforia to ARKit, since in my limited experience the tracking is wildly better.

    I'm extremely frustrated by what appear to be numerous false starts and dead ends in how ARKit is implemented in Unity. I'm not trying to do anything crazy, just view some models in AR with limited interactivity like I did with Vuforia, but with better tracking.

    Down the line I'd like to transition to markerless tracking, as well as lighting detection and use of linear/HDR rendering and the LWRP as well.

    So far I've encountered:
    • Use Vuforia, but turn on ARKit support. This works for marker-related tracking, but retains the problems of Vuforia licensing and I would like to get off of tracking markers. Also ran across forum posts saying Vuforia is deprecated; and of course I'm stuck with the old renderer and gamma space in Vuforia.
    • Download ARFoundation and ARKit support in the package manager, then... do something. (per this link).
    • Download an official-but-not-hosted ARKit 2.0 plugin from Bitbucket, then... open the included Unity project and modify it? The tutorial assumes an intimidatingly high level of coding knowledge
    • Use the 8th Wall Unity XR plugin?
    Why isn't there a pinned post in this forum saying "here's how you get started?"

    Are there any definitive statements out there about which workflow has Unity's blessing? Is all this stuff just too bleeding-edge for there to be good documentation and tutorials, despite the packages being over a year old? Am I missing something?

    Unity gives its blessing to this "nano-degree" from a 3rd-party training vendor, but the examples fail to load, there are references within the courseware to multiple download repos for examples, and the training vendor's discussion forums don't even host a category for the ARKit class.
     
    Last edited: Jan 10, 2019
  2. tdmowrer

    tdmowrer

    Joined:
    Apr 21, 2017
    Posts:
    605
    The ARKit XR Plugin package is the iOS platform support for ARFoundation, which is platform agnostic. The ARFoundation docs will give you a better starting point. There is also a GitHub repo with several samples that work with 2018.3.
     
  3. jseagull

    jseagull

    Joined:
    Aug 20, 2018
    Posts:
    5
    Thanks for the quick response. It sounds like you're saying that ARFoundation is the way to go.

    This raises followup questions:
    • Does there exist a basic tutorial for a simple AR app with ARFoundation/ARKit, besides opening the 'Simple AR' scene in the repo? Getting some simple hand-held examples up, as exist for Vuforia, would go a long way towards making ARFoundation feel more welcoming.
    • In particular, I'd like to understand more about how to attach a whole hierarchy, not just a single prefab, to a detected/tracked plane. In Vuforia I would just make my scene a child of the image target GameObject; what's the analagous workflow here?
    • The LWRP-enabled example doesn't compile for me - it chokes on namespace errors in the IBeforeCameraRender script that I don't understand how to resolve (Unity 2018.3f2, lwrp branch and all Package Manager packages updated as of 1/10/2019). How to fix?
     
  4. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248


    • This vid will get you going
    • You can have a hierarchy in a prefeb and even nested prefabs
    • Currently for the LWRP specific stuff for AR Foundation, you SHOULD NOT UPDATE the LWRP package to the latest. Stick to LWRP 3.3.0 as thats the only version currently supported (They are working on updating this)
     
  5. tdmowrer

    tdmowrer

    Joined:
    Apr 21, 2017
    Posts:
    605
    Yep, that's also a good place to start, thanks @newguy123.

    The recommended approach for placing more complex content on a plane is to use MakeContentAppearAt. I wrote more about this here: https://forum.unity.com/threads/scaling-with-arfoundation.543953/

    LWRP support is a bit of a moving target. We'll be focused on supporting the latest version soon.