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.
  2. Dismiss Notice

AR Camera Background not showing up (ARKit 3.1.0 prev.1 + Unity URP 7.1.5)

Discussion in 'AR' started by andre-tms, Dec 4, 2019.

  1. andre-tms

    andre-tms

    Joined:
    Dec 4, 2019
    Posts:
    3
    Hello Community!

    I have setup a new project for an AR app and the problem is simple:

    I cannot see the camera image in the background.

    Specs:
    iPad Pro 11" (iOS 13.1)
    iMac (Late 2013) updated to macOS Catalina (10.15.1)
    XCode 11.2.1
    Unity 2019.3.0b12
    AR Foundation, Subsystems & ARKit XR Plugin: 3.1.0 preview.1 (since I need ObjectRecognition)

    Project settings
    :
    - Universal Render Pipeline (URP 7.1.5), RenderPipelineAsset created as described here
    - Color Space: Linear (tried also Gamma)
    - Graphics API: Metal (no auto)
    - Tried also with custom material (new material with ARKit XR Plugin contained ARKitURPBackground.shader without success (it appears magenta in the material preview)

    Scene
    (started from URP project):
    - (Disabled) Main Camera
    - Directional Light
    - Post-process Volume
    - (Disabled) Example Assets
    - AR Session
    - AR Session Origin
    - - AR Camera
    - MyModel

    Building the app in Unity & XCode succeeds, even if there are some errors like:
    "Exception: Calling TargetGuidByName with name="Unity-iPhone" is deprecated..." or s.t. similar as
    "Anti-aliasing cannot be set after RenderTexture was defined"

    At Runtime it is asking for camera access, localisation works, since I can see my model staying in place when moving the tablet.

    I tried the same setup with the Standard 3D Render Pipeline (keeping everything else) and I can see the camera image in the background.

    Does somebody have the same problem, is it just because of all the new versions or did I get somethin wrong?

    Thank you very much for your help!
     
    Linus1703 likes this.
  2. andre-tms

    andre-tms

    Joined:
    Dec 4, 2019
    Posts:
    3
    Woohoo! Funnily, it took me two days of testing before asking you and there was one last thing I tried 2 minutes after posting, which is the solution (at least for me) which I want to share here:

    In addition to setting the custom UniversalRenderPipelineAsset just in Project Settings -> Graphics, I found that in Project Settings -> Quality there is another field for a UniversalRenderPipelineAsset defaulted to the quality settings high, medium or low. I dropped the custom asset also there (see image attached) et voilá, the camera image is visible.

    Maybe somebody can elaborate on this? Is that the right way or should it work differently?

    Best, André
     

    Attached Files:

  3. lloydv

    lloydv

    Joined:
    Sep 15, 2015
    Posts:
    55
    Pavlko likes this.
  4. Dragonborn-

    Dragonborn-

    Joined:
    Jun 5, 2017
    Posts:
    2
    andre-tms
    Thank you so much, the answer you wrote helped me !!
     
  5. Pavlko

    Pavlko

    Joined:
    Dec 23, 2012
    Posts:
    9
    Totally replicated in unity 2020.1.7f1, ARFoundation 3.1.5 and ARFoundation-Samples 3.1 branch.
    You guys saved me time. I did this setup before with success so I refused to do a google search for like 1 hour, definitely I needed to. It wasn't needed like some months ago.
    Definitely ARFoundation guys need to put this steps into their manual.
     
  6. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,045
  7. weliketoparty

    weliketoparty

    Joined:
    Aug 17, 2011
    Posts:
    124
    Same problem here.
    Camera feed doesn't show on AR Kit using AR Foundation.
    In my case the issue was using URP.
    AR Foundation v 4.0.12.
    AR Kit version v 4.0.12.

    I followed @KirillKuzyk post instructions.
    In additional I changed all "Rendering" with URP reference in all the Quality Levels, not only the one used currently.
    The issue was solved.
     
    KyryloKuzyk likes this.