VR settings (VRCameraMetrics) unclear how and what to configure

A tutorial video and better documentation on VR metrics is needed. Currently I haven’t found any information on how to properly configure the VR-metric values.

After reading docs/api and searching online all I can say is that the parameters for VR (VRCameraMetrics) are magic numbers. There remain lots of questions on this topic:

  • How to calculate chromaAbCorrection and distortionK for the different VR-devices?
  • How to measure different values on the different VR-devices and how do these correspond to the BabylonJS VRCameraMetrics parameters? Maybe a collection of these measurements can be created for a variety of (popular) devices; GearVR, Carboard v1 and v2, etc.
  • The interpupillaryDistance is a number that is 64mm on the avarage human. All these known factors can be included in the instructions (docs/video).
  • It is unclear what type of values to use on certain parameters. For example this is displayed on the site: vScreenSize:number, Define the vertical screen size. :arrow_right: I know it is a number, but not what unit of measurement is expected (in mm/cm/m/inch)?
  • The VRCameraMetrics has a GetDefault method to retrieve default parameters for VR-settings. What are those values and what VR-device and mobile-device correspond to it?

External (non-Babylon) calibration tests return values that don’t correspond with the parameters BabylonJS use. People recommend QR-codes, but these present the same issue and you don’t know what values they derrive from it, which kind of defeats the point. Besides those QR-codes aren’t always on the VR-device.
For mobile it is recommended to get the WebVR-polyfill library as a substitute or an addition. But this library provides more then getting the proper values, making it to big. Besides the values again do not correspond with the BabylonJS parameters and I don’t see any values provided except for the Cardboard device.

Please provide some insight into the horrors of VR… :woozy_face:

Thanx in advance, …

Adding @trevordev

Hey @uno90showbiz,

Unfortunately I am unaware of any collection of all the mobile phone calibration parameters. I think the default numbers for the metrics are targeting gearVR but all numbers are not perfectly accurate as screen sizes also change and different distortion correction is also used as you’ve found with the webVR polyfill. To calibrate a new device I think the best method would be to setup an app that initializes into vr multiple times while changing metrics settings until it feels ideal or by trying to find numbers that others posted online but this can be very time consuming.

This problem should hopefully go away with the introduction of webXR which will do all the calibration/distortion correction outside of Babylon’s code and inside the browser using information device manufacturers provide to be as accurate as possible. Unfortunately this might not be available on all older devices so unfortunately there’s no perfect solution here.

1 Like

Hey @trevordev,

Thanks for the reply. To bad no solution is currently available.

Unfortunately waiting for the webXR to standardize on browsers will take to much time.
I’m planning on making my own calibrating app, that actually configures to numbers corresponding to the Babylon VR-metrics. Planning on making it more extensive; so it will include physical measurements of the VR-devices (cardboard, etc.) in combination with the calibrated data. These numbers combined will hopefully result into something that will translate over the VR-devices on all phones (or at the least the most used/popular).
Will get back on this topic, when results roll in.

Anyplace to put the results of this research, if a working solution is found?

Yea, you can share them here on the forum if you would like :slight_smile: or add what you find to Babylon.js/vrCameraMetrics.ts at master · BabylonJS/Babylon.js · GitHub in the getDefault method. Maybe this function could take an enum/string as a parameter for a given device type and return the metrics that you have found.