You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

tillkrueger

Beginner

  • "tillkrueger" started this thread

Posts: 18

Location: Germany

Occupation: Digital Media Producer

  • Send private message

1

Wednesday, December 28th 2016, 6:06pm

WebVR and/or Gyro2 and other questions

New to krpano and the Forum...hello everyone!

After reading over the WebVR Plugin page I was under the impression that it would also act as a gyro plugin on mobile, or did I get that wrong?

Earlier today I had the panorama respond to my iPhone gyro using just the Gyro2 plugin, but then I wanted to take it another step forward by using the WebVR plugin to see whether it could also work in VR (cardboard) mode...the first pano I am working on is this one:

http://avpmatrix.com/kruegervp/_resource…ng_Pano-01.html

but after pasting the following code into my "Werfenweng_Pano-01.xml" file, replacing the Gyro plugin code, it is not responding to my iPhone's gyro anymore...here is the content of my "Werfenweng_Pano-01.xml" file":



<krpano>

<!-- the skin -->
<include url="skin/defaultskin.xml" />

<!-- view settings -->
<view hlookat="0" vlookat="0" maxpixelzoom="1.0" fovmax="150" limitview="auto" />


<preview url="Werfenweng_Pano-01.tiles/preview.jpg" />

<image type="CUBE" multires="true" tilesize="512">
<level tiledimagewidth="3840" tiledimageheight="3840">
<cube url="Werfenweng_Pano-01.tiles/mres_%s/l3/%v/l3_%s_%v_%h.jpg" />
</level>
<level tiledimagewidth="1792" tiledimageheight="1792">
<cube url="Werfenweng_Pano-01.tiles/mres_%s/l2/%v/l2_%s_%v_%h.jpg" />
</level>
<level tiledimagewidth="1024" tiledimageheight="1024">
<cube url="Werfenweng_Pano-01.tiles/mres_%s/l1/%v/l1_%s_%v_%h.jpg" />
</level>

<mobile>
<cube url="Werfenweng_Pano-01.tiles/mobile_%s.jpg" />
</mobile>
</image>

<!-- WebVR -->
<plugin name="WebVR" devices="html5" keep="true"
url="webvr.js"
worldscale="1.0"
mousespeed="0.00125"
oversampling="1.0"
headtracking="true"
fullscreen_mirroring="true"
mobilevr_support="true"
mobilevr_ipd="63.5"
mobilevr_screensize="auto"
mobilevr_lens_overlap="1.0"
mobilevr_lens_fov="96"
mobilevr_lens_dist="0.6"
mobilevr_lens_dist2="1|0|0|0"
mobilevr_lens_ca="0.0"
mobilevr_lens_vign="100"
mobilevr_webvr_dist=""
mobilevr_webvr_firefox="false"
mobilevr_orientationlock="true"
mobilevr_wakelock="true"
mobilevr_sensor_mode="3"
mobilevr_autocalibration="false"
mobilevr_touch_support="false"
mobilevr_fake_support="false"
vr_cursor=""
vr_cursor_enabled="true"
vr_cursor_onover=""
vr_cursor_onout=""
onavailable=""
onunavailable=""
onunknowndevice=""
onentervr=""
onexitvr=""
/>

</krpano>


I have the files "webvr.js", "webvr.xml", and "webvr_cursor_80x80_17f.png" in the root of the pano's folder, on the same level as the "Werfenweng_Pano-01.xml" file itself. The "webvr.xml" file is unmodified.

does any of this raise any red flags that would explain why the pano isn't responding to the gyro? do I *also* have to use the gyro2 plugin to make it work?

another question: once this works, is there a way to force split-view on a regular panorama to make it work with a cardboard compatible headset, and if so, how?

sorry for all these nooby questions...hope they haven't been asked before a dozen times.

2

Friday, December 30th 2016, 10:11am

Hi,

the easiest solution would be using the MAKE VTOUR droplets - the skin of these droplets have VR support already build-in.

About the webvr.js itself - that plugin alone only provides the API for using VR. You would at least need to add a 'enter vr' button and call the enterVR action from the plugin.

Or include the webvr.xml instead - that's a helper tool that also includes the webvr plugin and does a lot around it - e.g. support detection, mobile headsets presets, enter/exit vr buttons and so on.

Best regards,
Klaus

tillkrueger

Beginner

  • "tillkrueger" started this thread

Posts: 18

Location: Germany

Occupation: Digital Media Producer

  • Send private message

3

Friday, December 30th 2016, 3:36pm

Klaus,

I don't really know what I'm doing or how you managed to make all this, but it is now working and may I just say what an amazing set of tools these are...it's just amazing how well thought through they are and how well they work...I couldn't be more excited about having found them and getting to work with them...so much to learn, but very much looking forward to putting in the time and work to do so.

Thanks for this pointer...works like a charm!

I may add to this thread as I experiment more, but this got me up and running for now...brilliant!

Similar threads