Log in or register to post comments

Viewport Size with Video Background

January 1, 2019 - 9:07am #1

Hi,

currently I am developing an Augmented Virtuality Application for Android using Vuforia 7.5.26 (and Unity 2018.3.0f2). So the scene takes place within a virtual environment and I am augmenting the environment by real world objects. Furthermore, my Phone is a Google Pixel 2 XL. In the Player Settings, the Vuforia SDK is chosen. In the Digital Eyewear Configuration, I have chosen Phone + Viewer as Device Type and Cardboard v1 (Google) as Viewer Type. The Video Background is enabled.

 

Here is my problem: The viewport size is too small which reduces the immersion when wearing the headset (since there will be a visible black frame around the rendered content). I attached a screenshot named 'viewport_small.png' for demonstration. When I disable the Video Background (by removing the corresponding tick in the Vuforia Configurations), the viewport size becomes bigger and has the correct size for VR (like the common Cardboard size) and is what I want to achieve. The attached screenshot 'viewport_big.png' shows this. 

Now my question: Is it somehow possible to obtain the bigger viewport size like in the screenshot 'viewport_big.png' with a running background video at the same time? So maybe there is a possibility to achieve this via code? Or to put it another way: where exactly in the code does the setting of the viewport size happen and where could you intervene with code?

 

Thank you very much in advance for your help. It is very appreciated.

AttachmentSize
Image icon viewport_small.png301.42 KB
Image icon viewport_big.png870.69 KB

Viewport Size with Video Background

January 15, 2019 - 7:41am #3

Thanks for your quick reply. 

I think I found a solution that works for my case. By disabling the clipping planes which seem to be added by the Vuforia engine at runtime in AR mode, I achieve the result of a bigger viewport (that has the viewport size of VR mode). 

So in the Update loop, you can disable clipping planes like this: 

GameObject.Find("ClippingPlane_top").SetActive(false);

GameObject.Find("ClippingPlane_bottom").SetActive(false);

GameObject.Find("ClippingPlane_right").SetActive(false);

GameObject.Find("ClippingPlane_left").SetActive(false);

 

Viewport Size with Video Background

January 2, 2019 - 3:41pm #2

Hello,

This is related to the camera capture resolution aspect ratio, used by Vuforia for detection and tracking, not matching the native aspect ratio of the device's display. In these cases, rendering of the VR's split screen with Vuforia AR will differ in size compared to rendering them when running in VR only mode (e.g. not using Vuforia's camera frames for detection, tracking and background rendering).

I'm not aware of any workaround for this.

Thanks,

Vuforia Engine Support

Log in or register to post comments