CesiumGS / CesiumGS/cesium

VR mode image splitting

Open
#8,137 2 comments 0 reactions 0 assignees View on GitHub
category - graphics type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

`useWebVR` property os `scene` splits image into two. However, I found that it does not look properly in VR headset (testing in HTC Vive). Basically, in VR you expect to see two different images that propelry align in headset, but in Cesium this images almost identical which creates effect of double vision (diplopia). I found #3909 which was supposed to be fixed in #5917, but setting `eyeSeparation` works only at specific distance (like it doesn't make sense to be different depending at distance to object), and `focalLength` doesn't help at all. So after looking through source code, I think that problem is at `executeWebVRCommands` function in Scene.js. If instead of setting offset to viewing frustum, set `PerspectiveOffCenterFrustum` with planes calculated according to referenced in code paper, images align correctly.

Contributor guide

Open the contributing guide

Research direction

Start in Scene.js at executeWebVRCommands and review the referenced paper on calculating the off-center frustum planes. Compare the current viewing-frustum offset with a PerspectiveOffCenterFrustum implementation, then verify in an HTC Vive that the two images align correctly without diplopia across object distances.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.