Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Android Camera not rendering

Discussion in 'Vuforia' started by skantron, Oct 1, 2019.

  1. skantron

    skantron

    Joined:
    May 5, 2011
    Posts:
    33
    I am trying to get started with Vuforia, and while the simple scene (AR camera, ImageTarget, and a Cube) I made renders like I expect on Windows (Cube tracked on webcam background) on Android, I get a black screen background, but I do get the Cube, but the background is black. Is there a setting I am missing to get the camera feed background? thanks.
     
  2. skantron

    skantron

    Joined:
    May 5, 2011
    Posts:
    33
    Could this be a device specific problem, (Pixel 2XL) or something in how I am building the project? Any help would be appreciated.
     
  3. Sika_MC

    Sika_MC

    Vuforia

    Joined:
    Jul 17, 2019
    Posts:
    34
    Hi @skantron, Please make sure you have - Enable Video Background checked in the Vuforia Settings. If this is checked, please let me know what Vuforia SDK and Unity version are you using? Thank you. Vuforia Engine Support
     
  4. skantron

    skantron

    Joined:
    May 5, 2011
    Posts:
    33
    I do have it enabled, here are the settings (everything is basically default, just the AR camera and Image Target and a cube.
    upload_2019-10-4_15-33-0.png
    I am using a Pixel 2XL device, and my settings are
    2018.2.18f1 unity and
    8.0.10

    Thanks, I appreciate the help.
     
  5. Sika_MC

    Sika_MC

    Vuforia

    Joined:
    Jul 17, 2019
    Posts:
    34
    Hi @skantron

    I don't have a Pixel 2XL to test the behavior. Could you please start the application and provide a logcat dump?
    $ adb logcat AR:D Unity:D *:S

    Thank you.
    Vuforia Engine Support
     
  6. skantron

    skantron

    Joined:
    May 5, 2011
    Posts:
    33
    THanks, heres what I got,
     
  7. Sika_MC

    Sika_MC

    Vuforia

    Joined:
    Jul 17, 2019
    Posts:
    34
    Hi @skantron Thank you for the logs. I see following error that might be related:
    RenderManager: Could not retrieve a valid GLSurfaceView in view hierarchy, therefore cannot set any render mode

    There might be an issue with the graphics settings, or a device issue.

    Could you select OPenGLES2 when building the app? ( Player settings-> Other Settings-> Uncheck AutoGraphics APIs and remove Vulkan GLES3 and leave only OpenGLES2)

    Thank you.
    Vuforia Engine Support
     
  8. skantron

    skantron

    Joined:
    May 5, 2011
    Posts:
    33
    When I ran with OPenGLES2, I think it just crashed. I got a black screen and no cube rendering. The log is as follows.

    Maybe there is something incorrect in the scene? I had just made a simple scene with an ARcamera, deleted the main camera, and added an image target. Is there something else I should be setting up for vuforia to work in android? If I make a simple scene without vuforia it works OK and renders, but I have not used the phone camera before.