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

Support non-square camera resolutions in the webrtc reality #86

Open
kimberlysiva opened this issue Jun 30, 2017 · 0 comments
Open

Support non-square camera resolutions in the webrtc reality #86

kimberlysiva opened this issue Jun 30, 2017 · 0 comments

Comments

@kimberlysiva
Copy link
Contributor

Currently the webrtc reality depends on a square camera image, which Chrome provides on most Android devices. This needs to be fixed to support other platforms.

Suggested steps:

  1. Rework the ARController.getUserMedia function in webrtc.ts. This logic can probably be improved to follow the latest standards, especially with regards to recommended vs. required resolution and choosing the back-facing camera.

  2. Request a non-square camera image when calling ARController.getUserMediaThreeScene (currently we ask for 240x240, perhaps this should be 320x240).

  3. Ensure jsartoolkit is updated with the correct camera resolution if it changes on device rotation. This may require reinitialization?

  4. Double-check that the logic in updateViewport correctly stretches the camera image to aspect-fill the viewport (in both portrait and landscape). This may need to be reworked.

  5. Adjust the projection matrix in updateProjection to account for the portion of the camera image that is currently visible (e.g. adjust the fov). This will change on rotation. Note: this projection only affects augmentations, not the rendering of the camera image. Test by aligning content on a jsartoolkit marker.

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

1 participant