Search Unity

Resolved ARfoundation 4+UWRP7.3+Unity2019.4 not working(black screen and no tracking)

Discussion in 'AR' started by jinC_H, Jun 19, 2020.

  1. jinC_H

    jinC_H

    Joined:
    Aug 29, 2017
    Posts:
    12
    as the title
    I got the forward render pipeline setting correct
    -create custom forward render data
    -add ar render data to UniversalRenderPipleineAssts
    then I build the game, it shows a black screen, then I put a box in the screen, and build again the box looks like static, if the tracking works at least I should see a box located in the real 3D world, so I guess the tracking also stops working, and I noticed this:
    Captureeee.PNG

    it was working with Unity2019.3+ARfoundation 3.0, since unity released the new version, I want to update some of my old projects....but not sure did I made any mistake with new version??
     
  2. dstry

    dstry

    Joined:
    Jun 8, 2020
    Posts:
    2
    I have exactly the same issue, black screen no matter what and objects placed in space, the phone only track left/right movements and rotations, but no Z+ or Z- movement.
    At least it this is what look like, because the screen, except the objects, is totally black so I can only imagine what's going on.

    This issue only happen if the project is URP, if project is 3D everything works correctly
    ( sorry I'm a noob, I hope I explained myself )
     
    Last edited: Jun 19, 2020
  3. dstry

    dstry

    Joined:
    Jun 8, 2020
    Posts:
    2
    ok I'm an idiot, this was only because I positioned the objects too far away from the camera :)

    still no luck with the black screen....
     
  4. ms02

    ms02

    Joined:
    Jun 8, 2020
    Posts:
    3
    I’m also having the same issue. Haven’t been able to pinpoint the exact reason what’s causing the issue though!
     
  5. Harald_Heide

    Harald_Heide

    Joined:
    Jul 22, 2015
    Posts:
    81
    Looks like I'm stuck with Unity 3D project until this gets fixed for URP. (hate to downgrade..)
     
  6. Harald_Heide

    Harald_Heide

    Joined:
    Jul 22, 2015
    Posts:
    81
  7. Harald_Heide

    Harald_Heide

    Joined:
    Jul 22, 2015
    Posts:
    81
    If you already got an URP proj find the file ForwardRenderer in Settings directory in your project folder. In the Inspector go to Renderer features and add new Renderer Features. (you have arrived at your destination :) ) Unity URP 2019.4.4f1 ARFoundation 3.1.3 works at least
     
    Last edited: Jul 18, 2020
  8. UUUPA

    UUUPA

    Joined:
    Nov 7, 2017
    Posts:
    1
    My case. Camera does not start on iPad. The screen is black out.
    - Unity 2020.1.6f1
    - ARFoundation4.1.0 preview.9
    - URP 8.2.0
    After that, I remove ARFoundation 4.1 and import 3.1.5 in the same project, the camera works.
     
  9. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,142
    Here are all steps needed to set up AR Foundation with Universal Render Pipeline (URP):
    1. Set 'Universal Render Pipeline Asset' to 'Project Settings/Graphics/Scriptable Render Pipeline Settings'.
      01-06-2022 18-30-48.jpg
    2. Check that the 'Project Settings/Graphics/URP Global Settings' reference is set.
      01-06-2022 18-32-50.jpg
    3. Add 'AR Background Renderer Feature'.
      01-06-2022 18-35-13.jpg
    4. And the very important, but not an obvious part. Set a ''Project Settings/Quality/Render Pipeline Asset' for the default quality level (marked as green) to ALL platforms you intend to use with AR Foundation.
      01-06-2022 18-37-21.jpg
     
    Last edited: Jun 1, 2022
  10. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    587
    I have been getting this too, always intermittently or after building or resetting my library.

    FINALLY, I believe I have tracked it down to making sure the 'Rendering' is set in all of the 'Quality' levels. Like in the image above, the Medium quality needs to be selected 'grey' and the URP is set to the Pipeline Renderering Asset.

    Almost all of the instructions show using the GRAPHICS tab only to set up the Pipeline Asset. My assumption would be that the Quality would default to what's in the GRAPHICS tab if it's null.
     
    Christin2015 and KyryloKuzyk like this.
  11. jeremiespoken

    jeremiespoken

    Joined:
    Feb 25, 2017
    Posts:
    9
    The images have been removed :( anyone else have these in hand?
     
  12. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    Christin2015 and jeremiespoken like this.
  13. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,142
    I updated the answer with images. It turns out, that the Unity Forum doesn't preserve images forever.
     
  14. tjmaul

    tjmaul

    Joined:
    Aug 29, 2018
    Posts:
    467
    Sorry to dig this up, but I'm still having trouble making URP and AR Foundation work. I'm on Editor 2022.1.3f1, AR Foundation 4.2.3. I created a project using the AR (Core) Template and just using that, the sample scene shows the camera background and detects planes as it should on an actual iOS device.

    I then installed Universal RP (13.1.8), created a pipeline asset, added the ARBackgroundRendererFeature and followed the steps as described in https://docs.unity3d.com/Packages/c...ckground-with-scriptable-render-pipeline.html and inside this thread.

    The issue:
    After recompiling and installing on my device, the background is black. Detected Planes (shown as dotted transparent meshes) do work and respond to the devices movements.

    Can somebody verify this?
     
    unity_f3ChGAWJmJzIXQ likes this.
  15. tjmaul

    tjmaul

    Joined:
    Aug 29, 2018
    Posts:
    467
    I just tried using the latest LTS version (2021.3.4f1) and those exact steps do work with URP.
     
  16. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    587
    I'm having this problem too with 2022.1.4f1 and AR Foundation 5.0.0-pre.12. I don't really want to downgrade the project, it's fairly complex. Unfortunately, 2022 won't let me downgrade AR Foundation to 4.2.3 to test if that would work, so I assume this won't work until AR Foundation Remote is updated.

    @KirillKuzyk will you be updating AR Foundation Remote soon to work with 2022 and URP?
     
  17. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,142
    If you used AR Foundation 4.2.3 on your computer before, you can find the package in a Unity cache folder. For example, on mac cache is located here:
    /Users/username/Library/Unity/cache/packages/packages.unity.com/com.unity.xr.arfoundation@4.2.3
    Then, you can install the package by pressing 'Package Manager/Install package from disk' and selecting the package.json file.

    Other people complained that camera video doesn't work in a real build, not in the Editor. Does camera video work fine for you in a real build with Unity 2022 and URP? If it's not, then it will also not work with the AR Foundation Remote plugin. The 'replicates real AR device behavior in Editor' part of the plugin comes into play here :)
     
  18. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    587
    Thanks for the quick response. I did not try a real build with AR Foundation 5.0, but it's good to know your plugin is replicating actual device beahvior.

    I probably do have 4.2.3 elsewhere, but I was able to remove the 'fixed' AR Foundation 5.0 library after removing the ARKit and ARCore packages first. Then I could use the Package Manager to install 4.2.3. But, unfortunately I still have a black screen. The plane recognition works fine, just no background renderer.

    I did build this version, with 4.2.3 to the iPhone and it is indeed black in the build as well. Therefore, it must be a 2022.1 problem or a URP problem. I'm using URP 13.1.8 release version and I see no option to downgrade to test another URP version. I've carefully gone through the setup steps and cannot get anything but the black screen, with working planes, etc.
     
    KyryloKuzyk likes this.
  19. unity_f3ChGAWJmJzIXQ

    unity_f3ChGAWJmJzIXQ

    Joined:
    Oct 25, 2021
    Posts:
    1
    i also meet this problem, are you resloved?
     
  20. tjmaul

    tjmaul

    Joined:
    Aug 29, 2018
    Posts:
    467
    For now, you should use the latest LTS version of unity and the corresponding packages of if you can. Sorry, I don’t have any advice if you’re on 2022 with the latest packages
     
  21. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    587
    I submitted a bug report and its a confirmed bug. Use the latest LTS version is the only fix I know of.
     
  22. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    @Voronoi can you post the bug number that you are referencing?
     
  23. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    587
    Here is what I have - A bug report has been created with internal ID: UUM-7995
     
    andyb-unity likes this.
  24. tom_opuscope

    tom_opuscope

    Joined:
    Apr 27, 2020
    Posts:
    1
    Any news on this issue ?
     
  25. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    Last edited: Sep 20, 2022
    KyryloKuzyk likes this.
  26. Christin2015

    Christin2015

    Joined:
    Dec 1, 2015
    Posts:
    48
    Hi, Has this black screen bug been fixed in 2022.1.20 and 2022.2.0b10? I still see the black screen with URP 13.1.8.

    What I have done so far: Added the ARBackgroundRendererFeature to the RP Renderer asset, set in the Project Settings/Graphics my URP asset , checked if the AR cam renderer is set to that URP asset.
     
  27. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    Last edited: Nov 26, 2022
  28. BenoitFR

    BenoitFR

    Joined:
    Jul 13, 2016
    Posts:
    5
    @andyb-unity Your last link seems to be broken, I'm having the same issue said above and I believe to have applied every fixes suggested except for the setting the ARCameraManager's render mode to "After Opage" as this field doesn't appear on the component.
    I'm using Unity 2022.1.15f1 and ARCore 4.2.7
     
  29. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    N04H08 likes this.
  30. darinakoychevasz

    darinakoychevasz

    Joined:
    Mar 3, 2022
    Posts:
    1
    This has saved me, thank you! This should be in the official documentation.
     
    KyryloKuzyk likes this.
  31. Marks4

    Marks4

    Joined:
    Feb 25, 2018
    Posts:
    547
    You sir deserve a prize. Thank you for explaining what Unity didn't, specially step 4...
     
    KyryloKuzyk likes this.
  32. Drosph

    Drosph

    Joined:
    Oct 20, 2023
    Posts:
    3
    I had also this issue, and FINALLY found the solution which fixed it for me: Go to your Camera -> Environment -> and set "Background type" to "uninitialized".
     
    G0ldenRage and KyryloKuzyk like this.
  33. arsn_dev_labs

    arsn_dev_labs

    Joined:
    Aug 4, 2018
    Posts:
    4
    Yo, mad respect to this post! This needs to be added to the documentation ASAP! Confirmed with the following:
    Unity 2022.3.13f1
    AR Foundation 5.1.2
    URP 14.0.9
     
    KyryloKuzyk likes this.
  34. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    We are unable to reproduce this step as required. We are able to convert our projects to URP without doing this step, but I'm glad it helped you! In our experience this is only necessary if your project starts from the URP Template, which has non-default quality level settings.