Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eye projections make it impossible to focus on close objects #312

Closed
mikebolt opened this issue Mar 20, 2018 · 19 comments
Closed

Eye projections make it impossible to focus on close objects #312

mikebolt opened this issue Mar 20, 2018 · 19 comments

Comments

@mikebolt
Copy link

Description:

There is some kind of issue causing incorrect rendering of very close objects (1 meter or less), which makes them impossible to focus on with your eyes. This issue is new, either due to Chrome m65 or a recent change to this polyfill, but the issue is definitely occurring when using both Chrome m65 and version 0.10.4. We have tested with three different phone models: Samsung S7, Samsung S8, and Google Pixel. The close object focus was much worse on the S7 and the S8, but still noticeable on the Google Pixel. We added custom entries to the DPDB_CACHE for the S7 and the S8, but they worked fine before m65 and with an older version of the polyfill (I will try to post which version). This issue is not present with native WebVR enabled and without the polyfill.

I attached a simple demo with some cubes that are close to the camera. The only change to webvr-polyfill.js was adding the two DPDB_CACHE entries.

Additional Information:

close_cubes_test.zip

  • webvr-polyfill version: 0.10.4
  • Browser name/version/release channel: Chrome m65
  • Operating System: Android 7.1 and Android 7.0
@jsantell
Copy link
Contributor

Thanks for reporting this issue; can you explain what you mean by it being impossible to focus? Can you reproduce this in Chrome Canary m67 (as m65 has special logic for a devicemotion regression)

@mikebolt
Copy link
Author

Same issue in Chrome Canary m67 on the S7. What I mean is that the two images of the cube are too far apart on the screen, such that your eyes can't focus on them and see them as a single object.

This may be related: immersive-web/cardboard-vr-display#7

@jsantell
Copy link
Contributor

@mikebolt in that case, I wonder if it could be solved by ensuring your device is running at the full resolution possible

@madebynoam
Copy link

@jsantell noticing this issue when using the cursor entity in A-Frame.

An example site:
https://ottifox.com/examples/city-views/index.html

Running on Pixel 1, Chrome 65 or Firefox, with stock Google Cardboard viewer - my eyes strain really bad when trying to focus on the cursor (using A-Frame master with the latest polyfil).

Happy to contribute more info if it helps.

@marshworks
Copy link

I have confirmed that it occurs on my S8, running in full resolution (performance mode) (NOTE: if not in performance mode... the screen is waaaaay off in a different way, so I'm sure).

This issue has appeared specific to the changes in Chrome 65 and/or webvr-polyfill 0.10.4.

It is a new, different rendering of close objects when compared to exact same code running in m64 with webvr-polyfill. It is also different than running in native mode with either the #enable-webvr flag or a active trial token, neither of which demonstrate this problem.

@jsantell
Copy link
Contributor

If you still have m64 available, I'd be curious if it's reproducible there with the latest polyfill -- isolating the changes seeing if it's the polyfill changes, or m65. You can see the changes in the polyfill to support m65 due to regressions, so the focus change could be from that, which was a hot fix, and I'm sure there could be a better way to handle it, although I'm surprised it's affecting the projection

@marshworks
Copy link

Luckily, I had an old S7 that hadn't been powered up since December, and it had m57 on it.
Running the new web-vr-polyfill (0.10.4) against the old m57 Chrome, shows the problem!

This isolates it to the webvr-polyfill instead of chrome m65.

I spent some time trying to get ahold of m64, but the various downloads I found wouldn't install, all reporting the "APK is corrupt". I'd be happy to regress it if you have any pointers to an APK, but at this point I am pretty convinced there is something wrong with the new webvr-polyfill. I'm sorry I'm not enough of a mathematician to understand what/how this is happening, and how to partially step back to isolate it.

@jsantell
Copy link
Contributor

@marshworks thanks for digging into it, I appreciate it! And it's very helpful information, should be plenty enough for me to track down -- thank you!

@jsantell
Copy link
Contributor

Trying out on Firefox due to Chrome m65 requiring the latest versions to get around m65 issues, and m67 due to rotationRate change, although all have the same double-vision effect on the close object.

Going back to older builds (0.9.36) I still see this issue on Firefox. I'm not terribly familiar with the projection code used here, so would be interested in learning what version did work well for you in the past @mikebolt. Having the correct device values in the DPDB and selecting the correct viewer is key, as well

@jsantell
Copy link
Contributor

@madebynoam here's another example using a reticle immersive-web/cardboard-vr-display#21, I think this is the same issue. Digging more into it, the reticle makes it a bit more objective to track

@mikebolt
Copy link
Author

mikebolt commented Mar 21, 2018

@jsantell The issue is not present with version 0.10.2 on Firefox 59 on the S7. The issue appears with version 0.10.3.

@devasur
Copy link

devasur commented Mar 22, 2018

We can disregard immersive-web/cardboard-vr-display#21 . The issue is clearly around objects closer to camera. In my observation anything closer than 10m has ghost vision.
screenshot_20180322-124549

Red ball is at 0.5 meters - has ghost vision
Yellow ball is at 12 meters - does not have ghost vision.

Example : https://devasur.github.io/webvr-polyfill/examples/

@devasur
Copy link

devasur commented Mar 22, 2018

immersive-web/cardboard-vr-display@d7d04f6#diff-55f22139cda256d0c2e29cb114cdf4f0

This is more or less a guess. VREffect depends on accurate VRFrameData. This commit somehow has a change in this behavior. Especially around the near and far values. Not sure whether it is causing the rendering problem.

@jsantell
Copy link
Contributor

Tracked this down to some change between cardboard-vr-display 1.0.3 and 1.0.4. Hope to have a fix soon.

@jsantell
Copy link
Contributor

@jsantell
Copy link
Contributor

Fixed! Changes can be found in v0.10.5

@mikebolt
Copy link
Author

Tested on the S7 and Pixel with Chrome and Firefox. Works great!

@jsantell
Copy link
Contributor

Thanks for the investigation and reports all! @mikebolt @devasur @madebynoam @marshworks

@madebynoam
Copy link

Thanks for the quick fix and investigation, really appreciate it. Will you be planning to merge into A-Frame in the coming days?

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

No branches or pull requests

5 participants