Search Unity

Official AR Foundation v4.0

Discussion in 'AR' started by mfuad, May 6, 2020.

Thread Status:
Not open for further replies.
  1. mfuad

    mfuad

    Unity Technologies

    Joined:
    Jun 12, 2018
    Posts:
    335
    We have just published a new preview version of AR Foundation that brings support of new features, as well as new samples.

    What’s New
    Most notably, the latest preview version of AR Foundation 4.0 now supports ARKit 3.5, with features that use the new LiDAR Scanner and depth-sensing system on the new iPad Pro.

    Additionally, it is now possible to explicitly select which camera provided the camera texture used for pass-through video, and indicate the desired type of tracking (e.g. 3 or 6 degrees of freedom).

    Upgrading Projects
    Please refer to our documentation regarding project upgrades from AR Foundation 3.x to 4.x.

    Requirements
    • AR Foundation 4.0 requires Unity 2019.3 or later
    • Note: The new mesh functionality in ARKit requires Xcode 11.4 or later, and it only works on iOS devices with the LiDAR scanner. All other supported ARKit features remain compatible with Xcode 10.3 or later.
    Samples
    We’ve also added three new sample scenes to demonstrate these new features.

    The ClassificationMeshes scene uses the mesh classification functionality to generate colored overlays on top of the real world. Each color represents a unique surface typed detected by ARKit.



    The NormalMeshes scene renders an overlay on top of the real world. The color of the mesh varies based on the normal of the mesh geometry.


    The OcclusionMeshes scene may appear to be doing nothing at first. However, it is rendering a depth texture on top of the scene based on the real world geometry. This allows for the real world to occlude virtual content. The scene has a script on it that fires a red ball into the scene when you tap. You will see the occlusion working by firing the red balls into a space which you can then move the device camera behind some other real world object to see that the virtual red balls are occluded by the real world object.


    Note: In these scenes, it is normal for about 4 seconds to elapse after the Made With Unity logo disappears before the scanned meshes start to show up.

    Check out this thread for more details on how to use ARKit meshing in AR Foundation 4.0.

    Release Notes
    New:
    Sharing Feedback
    This forum is the best place to open discussions and ask questions. When you encounter a bug, please use the Unity Bug Reporter in the Unity Editor, accessible via Help > Report a Bug. Include “AR Foundation” in the title to help our staff triage things appropriately!

    For more details on how to report a bug, please visit this page.

    Thanks again for your feedback and engagement!
     
    Thimo_, newguy123, Blarp and 2 others like this.
  2. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    Great! Now I've got to get myself a new iPad!
     
    mfuad and todds_unity like this.
  3. yaniv_unity392

    yaniv_unity392

    Joined:
    Oct 7, 2018
    Posts:
    12
    Thank you!
    Going to integrate to my app right now!
     
    Thimo_, User340 and mfuad like this.
  4. BBigG

    BBigG

    Joined:
    Aug 7, 2019
    Posts:
    4
    Great! I'll upgrade my project right away, really looking forward using the OcclusionMeshes!
     
    User340 and mfuad like this.
  5. yty

    yty

    Joined:
    Aug 10, 2009
    Posts:
    82
    Can you tell us when to join cloud Spatial Anchors?
     
  6. bambamyi

    bambamyi

    Joined:
    Nov 26, 2008
    Posts:
    90
    None of these samples are working for me... what am I doing wrong?
     
  7. garrido86

    garrido86

    Joined:
    Dec 17, 2013
    Posts:
    233
    Thanks! It all works very well.
     
    mfuad likes this.
  8. unity_RuDS_BY-7HskAQ

    unity_RuDS_BY-7HskAQ

    Joined:
    May 20, 2020
    Posts:
    3
    I have a question about "ARRaycastManager.AddRaycast" function. The function always returns null. How is the "estimatedDistance" parameter specified? Could you please show an useful sample code?
     
  9. todds_unity

    todds_unity

    Joined:
    Aug 1, 2018
    Posts:
    324
    With 4.0.0-preview.3 packages, ARRaycastManager.AddRaycast is only supported on iOS devices with ARKit 3.0 and later.
     
  10. unity_RuDS_BY-7HskAQ

    unity_RuDS_BY-7HskAQ

    Joined:
    May 20, 2020
    Posts:
    3
    Thank you for your response.
    I use iPad Pro 11 inch 2nd generation (with LiDAR) and ARKit 3.5 (Xcode 11.5).

    Sorry, I've posted same question at "Handheld AR > ARKit" forum.
    https://forum.unity.com/threads/how-to-use-arraycastmanager-addraycast.894910/
     
  11. timbokoppers

    timbokoppers

    Joined:
    Nov 14, 2016
    Posts:
    71
    Is it also possible to use the Facetracking but with NO degrees of freedom? Right now it always 3 or 6.
     
  12. NSWell

    NSWell

    Joined:
    Jul 30, 2017
    Posts:
    89
    Memory Leak!
     
  13. vmnetcetera

    vmnetcetera

    Joined:
    Oct 5, 2018
    Posts:
    3
  14. xzodia

    xzodia

    Joined:
    Jan 24, 2013
    Posts:
    50
    Last edited: Jun 28, 2020
    Techlico, ROBYER1 and timbokoppers like this.
  15. hmkn

    hmkn

    Joined:
    Nov 7, 2019
    Posts:
    23
    Does it support ARCore also in the future?
     
  16. flyingaudio

    flyingaudio

    Joined:
    Dec 3, 2010
    Posts:
    98
    Which ARFoundation should I install for a new project, which needs to be done in 7 weeks? Do I go with the verified 2.1.8 version, or jump on version 4?
    If I want to target iPhone 6s, can I do that with ARFoundation 4, but not use some of the advance features now offered?

    I currently only need image tracking (maybe object tracking), horizontal plane detection, and occlusion would be an incredible bonus.
     
  17. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,338
    hi,

    After upgrading to 4.1 preview 6 i get a black screen in the face mask demo and camera seems to not open at all, is just the demo from the github of preview6, without any changes and all pckages upgraded to that version.

    Is there any chance that this would go back to working soon as now this version does not work at all.

    Thanks in advance

    I use Unity 2019.4.5f1 and the project is working fine in AR foundation 3.1.0 - preview 8

    The only changes were
    - Upgraded from Unity 2019.3.7f1 to Unity 2019.4.5f1
    - Upgraded all AR related pakcages to 4.1.0-preview 6
    - Copied all github latest preview items to my project folder overwriting the previous AR samples
     
    Last edited: Jul 30, 2020
  18. DreamPower

    DreamPower

    Joined:
    Apr 2, 2017
    Posts:
    103
    It's probably too late now, but if you are using the URP (Universal Render Pipeline), you need at least ARFoundation 3 (verified as of Unity 2020.1). If you want occlusion support, you need the newest ARFoundation 4.1.0 Preview 6. You could run into bugs or features that aren't perfectly implemented with that since it's a preview build, though. Personally, if it was an important project that needed to be done quickly, I'd choose ARFoundation 3 - it'll be more up-to-date than 2, more stable than 4, with both more features and fewer changes that would need to be made when eventually upgrading to 4.
     
  19. masonmc

    masonmc

    Joined:
    Jan 16, 2013
    Posts:
    5
    Hi all, banging my head on some weird behaviour I'm seeing -

    I'm using the tracked image manager to make a prefab appear atop a trigger image. When I have the AR Camera Background enabled, I see the real world out the rear camera, that's fine, but all my meshes turn grey (screen2). If I disable the AR Camera Background, and change no other settings, then my meshes appear correct (screen1 - the blobs are animated so they're in a different position, but you can see the textures correctly rendering).

    * All the blob meshes are using standard shader.
    * Unity 2020.1
    * ARFoundation 4.1.0-preview6
    * iPhone 11 Pro Max (everything works great in ARCore / Android!)

    To debug, I made the prefab a direct child game object to my AR Camera, so that it's locked in place 1 or 2 units in front of the camera, always. Same result - grey meshes if AR Camera Background is on.

    Any ideas on what could be the problem here? I've fiddled with graphics/player settings (forward rendering, legacy rendering) but to no avail.

    Thank you!
     

    Attached Files:

  20. masonmc

    masonmc

    Joined:
    Jan 16, 2013
    Posts:
    5
    For the benefit of anyone else seeing this - I've worked around the issue by attaching a new camera directly underneath the AR camera, making the new camera render after the AR camera (setting depth higher than AR camera), then making the AR camera render nothing but the background (Culling Mask: nothing) and making the "subcamera" render everything. Not optimal but only a slight performance hit, and I'm sick of trying to figure out how to get everything to render on a single camera.
     
  21. VictorChow_K

    VictorChow_K

    Joined:
    Jan 16, 2019
    Posts:
    9
    Try upgrading to a beta version of Xcode 12.
     
    nasos_333 likes this.
  22. mdurand

    mdurand

    Joined:
    Aug 1, 2016
    Posts:
    45
    We have not seen other reports of this behavior. Please log a bug via Issue Tracker if this problem still exists.
     
  23. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,452
  24. Alexis-Dev

    Alexis-Dev

    Joined:
    Apr 16, 2019
    Posts:
    121
    Hello,

    Any new about support ARKit GeoAnchor and ARCore Cloud Anchor?

    Best,
    Alexis
     
  25. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,139
    ROBYER1 and Alexis-Dev like this.
  26. Alexis-Dev

    Alexis-Dev

    Joined:
    Apr 16, 2019
    Posts:
    121
  27. shacharoz

    shacharoz

    Joined:
    Jul 11, 2013
    Posts:
    98
    hi guys,
    thank you for the wonderful work.

    I'm interested in making a try-on simulator and place a standard eye glasses over the head. we can even think about a necklace or anything similar of some sort.
    i cant seem to manage to do so in an easy way, since I do not know the position and size of the virtual face.
    it is easy to create a new material for the face, but when I want to add a 3d object attached to a face joint, this is not the same.

    do we already have such a solution?
    if not, what do I need to do?

    thanks
     
  28. mfuad

    mfuad

    Unity Technologies

    Joined:
    Jun 12, 2018
    Posts:
    335
    Yeah that's pretty hard to do. ARKit can tell you where the eyes are, but not ARCore. It's generally pretty difficult to create "try on" apps using them.
     
  29. mfuad

    mfuad

    Unity Technologies

    Joined:
    Jun 12, 2018
    Posts:
    335
    Going to close this now outdated thread. If you have any additional questions/issues, feel free to post a new thread in the AR section of our forums and we'll be happy to take a look. Cheers!
     
Thread Status:
Not open for further replies.