Skip to content
This repository has been archived by the owner on Jul 28, 2020. It is now read-only.

Control over camera aperture angle when not using ARCore #227

Open
JessHolle opened this issue Aug 1, 2018 · 3 comments
Open

Control over camera aperture angle when not using ARCore #227

JessHolle opened this issue Aug 1, 2018 · 3 comments
Labels
feature request New feature or request

Comments

@JessHolle
Copy link

Looking at the SceneForm Camera code it would appear that the aperture angle (aka fovy in http://www.mathematik.uni-marburg.de/~thormae/lectures/graphics1/graphics_6_1_eng_web.html#19) is hardwired to 90 degrees when ARCore is not used.

That does not allow one to match the actual camera intrinsics to do AR on non-ARCore devices -- and in general would seem to provide insufficient control over the camera.

@gstanlo gstanlo added the feature request New feature or request label Aug 1, 2018
@JessHolle
Copy link
Author

If setPerspective(float, float, float, float) was not private, we could just subclass Camera an ignore and override the first argument as a quick hack of a fix.

Of course, the real fix is to provide a camera angle setter (a getter is not really necessary), call refreshProjectionMatrix() if isArCamera is false, and use the angle in question in refreshProjectionMatrix() rather than 90.

I'm not sure if there's any clean way to thwack/patch this class until a fix is provided, unfortunately. Ideas?

@mojikashani
Copy link

I need the feature badly as well... really appreciate adding an view angle setter

@Dosssik
Copy link

Dosssik commented Dec 10, 2019

There is a public API in last (1.13.0) release - https://developers.google.com/ar/reference/java/sceneform/reference/com/google/ar/sceneform/Camera#setVerticalFovDegrees(float)

But take care, using this API dramatically decrease performance on some devices :( I'll attach an issue link a bit later

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

No branches or pull requests

4 participants