How to change the default value of vr setup?

  • Hi guys, I am a new in studying krpano, i would like to know the way of changing the default value in vr mode

    e.g default screen size of 6.3 and vr devices is Gear VR.


    As the default settings are screen size of 5.0 in unknown device and
    use of cardboard.

    But I cannot find the way to change them. I know those
    setting variables are stored in

    plugin file (webvr.xml). And i tried to
    modify them but it seems not work.


    Cause i don't want to take the
    adjust steps in case of using new device.

    Dose anyone advice the
    solution? *smile* *smile*

  • Hi,

    look in the webvr.xml
    in the second code block: ,vrheadsets you see all settings.
    In the first part (<plugin --> there you can fill them in corresponding to the setting sin the vrheadsets part.

    So, if you want cardboard to be default, set these numbers in the plugin part to your needs, matching the vrheadsets settings.

    Code
    mobilevr_ipd="63.5"
    	        mobilevr_screensize="auto"
    	        mobilevr_lens_overlap="1.10"
    	        mobilevr_lens_fov="96"
    	        mobilevr_lens_dist="1.00"
    	        mobilevr_lens_dist2="1|0|0|0"
    	        mobilevr_lens_ca="0.0"
    	        mobilevr_lens_vign="100"

    and

    Code
    <vrheadsets>
    		<headset name="cb1" caption="Cardboard A"   overlap="1.10" fov="96.0"  dist="1.00" dist2="1|0|0|0" ca="0.000" vig="100" />
    		<headset name="cb2" caption="Cardboard B"   overlap="1.00" fov="96.0"  dist="0.60" dist2="1|0|0|0" ca="0.000" vig="100" />
    		<headset name="gvr" caption="GearVR"        overlap="1.00" fov="112.0" dist="0.95" dist2="1|0|0|0" ca="0.090" vig="100" />
    		<headset name="hom" caption="HOMiDO"        overlap="1.00" fov="101.0" dist="1.10" dist2="1|0|0|0" ca="0.075" vig="100" />
    		<headset name="one" caption="VR ONE"        overlap="1.00" fov="109.9" dist="0.00" dist2="1.139|0.093|0.018|0.207" ca="0.090" vig="35" />
    		<headset name="ccr" caption="ColorCross VR" overlap="1.00" fov="70.0"  dist="0.65" dist2="1|0|0|0" ca="0.000" vig="100" />
    		<headset name="nod" caption="No Distortion" overlap="1.00" fov="96.0"  dist="0.00" dist2="1|0|0|0" ca="0.000" vig="100" />
    	</vrheadsets>

    Hope it helps a bit
    Tuur *thumbsup*

  • Hi,

    first please see the WebVR plugin and its settings:
    https://krpano.com/plugins/webvr/#syntax

    The device detection itself works that:
    - first look if the browsers supports the WebVR API => if yes, the browser will do all the device specific stuff
    - no WebVR support => use the 'user-agent' of the device and look into a database for the physical screen size
    - when no device will be found => then the onunknowndevice event will be sent
    - in that event you could e.g. manually set a custom screen size by setting the mobilevr_screensize setting

    Next - about the 'database' - the WebVR plugin has a build-in list of devices and when the device will be not found there, then the online-database set by the
    mobilevr_database_url setting will be checked.

    So if you want to add a device and its screensize you could make a request to that database provider or let the url point to an own hosted database.

    Best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!