Log in or register to post comments

Missing cardboard back button, alignment marker, and settings ic

March 20, 2016 - 11:52am #1

Hello,

My app integrateds cardboard 0.6 sdk and vuforia 5.5. I am using unity 5.3.1. Device is nexus 6p. Everything seems to work correctly (tracking, vr, etc).

However, I cannot get the default cardboard vr back button, settings icon, and center alignment line to show up. These cardboard elements appear in an eariler version of my app using cardboard 0.5.2 and the previous vuforia version.

UI layer settings pertaining to these icons in the cardboard script has been checked and their are no console errors. I understand that vuforia 5.5 can be used independently of cardboard but for my case I need to maintain the traditional integration. Please view the attachments.

Would anyway be able to help? Am I missing a setting? Thanks in advance.

 

 

 

 

AttachmentSize
Image icon Screenshot_20160320-144600.png513.3 KB
Image icon UI.PNG4.09 KB

[My solution] Missing cardboard back button, alignment marker, and settings ic

March 15, 2017 - 6:04am #10

Hi guys,

I had this issue on iOS only. Here's my thread with the solution:

https://developer.vuforia.com/forum/unity-extension-technical-discussion/unity-551f1-gvr-130-vuforia-6210-cardboard-ui-missing-camera-view-stretched#comment-58315

I hope this helps some people coming from google searches.

Cheers

Missing cardboard back button, alignment marker, and settings ic

December 12, 2016 - 4:36pm #9

I have the same issue on Android. Can someone from Vuforia comment on this?

Missing cardboard back button, alignment marker, and settings ic

November 20, 2016 - 9:23pm #8

hello.......guys.......i have same problem 

any luck with this, help me if you solved  this problem , i was asked this question in forum

https://developer.vuforia.com/forum/ios/cardboard-ui-layer-missing-when-importing-vuforia

Missing cardboard back button, alignment marker, and settings ic

April 26, 2016 - 12:20pm #7

I'm having what seems to be the exact same issue, but on iOS.  A project with just cardboard (v 0.6.0) shows the settings button & alignment marker, but as soon as I add and integrate the latest Vuforia SDK (5.5.9), I can't get them to appear.

Anyone else have any solutions?

Missing cardboard back button, alignment marker, and settings ic

April 1, 2016 - 9:10am #6

Yes, I'm using cardboard 0.6.0. My code for that function matches yours as well. I will try cleaning/reimporting cardboard sdk. The strange thing is that I duplicated this project with everything the same using 0.6.0 but deleted any vuforia integration and the cardboard elements show up correctly.

Missing cardboard back button, alignment marker, and settings ic

April 1, 2016 - 7:14am #5

Are you using Cardboard 0.6.0?

This is the complete UpdateStereoValue() function in my test project (which works), could you compare with yours?

(note the Vuforia.VuforiaBehaviour.Instance.ApplyCorrectedProjectionMatrix line of code right at the end of the function):

 

public void UpdateStereoValues() {
    Matrix4x4 proj = Cardboard.SDK.Projection(eye);
    realProj = Cardboard.SDK.Projection(eye, Cardboard.Distortion.Undistorted);

    CopyCameraAndMakeSideBySide(controller, proj[0, 2], proj[1, 2]);

    // Fix aspect ratio and near/far clipping planes.
    FixProjection(ref proj);
    FixProjection(ref realProj);

    // Zoom the stereo cameras if requested.
    float lerp = Mathf.Clamp01(controller.matchByZoom) * Mathf.Clamp01(controller.matchMonoFOV);
    // Lerping the reciprocal of proj(1,1), so zoom is linear in frustum height not the depth.
    float monoProj11 = monoCamera.projectionMatrix[1, 1];
    float zoom = 1 / Mathf.Lerp(1 / proj[1, 1], 1 / monoProj11, lerp) / proj[1, 1];
    proj[0, 0] *= zoom;
    proj[1, 1] *= zoom;

    // Set the eye camera's projection for rendering.
    cam.projectionMatrix = proj;
    if (Application.isEditor) {
      // So you can see the approximate frustum in the Scene view when the camera is selected.
      cam.fieldOfView = 2 * Mathf.Atan(1 / proj[1, 1]) * Mathf.Rad2Deg;
    }

    // Draw to the mono camera's target, or the stereo screen.
    cam.targetTexture = monoCamera.targetTexture ?? Cardboard.SDK.StereoScreen;
    if (cam.targetTexture == null) {
      // When drawing straight to screen, account for lens FOV limits.
      // Note: do this after all calls to FixProjection() which needs the unfixed rect.
      cam.rect = FixViewport(cam.rect);
    }

    Vuforia.VuforiaBehaviour.Instance.ApplyCorrectedProjectionMatrix(proj, eye == Cardboard.Eye.Left);
  }

 

 

Missing cardboard back button, alignment marker, and settings ic

March 31, 2016 - 10:30am #4

Thank you for your reply. In Unity 5.3.1 32 bit editor if I have

Vuforia.VuforiaBehaviour.Instance.ApplyCorrectedProjectionMatrix(proj, eye == Cardboard.Eye.Left);

at the end of UpdateStereoValues() it shows black screen in the unity editor but with settings icon and alignment line. 
It displays the world content in editor if I put this line in SetupStereo() after var fixProj = cam.cameraToWorldMatrix ... 

Missing cardboard back button, alignment marker, and settings ic

March 31, 2016 - 12:35am #3

The alignment line, settings button and back button can be enabled/disabled in the inspector of the CardboardMain prefab; these are not handled by Vuforia.

Make sure you have only 1 (one) instance of CardboardMain in the scene (and if you have any additional Cardboard or CardboardMain game object in the scene, remove them).

You may also want to check the latest version of the Cardboard-Vuforia integration guide, which includes updates for Vuforia 5.5.9 and Cardboard SDK versions from 0.5.0 to 0.6.0 included:

https://developer.vuforia.com/library/articles/Solution/Integrating-Cardboard-to-the-ARVR-Sample

 

 

Missing cardboard back button, alignment marker, and settings ic

March 21, 2016 - 7:34pm #2

Anyone? Perhaps the moderator can briefly chime in on this?

Log in or register to post comments