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

Suggestions for improving the library #409

Open
AndreySkyFoxSidorov opened this issue May 16, 2023 · 5 comments
Open

Suggestions for improving the library #409

AndreySkyFoxSidorov opened this issue May 16, 2023 · 5 comments
Labels
question Further information is requested

Comments

@AndreySkyFoxSidorov
Copy link

AndreySkyFoxSidorov commented May 16, 2023

I have examined the cardboard SDK for implementation in the project. Unfortunately, this library is in a very raw Alpha state (((, and it is disappointing that there hasn't been a stable version after all these years. Additionally, I don't understand why it doesn't utilize the cross-platform capabilities of the Unity engine, for which it is designed. Most of the necessary functionality is already present in the engine's standard features. It's unclear to me why lens curvature calculations and downloading configuration settings have been transferred to native code. Furthermore, the SDK is lacking in functions for adjusting lenses for children and changing the eye distance for the user. The competitors of cardboard have many solutions that are significantly better thought out. Unfortunately, we will refrain from further work with this SDK until it becomes more mature. Crashes and the complexity of fixing errors due to the native functionality make this concept unprofitable.

My suggestions for improvement to make the library more understandable and popular are as follows:

  1. Remove native functionality. The native functionality of the library hinders bug fixes but has no impact on performance. It also restricts C# developers using Unity from modifying and fixing errors.

  2. Add parameter customization. The system is completely unsuitable for children. Children have a different eye distance compared to adults, and it is impossible to adjust it in this SDK. There are no settings available at all. As a result, children in the test group experience double vision, while adults claim everything is fine. This is a critical bug.

  3. Eliminate unnecessary dependencies. Why is the integration so complicated, and why is there no emulation in the Editor? As a result, it is impossible to properly debug games with this SDK.

Please take note of my observations and consider the possibility of improving the library's functionality. I hope for your understanding and willingness to address these factors in future development.

@AndreySkyFoxSidorov AndreySkyFoxSidorov added the bug Something isn't working label May 16, 2023
@arilow
Copy link

arilow commented May 19, 2023

Thanks @AndreySkyFoxSidorov for reaching out to us and sharing your thoughts.

  1. Unfortunately, removing the native functionality is not an option here since this SDK is meant to support both Android and iOS, both natively and as an XR Plugin.

  2. The Cardboard SDK supports viewers with different physical parameters (such as inter-lens distance, screen to lens distance, etc.). In order to achieve this you would need to go to the viewer profile generator page, set the parameters to suit the viewer you have and generate a QR code to be scanned by your app. The Inter-lens parameter is likely the parameter you are looking for.

  3. This feature request is being tracked by #51. Unfortunately we haven’t been able to prioritize it yet. Contributions here would be very welcome, if you want to get this in sooner.

I hope this helps.
Thanks!

@arilow arilow added question Further information is requested and removed bug Something isn't working labels May 19, 2023
@kafumanto
Copy link

Just to point out that the native version is also used with other game engines than Unity (e.g. we maintain an integration for Unreal Engine).

@Mandelbrow
Copy link

Mandelbrow commented May 22, 2023

My experience is that the standard QR-codes for Cardboard 1.0, and Cardboard 2.0 works fine with most of the headsets. The 1.0 codes gives a smaller field of view, and the 2.0 code uses more of the screen which may be preferred on phones with wide screens and headsets with large lenses.

I think they both are configured with a fixed IPD of in the region 55-60 mm, or so.

@arilow, can you please provide the default parameters for the official Cardboard v1.0, and v2.0, to make it easier to customize the standard QR-codes for some various pupil distances?

Screen to lens distance, Inter-lens distance (IPD?), Tray to lens-center distance, distortion coefficients k1, and k2, and the default Field-of-view angles; Outer, Inner, Top, and Bottom.

@arilow
Copy link

arilow commented May 24, 2023

Hi @Mandelbrow !

You can check the device parameters of the viewer set in your device by logging the parameters of device_params_ from the constructor of LensDistortion.

Here they are for v1 and v2 viewers:

Cardboard viewer v1:

  • Inter-lens distance: 60mm
  • Tray to lens-center distance: 35mm
  • Field-of-view angles:
    • Outer: 40
    • Inner: 40
    • Top: 40
    • Bottom: 40
  • Distortion coefficients:
    • k1: 0.441000
    • k2: 0.156000

Cardboard viewer v2:

  • Inter-lens distance: 63.9mm
  • Tray to lens-center distance: 35mm
  • Field-of-view angles:
    • Outer: 60
    • Inner: 60
    • Top: 60
    • Bottom: 60
  • Distortion coefficients:
    • k1: 0.335826
    • k2: 0.553488

Feel free to open a new ticket if you need any other information.
Thanks!

@Mandelbrow
Copy link

Thanks, I think It works perfect now. Having a few different QR-codes in the range of 41 to 73 mm in 5 mm step. Just to pick the closest one, and make some fine adjustments to the distance of the lenses in the headset to say godbye to double vision.

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

No branches or pull requests

4 participants