Log in or register to post comments

Questions of Integrating Cardboard to the AR/VR

November 29, 2015 - 6:57am #1

HI all,

I'm trying to integrating cardboard to the AR/VR following this 'How To':

 
I have latest Unity, Xcode,Cardboard SDK, and run the app on iPhone 6 plus of iOS9.1. Here are some questions:
 
1. The lens area for both left and right eye are so narrow, I tried to checked 'Disable Mattes' for the HideExcessAreaBehaviour script attached to the Cardboard Left and Right camera and also disabled Skew Frustum for the ARCamera, but there is no effect. so how to increase the area? (see attachment 1.PNG )
 
2. How to remove the back-arrow on the top left of the screen?
 
3. when I click the 'Settings' and back to camera, the lens area became confused everytime. so how to fix it? (see attachment 2.PNG & 3.PNG)
 
 
 
Thanks.
AttachmentSize
Image icon 1.PNG163.33 KB
Image icon 2.PNG15.35 KB
Image icon 3.PNG194.92 KB

Questions of Integrating Cardboard to the AR/VR

April 8, 2016 - 7:52am #8

I still can not make video playback in Mixed Reality sample, could someone show some demo to me?  please.

Questions of Integrating Cardboard to the AR/VR

December 16, 2015 - 10:59pm #7

Anyone can share some code about "how to start playing video in the AR/VR integrated environment " ?

 

Thanks!

Questions of Integrating Cardboard to the AR/VR

December 5, 2015 - 3:05am #6
And one more question:
How can I set a button to switch between AR/VR Integrating environment and normal AR (turn off cardboard and VR) in that example? and code samples?
 
Thanks!

Questions of Integrating Cardboard to the AR/VR

December 5, 2015 - 3:05am #5
Thanks AlessandroB,
I'm learning Unity now, and code is difficult to me at present. I checked GazeRay.cs, maybe I can play video like this? there are many scripts about videoplayback, I have no idea how to call play function.
if (Physics.Raycast(cameraGaze, out hit)) {
    if (hit.collider.name=="Video") {
        //trigger video play funciton here?
    }
}

 

 

Questions of Integrating Cardboard to the AR/VR

November 30, 2015 - 8:17am #4

The Video Playback sample allows the user to start a video by touching the screen at a location that intercepts the video mesh rectangle;

this is done in the sample code by casting a ray from the camera (viewer) into the 3D scene along the direction of the vector defined by the touch location on the screen; the sample code uses standard Unity ray picking API.

In a Cardboard setup however you won't be able to use the screen touch, cause the device is inside the viewer; in this case you need to define a suitable strategy for your user experience;

for example, you could use a "gaze pointer" similar to the one used in the AR-VR sample; when you look at the video rectangle and the pointer is hovering it, you can trigger the video playback;   the AR-VR sample code shows how to trigger an event when the "VR" notice (the 3d label) is intersected by the gaze ray; see the GazeRay.cs script in the sample code;  you would need to adjust that code to start the video, instead of triggering the transition from AR to VR (for example)

 

Questions of Integrating Cardboard to the AR/VR

November 30, 2015 - 8:06am #3
Thank you for your patience replay, I understand very clearly about q1 now. 
 
For q2&q3, I just close 'Setting Button' and 'Back Button' and it OK now.
 
But q4, I can't make the video play, In the official 'VideoPlayback Example' I can touch the play buttom on video to play, but in the AR/VR Integrating environment, I don't konw how. even I selected 'Auto Play' on 'Video', it wouldn't auto play. any suggestion ?
 
And one more question:
How can I set a button to switch between AR/VR Integrating environment and normal AR environment in that example? and code samples?
 
Thanks!
 
 
AttachmentSize
Image icon video.PNG191.65 KB

Questions of Integrating Cardboard to the AR/VR

November 30, 2015 - 12:06am #2

The lens area for both left and right eye are so narrow,... 

1. As discussed already in other threads in this Forum, the eye viewports with the AR video background are smaller than the available screen area because the field of view angle of the device camera (and so the width of the video background rectangle) is smaller than the field of view used by Cardboard ( a typical device camera field of view can be in the range 50 to 60 degrees, whereas Cardboard field of view is set to about 80 degrees).

So, the AR rectangle can only cover a subregion of the entire view; note that forcing the video background to cover the entire screen would result in a magnified ("zoomed") and stretched view with respect to what the real device camera is seeing and would lead to inconsistent visual experiences.

So, what you see (shown in your screenshot 1.PNG) is the expected result. When you wear th cardboard viewer, the visual experience should be correct, despite the viewports being smaller than the screen.

 

How to remove the back-arrow on the top left of the screen?

2. The back arrow at the top of the screen is simply controlled by a Cardboard setting, which you can toggle ON and OFF, which you can find in the Inspector of the CardboardMain.

 

 when I click the 'Settings' and back to camera...

3. The Cardboard Vuforia integration guide provides a section "Additional code changes to handle the Cardboard settings Dialog on iOS"; note that the instructions refer to the Cardboard version 0.5.0

 

Is it possiale to add VideoPlayback on a ImageTarget under this AR/VR Integrating environment, and use VRButton to play it?

4. Yes, you can reuse some of the code from the Video Playback sample and create an App that does that; as far as I can tell, there's nothing that should prevent you from achieving it

 

Log in or register to post comments