Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

ARFoundation 3.1.0 and URP 7.1.5 - Black Camera Feed (but can see 3D objects)

Discussion in 'AR' started by newguy123, Nov 29, 2019.

  1. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,209
    Hi all

    I'm running 2019.3.0b12 and URP 7.1.5

    On a new blank project with only a single cube added to the scene and going through creating the ARFoundation URP Asset Pipeline etc, I get a black camera feed when running the project
    I can see the cube fine, but the background is totally black

    Tried with
    Samsung S7 (Android8)
    Samsung A30 (Android9)

    Same result, black background on both phones

    The ARF Samples run fine and any non URP project I create. As soon as you switch and enable URP however, this black background :-(
     
  2. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,209
  3. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,209
  4. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,209
    For the Quality setting however, its not clear if the URP Asset should be default, or also set to the one I created for ARFoundation:

    upload_2019-11-29_18-10-55.png
     
  5. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,209
    Also tried with 2019.3.0f1 and URP 7.1.6

    :-(
    But same thing. Cam feed is black
    :-(
     
  6. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,209
    Updating to 2020.1.0a14 makes no difference
    :-(
     
  7. Creepbee

    Creepbee

    Joined:
    May 1, 2019
    Posts:
    4
    I have the same problem, its so frustrating...
     
  8. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    539
  9. 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 ;)
     
  10. Cec

    Cec

    Joined:
    Apr 7, 2014
    Posts:
    90
    Hi,
    Your solution simply disable the SRP for the medium quality settings (and by the way use the legacy renderer). That's why the camera feed is working that way.

    But Unity indicates a solution in the ARfoundation manual to use URP with ARFoundation and fix camera feed.
    Hope it helps.