Skip to content
This repository has been archived by the owner on Nov 8, 2019. It is now read-only.

Size problem on Cardboard surface with HTC One X #13

Closed
qwarnant opened this issue Jan 26, 2015 · 9 comments
Closed

Size problem on Cardboard surface with HTC One X #13

qwarnant opened this issue Jan 26, 2015 · 9 comments

Comments

@qwarnant
Copy link

Hello,

I've experienced a problem with the cardboard surface on HTC devices. The stereo views on the HTC phone has a very small dimension compared with the other phones like Sony devices. I've tried various HTC One X devices with different android version (4.4.4 and 4.2) and the result is the same, the view on the HTC seems to not be in "full screen" mode.

This is the "normal" view size on my phone (Sony) in my app :
Normal screen

This is the "small" view size on the HTC phone in my app :
Small screen

Any idea to fix this problem ? Thank you.

@smdol
Copy link
Contributor

smdol commented Jan 29, 2015

Are you able to get into immersive mode with other apps? If not, there is a possible fix here:

http://appslova.com/how-to-enable-immersive-mode-on-android-without-root/

@qwarnant
Copy link
Author

Hello,
I've tested to put manually one of the HTC devices in immersive mode, but the result on the view is the same. With other cardboard apps without the unity3d plugin, I don't have this problem, each side of the view takes correctly the full available space on the screen. Maybe a problem with the computation of the render view size on HTC GPU devices with the plugin ?

@smdol
Copy link
Contributor

smdol commented Jan 30, 2015

It looks like the HTC screenshot shows the top bar, so it did not go into immersive mode. Also, I don't see the settings gear icon. I know there is a bug in the Cardboard Unity plugin that affects how it interacts with Android -- the gyro and accelerometer are not accessible in Input -- and I wonder if this is also an effect of that bug. If that is the problem, then when the bug is fixed, this problem will be fixed too. One way to test this: You mentioned other cardboard apps without unity3d. What about other unity3d apps without the cardboard plugin? If they can make the screen immersive mode, then it is likely to be that bug.

One other thing to look for: Does adb logcat show any error messages?

@qwarnant
Copy link
Author

Hi,
The top bar on the phone appears when we takes a screenshot (it's a custom rom device), it's a normal behaviour of the device. For the presence of the gear icon, it's normal, i've unchecked this feature of plugin in the unity editor. So, we have made several other tests :

  • We have tested if other "simple" unity3d apps without any cardboard or vr plugins : the app is running normally with full available screen.
  • We have launched the official cardboard app (i don't know which SDK this app is using), the problem is the same
    Screenshot official cardboard app
  • We have checked the adb logs and there were no error messages.

@smdol
Copy link
Contributor

smdol commented Jan 30, 2015

Based on your latest information, it looks like the HTC One X may be reporting an incorrect dpi. I've heard of some other models that also have this problem. The dpi is used to calculate the size of the screen in mm. The SDK needs to know this in order to compute the correct projection matrix. It doesn't seem to matter whether GetMetrics() is used, or GetRealMetrics() -- some phones return the wrong dpi for one of those calls or the other. The result is the SDK thinks the screen is smaller than it is, and the smaller image is rendered like you see it: centered horizontally and at the bottom edge of the phone.

@qwarnant
Copy link
Author

Okay,

Thank you very much for your good explanation of the problem. One more weird thing happened, when we tried to play this app (present on cardboard play store) : the stereo view works perfectly. However, in the description of the app, the developer says "This is Card board unity3d plugin sample game". Maybe he provided a bug fix in the unity3d plugin...

@smdol
Copy link
Contributor

smdol commented Jan 30, 2015

I know that the underlying Java SDK switched from one of the two calls GetMetrics and GetRealMetrics at some point. The hope was this would fix the dpi issue, but it was then found that it only made a different set of phones report a problem. Likely he has an older version of the Cardboard SDK that uses the other metrics function from your version, and that one happens to give the correct answer on your phone! :(

@qwarnant
Copy link
Author

qwarnant commented Feb 1, 2015

Ok ! Thank you for explanation !
Can the team provide some low-level fix in the plugin like check the dpi value returned by the two methods ? If not, I suppose this is an issue than can not be fixed by the Cardboard team. In that case, should I close this thread ?

@smdol
Copy link
Contributor

smdol commented Feb 3, 2015

I guess the thread should be closed. Regardless of how the issue is solved, it is not really a bug in the Cardboard-Unity SDK itself.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants