-
-
Notifications
You must be signed in to change notification settings - Fork 382
feat(WebXR): Add support for head-mounted augmented reality displays #2824
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e06b46f
to
5454722
Compare
Adds support for serving examples locally over HTTPS via self-signed SSL certificate automatically generated by webpack. Run the following command to serve an example over HTTPS: ``` > npm run example-https -- <example-name> ``` These changes are motivated by the WebXR specification requiring that documents be served in a secure context. https://immersive-web.github.io/webxr/privacy-security-explainer.html Also updates WebGPU example command to always run over HTTPS. WebGPU is only available in secure contexts. https://developer.mozilla.org/en-US/docs/Web/API/WebGPU_API
Consolidates WebXR background caching and updates so that "OpenGL/RenderWindow" is responsible for managing background transparency for augmented reality sessions. Previous behavior required the application to set background transparency.
Adds support for head-mounted augmented reality displays (AR HMDs), building on existing support for WebXR head-mounted VR displays and mobile augmented reality displays.
cc @LucasGandel |
floryst
reviewed
May 11, 2023
…lays (AR HMDs) Updates WebXR documentation with descriptions and example scenes for augmented reality head-mounted display support. Includes parameter parsing for AR cone example to switch between mobile and HMD AR.
Updates default WebXR scene factors to standardize across VR and AR experiences. Factors are selected to scale and translate the default scene so that VR and AR example datasets can be viewed comfortably. Previous behavior resulted in VR models appearing very large and very close to the user's face, which was particularly uncomfortable in testing on the HoloLens 2 headset. In updated behavior the examples in `GeometryViewer` and `WebXRVolume` appear smaller and at a comfortable distance from the user.
Thank you so much!! |
LGTM! |
🎉 This PR is included in version 27.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thank you so much! |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Adds support for rendering to WebXR head-mounted augmented reality sessions.
Results
Previous behavior: vtk.js supported HMD VR (two cameras) or mobile AR (one camera) sessions, but not AR HMDs (two cameras). Side effect was that rendering in an AR headset (Meta Quest 2) would produce undefined behavior with only one eye able to see the scene at a time.
Updated behavior: Proper stereoscopic rendering for AR HMDs, combines existing support for VR HMD rendering with AR transparency.
Note that HoloLens 2 AR HMDs appear to be treated as VR headsets by WebXR and support
immersive-vr
but notimmersive-ar
sessions. Scale factors for VR scenes are updated to be more comfortable for HoloLens users.Screenshot captured on HoloLens 2:
Changes
HmdAR
enum value to request head-mounted augmented reality XR sessionHmdAR
session inOpenGL/RenderWindow
OpenGL/RenderWindow
to reduce redundancyPR and Code Checklist
npm run reformat
to have correctly formatted codeTesting
master
Tested on the following devices: