Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice
  2. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

[SOLVED] Unity 5.5.1f1 + GVR 1.30 + vuforia 6.2.10: Cardboard UI missing + Camera view stretched

Discussion in 'AR/VR (XR) Discussion' started by AM-Dev, Mar 14, 2017.

  1. AM-Dev

    AM-Dev

    Joined:
    Aug 5, 2015
    Posts:
    31
    Hello fellow VR devs,

    I've got an issue on iOS when using the above mentioned combination. I posted earlier in the vuforia forum. However, I know that it can take some time or forever to get an answer there.

    Please have a look at the topic here:
    https://developer.vuforia.com/forum...10-cardboard-ui-missing-camera-view-stretched

    So the first test project with Unity and GVR works fine. When adding vuforia into the mix, the UI is missing and the camera is incorrect.

    Thanks

    EDIT:
    Some more details / conversation in this thread: https://forum.unity3d.com/threads/google-vr-sdk-1-10-unity-5-5-broken.445323/page-2#post-2994078
     
    Last edited: Mar 15, 2017
  2. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    213
    I'm using Unity5.5.2f1 now, but I remember that there weren't any problem with 5.1.1f1 either.

    I read the comment you wrote on Vuforia portal that you are using Vuforia with integrated GVR. I'm not sure about that so I'll make a guess. In GVR a class 'Profile.cs' contains the default viewer profile values. Maybe that's the cause of stretched image I guess? Or, your device wrongly returns the screen sizes or something that make GVR calculate wrong values. I'm not sure
     
  3. AM-Dev

    AM-Dev

    Joined:
    Aug 5, 2015
    Posts:
    31
    Ok, but with "integrated GVR" I meant that this is somehow in vuforia included. The info is from here:
    https://library.vuforia.com/articles/Solution/Integrating-Cardboard-to-the-ARVR-Sample
    "Vuforia 5.5 introduces built-in support for Cardboard / Google VR..."

    "I'm using GVR 1.10 + Vuforia 6.2.10
    I don't have any issue with a fresh project with those SDKs. Cardboard UIs are visible and interactable with Vuforia."
    So you said you're using vuforia 6.2.10. Then this is the same situation. But again, I'm just importing vuforia into my project and the problems appear. So strange...
    Are you really sure that the view is correct in a fresh project? I mean the distortion looks similar, but it's not correct on the second image:
    https://developer.vuforia.com/sites/default/files/unity-551-gvr-1.10-notes.jpg
    https://developer.vuforia.com/sites/default/files/unity-551-gvr-1.10-vuforia-6.2.10-notes.jpg

    Again, thanks for your feedback!
    I'm trying another clean project with Unity 5.4.x, because they mention it's tested with that version and gvr 1.10:
    "Vuforia has been tested with the following Unity and Cardboard versions:
    • Unity versions 5.4.x ....
    • Google VR for Unity SDK versions 0.8.x, 0.9.x, 1.0.x, 1.10.0"
     
  4. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    213
    I don't think so... I think the built-in support for cardboard means that vuforia renders stereo images to specific viewer profile, not the entire cardboard abilities. (Am iI wrong?!)

    And the viwer profiles are correct. I have daydream, View-Master, Mi vr, Baofeng Mojing 3/4, Gear VR, some Google's Cardboard2014 and some crappy 3rd party cardboards, etc.... the profile was correct.
     
  5. AM-Dev

    AM-Dev

    Joined:
    Aug 5, 2015
    Posts:
    31
  6. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    213
    Wow, That's strange. The thing you've found is in fact the thing I've missed. But the thing is, my integration works fine on a fresh project, and the current project also had no issue before...
    anyway, I'll try your method and see if that helps. Thanks, and good for you

    ----------
    Nope, I already deleted that file. Maybe I'll have to find another causes... OTL
     
    Last edited: Mar 15, 2017
  7. AM-Dev

    AM-Dev

    Joined:
    Aug 5, 2015
    Posts:
    31
  8. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    213
    No, Cardboard's native UIs are missing. That's the cause of all this mess. Arrgh!
    Good for you that your problems are solved. Have a great day!
     
  9. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    213
    Wow, finally nailed the issue. I'm using a custom CameraImageAccess.cs script. It registers vuforia pixel format when the camera is initialized, and attaching the script causes UI to disappear. I'll see what I can do. :)
     
    AM-Dev likes this.
  10. NGC6543

    NGC6543

    Joined:
    Jun 3, 2015
    Posts:
    213
    PLEASE BE HAPPY WITH ME!! Finally solved the problem.
    It turned out that the problem was caused by OpenCVForUnity SDK.
    I commented out everything in OpenCVForUnityAppController.mm and everything went back to normal!! It looks that OpenCV somehow switches GraphicsDevice and GVR couldn't figure out what device this is so draws default viewer instead.
    Wow!
     
    AM-Dev likes this.
unityunity