Search Unity

What’s New in Unity’s AR Foundation

Discussion in 'Unite Now' started by AskCarol, Jul 27, 2020.

  1. AskCarol

    AskCarol

    Joined:
    Nov 12, 2019
    Posts:
    234
    Unite Now Session
    AR Foundation is Unity’s purpose-built framework for augmented reality (AR) development that allows you to build rich experiences once, then deploy across multiple mobile and wearable AR devices. Join us as we dive into the latest updates in AR Foundation, including support for the newest features of ARKit and ARCore.

    When
    Thu, August 6, 9:00 AM PT


    Where
    You can watch the session here!
    Make sure to sign up to get access to all Unite Now content.


    ______________________


    A team of product experts from across Unity will be available during and after the session. Our Community team will continue to field questions to foster an ongoing discussion with the community. Please feel free to ask your questions in this thread. Only questions related to the topics of the session are permitted.

    We really look forward to hearing from the community.

    Thank you!
     
    Last edited: Aug 6, 2020
  2. stemwerx

    stemwerx

    Joined:
    May 2, 2020
    Posts:
    1
    The camera feed did not display on screen when I hit the build button. Build and Run was not enabled. Is it alright to use an iPhone for your camera when running Unity on a PC?
     
  3. todds_unity

    todds_unity

    Joined:
    Aug 1, 2018
    Posts:
    324
  4. Misnomer

    Misnomer

    Joined:
    Jul 15, 2013
    Posts:
    28
    Hello and thanks for this session. I like the in-depth details because documentation is not always clear.
    I have two questions:
    1. Do you have any estimates on fixing memory leak in meshing? It seems kinda strange to show that functionality given that currently it works for only about 7 minutes before freezing and therefore suitable only to show as a gimmick to friends. I tried latest preview and it's still there. Any directions on how I can try fixing it myself or what direction to look in are very welcome.
    2. I looked at max depth image distance and sometimes it shows values like 8-10 meters which seems impossible because that's way further than iPad's Lidar 5m. Maybe you can shed some light on how I can interpret this data?
     
    Last edited: Aug 7, 2020
  5. todds_unity

    todds_unity

    Joined:
    Aug 1, 2018
    Posts:
    324
    We are investigating the memory leak in the meshing sample.

    The depth image pixel values are in meters. I cannot speak to the accuracy of the data. The texture provided through AR Foundation comes directly from ARKit.
     
    Misnomer likes this.
  6. todds_unity

    todds_unity

    Joined:
    Aug 1, 2018
    Posts:
    324
    I will add that there is an AROcclusionManager.environmentDepthConfidenceTexture that is populated on ARKit platforms. This texture is a TextureFormat.R8 where the pixel values on iOS conform to https://developer.apple.com/documentation/arkit/arconfidencelevel.
     
    Misnomer likes this.
  7. KnewK

    KnewK

    Joined:
    Sep 2, 2012
    Posts:
    19
  8. ShawnFeatherly

    ShawnFeatherly

    Joined:
    Feb 22, 2013
    Posts:
    57
    I couldn't get the basic scene (only camera feed, shown @8:00 in the video) to work on Android. Seems to be due to a 64-bit requirement that started Aug2020 https://github.com/google-ar/arcore-unity-sdk/releases/tag/v1.18.0.
    1. I used Unity 2019.4.8f1 and built and ran on a Pixel 3. The app deployed to the phone. Showed the "Made with Unity" splash screen. Then the app force quit.
    2. I tried upgrading the UPM package to 4.0.2 from 2.1.8 and ARCore to 4.0.4 from 2.1.11. I received the same crash.
    3. I tried https://github.com/Unity-Technologies/arfoundation-samples. Since I was using 2019.4.8 I reverted to "aab62c Upgrading to Unity 2019.4.5". It loaded the menu when deployed to my phone, but crashed on "Simple AR".
    4. I tried the HelloAR scene from https://developers.google.com/ar/develop/unity/quickstart-android. This also crashed.
    This appears to be a Google issue, not a Unity one. If you're following along with the video seems like you're likely to run into the same issue.
    Here's some logcat.
    Code (CSharp):
    1. 08-17 14:50:03.318 32751   319 I third_party/arcore/ar/core/android/sdk/session_create.cc: ARCore Version: SDK build name: 1.17
    2. 08-17 14:50:03.319 32751   319 I third_party/arcore/ar/core/android/sdk/session_create.cc: ARCore Version: APK version code: 202100503
    3. 08-17 14:50:03.425 32751   319 I third_party/arcore/ar/core/android/sdk/session_create.cc: Dynamite load ok.
    4. 08-17 14:50:03.425 32751   319 I third_party/arcore/java/com/google/vr/dynamite/client/native/dynamite_client.cc: Attempting to load native library arcore_c from package com.google.ar.core
    5. 08-17 14:50:03.427 32751   319 E DynamiteClient: Failed to load native library [packageName=com.google.ar.core,libraryName=arcore_c] from remote package:
    6. 08-17 14:50:03.427 32751   319 E DynamiteClient:
    7. 08-17 14:50:03.427 32751   319 E DynamiteClient: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/com.google.ar.core-NWEL-BhimWXt8JuAcK-Ieg==/split_config.arm64_v8a.apk!/lib/arm64-v8a/libarcore_c.so" is 64-bit instead of 32-bit
    8. 08-17 14:50:03.427 32751   319 E DynamiteClient:        at java.lang.Runtime.loadLibrary0(Runtime.java:1071)
    9. 08-17 14:50:03.427 32751   319 E DynamiteClient:        at java.lang.Runtime.loadLibrary0(Runtime.java:1007)
    10. 08-17 14:50:03.427 32751   319 E DynamiteClient:        at java.lang.System.loadLibrary(System.java:1667)
    11. 08-17 14:50:03.427 32751   319 E DynamiteClient:        at com.google.vr.dynamite.NativeLibraryLoader.a(PG:32)
    12. 08-17 14:50:03.427 32751   319 E DynamiteClient:        at com.google.vr.dynamite.NativeLibraryLoader.initializeAndLoadNativeLibrary(PG:14)
    13. 08-17 14:50:03.427 32751   319 E DynamiteClient:        at fqd.a(PG:7)
    14. 08-17 14:50:03.427 32751   319 E DynamiteClient:        at afi.onTransact(PG:5)
    15. 08-17 14:50:03.427 32751   319 E DynamiteClient:        at android.os.Binder.transact(Binder.java:914)
    16. 08-17 14:50:03.427 32751   319 E DynamiteClient:        at com.google.a.a.a.a(BaseProxy.java:5)
    17. 08-17 14:50:03.427 32751   319 E DynamiteClient:        at com.google.vr.dynamite.client.b.initializeAndLoadNativeLibrary(INativeLibraryLoader.java:9)
    18. 08-17 14:50:03.427 32751   319 E DynamiteClient:        at com.google.vr.dynamite.client.DynamiteClient.loadNativeRemoteLibrary(DynamiteClient.java:36)
    19. 08-17 14:50:03.427 32751   319 E DynamiteClient:        at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
    20. 08-17 14:50:03.427 32751   319 E DynamiteClient:        at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0)
    21. 08-17 14:50:03.427 32751   319 E DynamiteClient:        at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95)
    22. 08-17 14:50:03.427 32751   319 E DynamiteClient:        at android.os.Handler.dispatchMessage(Handler.java:103)
    23. 08-17 14:50:03.427 32751   319 E DynamiteClient:        at android.os.Looper.loop(Looper.java:214)
    24. 08-17 14:50:03.427 32751   319 E DynamiteClient:        at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
    25. 08-17 14:50:03.427 32751   319 I third_party/arcore/java/com/google/vr/dynamite/client/native/dynamite_client.cc: Dynamite::LoadNativeRemoteLibrary handle=0
    26. 08-17 14:50:03.427 32751   319 E third_party/arcore/ar/core/android/sdk/session_create.cc: Dynamite failed to load remote library
    27. 08-17 14:50:03.427 32751   319 E third_party/arcore/ar/core/android/sdk/session_create.cc: LoadSymbolsDynamite returning AR_ERROR_FATAL.
    28. 08-17 14:50:03.427 32751   319 E third_party/arcore/ar/core/android/sdk/session_create.cc: LoadSymbols returning status.
    29. 08-17 14:50:03.427 32751   319 E native  : session_manager.cc:61 ArPresto::ArCore session creation failed.
    30.  
     
    Last edited: Aug 18, 2020
    vovo801 likes this.
  9. todds_unity

    todds_unity

    Joined:
    Aug 1, 2018
    Posts:
    324
  10. ShawnFeatherly

    ShawnFeatherly

    Joined:
    Feb 22, 2013
    Posts:
    57
    Found the fix!
    Change Player Settings -> Android -> Other Settings -> Configuration:
    1. Enable 64-bit by changing Scripting Backend: IL2CPP
    2. Actually use 64-bit Under Target Architectures; uncheck ARMv7 and check ARM64
    Discovered this by reading github.com/google-ar/arcore-unity-sdk/issues/751

    @todds_unity thank you for the idea. My issue with the ar samples project likely stemmed from reverting back to an old commit to get it to work with 2019.4.8.
     
  11. Siggytron

    Siggytron

    Joined:
    Feb 9, 2018
    Posts:
    12
    Is it possible to run Unity on an iPhone for development purposes? Is that what you're saying to do? (FYI I've only built anything for PC or Android)
     
  12. deepakri7

    deepakri7

    Joined:
    Jan 31, 2018
    Posts:
    1
    Hello,
    I am trying to set the rotation of AR gameobj facing towards the camera but I don't why it isn't working?