Search Unity

  1. Are you interested in providing feedback directly to Unity teams? Sign up to become a member of Unity Pulse, our new product feedback and research community.
    Dismiss Notice
  2. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Unity Configuring AR Foundation 3.0.0-preview to work with LWRP or URP

Discussion in 'AR' started by todds_unity, Aug 29, 2019.

  1. Gerray2

    Gerray2

    Joined:
    Apr 24, 2018
    Posts:
    13
    I had the same issue and solved it by upgrading to:
    ARFoundation 3.0.1
    AR Core XR Plugin 3.0.1
    ARKit XR Plugin 3.0.1

    !! AR Core and ARKit did not upgrade themselves together with ARFoundation. You will notice, because the console shows 200 error notifications.
     
  2. todds_unity

    todds_unity

    Unity Technologies

    Joined:
    Aug 1, 2018
    Posts:
    171
    The 7.1.x versions of Universal Render Pipelines introduced a Camera > Rendering > Post Processing field.
    unity-camera-urp-post-processing-2019-12-17.png
    With this Post Processing property enabled, ARFoundation background rendering breaks on iOS devices. This breakage should not be affecting Android devices.

    We do have a fix that will enable background rendering to operate on iOS devices when this URP camera post-processing is enabled. This fix will be in the next ARFoundation preview release that is forthcoming.

    Todd
     
  3. AkilliMum

    AkilliMum

    Joined:
    Dec 6, 2014
    Posts:
    91
    Hi guys,
    I updated my standardRP project to 2019.3 URP and simple touch and place script stopped working. So i debugged the script and find out that Camera.current was null!
    so
    Code (CSharp):
    1. var screenCenter = Camera.current.ViewportToScreenPoint(new Vector3(0.5f, 0.5f));
    was not working, so i created a public cam variable and set the cam by hand on editor, then everything is worked as expected.
    So if you have that kind of problem hope that helps you.
     
  4. andrewlaboy

    andrewlaboy

    Joined:
    Sep 23, 2016
    Posts:
    3
    Hi Todd,

    My stencil shader is no longer working after installing LWRP into my Standard pipeline project. I know its configured properly because I was getting black screen on camera, but after reading these notes that's been fixed. Unity 2019.2.19f1, ARFoundation 3.1.0 preview 4, LWRP 6.9.2. No other changes were made. Reverted the project back to 2019.2.12f1. Same thing.
     
  5. todds_unity

    todds_unity

    Unity Technologies

    Joined:
    Aug 1, 2018
    Posts:
    171
    I do not know what your issue would be with a stencil shader with LWRP.

    That question would be better addressed to the Universal Render Pipeline forum.
     
  6. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    394
    I'm still getting a black background, even following the instructions on the newer ARFoundations with URP pipeline instructions page. This is on IOS, with:
    • ARFoundation 3.1.0
    • ARKit 3.1.0
    • URP 7.1.8
    I'm trying to use the VFX Graph and so must use URP. The graph particles show up, and move as if everything is working, but without the background. No errors in the Xcode console.

    In the past, I had to change the cameras background renderer to Custom, and select a specific background. That's not in the instructions anymore, am I missing something here?
     
  7. enslaved2die

    enslaved2die

    Joined:
    Aug 13, 2017
    Posts:
    23
    soorya696 and Voronoi like this.
  8. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    394
    Thank you! I was able to get your samples running right away. I tried to have your working project open and match all of the settings in my project and for the life of me could not see what was different and not working in mine. I ended up just deleting the Assets, Packages and Project Settings from my project and copying yours into it. Then, I installed the VFX package, re-imported the VFX Graph I had already built and it works.

    On the positive side, I love the quality of the latest ARFoundation on my iPhone 11. The background video is the smoothest and clearest I remember seeing from many past experiences, it just looks perfect. And, it does not seem taxing at all for the phone.

    The downside is just trying to get these configurations correct from version to version. I started this project a while ago, did some other work and simply wanted to upgrade to the latest 2019.3. Nothing seemed to transfer and rebuilding from scratch did not work given the instructions that I had to hunt down. Partial instructions in the VFX documentation, a partial instruction at the top of this thread, with new details and a new link to documentation, all of which takes a tremendous amount of time to track down. As anyone doing AR knows, the iteration, build times are a given, but having to do multiple builds to test the nuances of configuration is just frustrating and takes so much time![/QUOTE]
     
    enslaved2die likes this.
  9. yugich

    yugich

    Joined:
    Apr 17, 2015
    Posts:
    3
    You need download v3.+, if you click in arrow beside ARFoundation you find v3, just update AR Foundation and ARCore and ARKit
     
  10. Creepbee

    Creepbee

    Joined:
    May 1, 2019
    Posts:
    4
    A solution for the black camera background

    Unity Version 2019.3.1f

    1. Create a new Universal Template Project
    2. Install AR Foundation (3.1.0 Preview 4) / ARCore XR Plugin (3.1.0 Preview 4)
    3. Build Settings -> Switch Platform to Android
    4. Project Settings / Player -> Remove Vulkan from Graphics API
    5. Project Settings / Player -> Set Minimum API Level to 24
    6. Create a Folder "Rendering"
    7. Add a UniversalRenderPipline Asset
    8. On the URP Asset Renderer -> Add a Renderer Features -> NewARBackgroundRenderFeature to the Asset
    9 Project Settings / Graphics change the Render Pipline to the newly created
    10. Create a new Scene
    11. Delete Main Camera
    12. Add a Cube
    13. Add AR Session
    14. Add AR Session Origin
    -----> Build and Run -> Black Camera Background

    Final Step: Under Quality set the Level to Medium and set the Rendering to None (Render Pipeline Asset)
    -----> Camera Works

    I don't say i understand why this is the case but for me it worked ;)
     
  11. ichabodcole

    ichabodcole

    Joined:
    Aug 23, 2014
    Posts:
    3
    Attempting to use the UPT on android (pixel 3), but having an issue where the camera does not auto focus, any idea if this is a bug or I am just missing something? I have updated to using the 3.1.0 preview packages for ARFoundation, ARSubsystems, and ARCore, and added the ARBackgroundRendererFeature. I also tested using the SimpleAR scene from the ARFoundation samples repo, and had the same issue.

    Note: If I log out the value of the ARCameraManager.focusMode it does return "Auto". I have also attempted to explicitly set it after the app loads and the camera feed is visible, but this had no effect.

    Also, this is not an issue for me when using the built in render pipeline with the 2.x arfoundation packages.

    Windows 10
    Unity 2019.3.1f1
    Pixel 2
    Android 10

    FYI, found a github issue for this... have not found a solution yet.
    https://github.com/Unity-Technologies/arfoundation-samples/issues/389
     
    Last edited: Feb 17, 2020
  12. soorya696

    soorya696

    Joined:
    Dec 13, 2018
    Posts:
    71
    can you explain more? I'm too facing this issue.
    I'm using unity 2019.3.1f (recently migrated from 2019.1)
    ARFoundation 2.2.
    Also, ARFoundation 3.0 and Lightweight RP is not appearing in the package manager.
     
  13. ichabodcole

    ichabodcole

    Joined:
    Aug 23, 2014
    Posts:
    3
    Package setup reference images
    Screen-Shot-2020-02-17-at-2_59_44-PM.png Screen_Shot_2020-02-17_at_3_00_34_PM.png
     

    Attached Files:

  14. soorya696

    soorya696

    Joined:
    Dec 13, 2018
    Posts:
    71
    Thanks for your response.
    I already enabled the 'Show Preview Package'
    everything works well in a fresh project. I'm trying to add URP to an existing project.
     

    Attached Files:

    Last edited: Feb 18, 2020
  15. enslaved2die

    enslaved2die

    Joined:
    Aug 13, 2017
    Posts:
    23
    The Package Manager Refreshing is broken somehow.
    Close it, open it, close it, open it and then let it open in the foreground for idk some time.
    This always fixes this for me...
     
  16. soorya696

    soorya696

    Joined:
    Dec 13, 2018
    Posts:
    71
    Thanks. Now I fixed the issue. The problem is the ARFoundation version.

    1. Created a new project
    2. imported the scenes from the old project
    3. updated ARFoundation to 3.0.1
    maybe this can help someone :)
     
  17. anubishs

    anubishs

    Joined:
    Apr 8, 2019
    Posts:
    5
    I'm trying to create a blit renderer feature to run in paralel with the AR Background Renderer. Any thoughs on this? On unity the Blit runs fine, but on the AR it don't show

    Running on Unity 2019.3.0f5
    Universal Renderer Pipeline 7.1.7
    AR Foundation 3.0.0 preview 4

    upload_2020-2-18_18-25-4.png
    On unity:
    upload_2020-2-18_18-25-27.png

    On the mobile:


    If anyone can Help
     

    Attached Files:

  18. hugoH2LPK

    hugoH2LPK

    Joined:
    Jul 26, 2018
    Posts:
    5
    Has anyone had success using Image Tracking with LWRP/URP + AR Foundation?
    IDK why but even though it tracks planes faces and movement just fine, it seems to loose its capability of recognizing any image...
     
  19. knightcube

    knightcube

    Joined:
    Oct 16, 2018
    Posts:
    15

    Attached Files:

  20. soorya696

    soorya696

    Joined:
    Dec 13, 2018
    Posts:
    71
  21. anubishs

    anubishs

    Joined:
    Apr 8, 2019
    Posts:
    5


    Your reply about enabling post processing on the camera helped me too! Thanks
     
    soorya696 likes this.
  22. knightcube

    knightcube

    Joined:
    Oct 16, 2018
    Posts:
    15
    Thanks for your response.
    I have added all the three and also enabled Post Processing in my ARCamera but it still doesn't glow.
    I created another scene, added a MainCamera and enabled post processing to check whether it glows without AR i.e, in the Unity Editor. It works fine and the unicorn glows, but it does not glow in AR.
     
    Last edited: Feb 21, 2020
  23. soorya696

    soorya696

    Joined:
    Dec 13, 2018
    Posts:
    71
    have you enabled HDR in your render pipeline asset?
    Do you have multiple cameras in your scene? if so, I'm too facing the same issue. Let me know if you have any workaround to fix this.
     
    Last edited: Feb 24, 2020
  24. soorya696

    soorya696

    Joined:
    Dec 13, 2018
    Posts:
    71
  25. gwuwer-mms

    gwuwer-mms

    Joined:
    Jan 31, 2019
    Posts:
    5
    Hello,
    why can't I download AR Foundation 3.0.0 for Unity 2019.2.X?
    I currently using Unity 2019.2.21 because I want to use the "old" LWRP and not the URP but if I go to the Packages Manager I can only download AR Foundation 2.0.2 (or 2.2.0 preview) even though the AR Foundation documentation says 3.0.0 is compatible witch Unity 2019.2.X or higher.
    Thank you for helping
     
  26. knightcube

    knightcube

    Joined:
    Oct 16, 2018
    Posts:
    15

    Attached Files:

    soorya696 likes this.
  27. rogueyoshi

    rogueyoshi

    Joined:
    Sep 8, 2018
    Posts:
    13
    Check your program's camera settings. You may want to use settings which support Auto Focus and enable it.
     
  28. Modone

    Modone

    Joined:
    Feb 11, 2020
    Posts:
    1
    Hello everyone, it's normal for me to use arfoundation to publish projects to Android. However, when publishing to IOS, when the model is rotated to an angle, the black screen will be displayed, but the model will still be displayed. It seems that the camera can't get it at a certain angle, and the result is a black screen. What is the reason?
    1.jpg 2.jpg
     
unityunity