You are not logged in.

1

Friday, May 6th 2016, 9:58am

Disable Gyro while in webvr mode

Hi all,

I would like to disable gyro while in VR mode and where do I insert the code - Tour.xml, weber.xml or vtourskin.xml. *confused*

Thanks,

DarManiac

ParallaxVT

Beginner

Posts: 21

Occupation: Photographer

  • Send private message

2

Friday, May 6th 2016, 5:16pm

Hello,

What you need to do is edit the attributes onentervr and onexitvr inside the WebVR plugin which is located in the file 'webvr.xml'. But if I were you I wouldn't edit webvr.xml because you could over write it by mistake upgrading krpano.

Look the following line in tour.xml

Source code

1
<include url="%SWFPATH%/plugins/webvr.xml" />


AFTER that line (very important) write the following code:

Source code

1
2
3
4
<plugin name="WebVR" devices="html5" keep="true"
            onentervr="webvr_onentervr(); set(plugin[gyro].enabled,false);"
	    onexitvr="webvr_onexitvr(); set(plugin[gyro].enabled,true);"
	    />


WebVR plugin original code is:

Source code

1
2
3
4
<plugin name="WebVR" devices="html5" keep="true"
            onentervr="webvr_onentervr();"
	    onexitvr="webvr_onexitvr();"
	    />


So basically you're overwriting both attributes by adding some custom code. It's a bit better in my opinion.

I hope it helps,

Cheers,

ParallaxVT

3

Saturday, May 7th 2016, 7:35am

Hi ParallaxVT,

Appreciate it but it doesn't seem to work. I tried adding the plugin as you directed to tour.xml first. But gyro still got enabled when I entered VR.
Also I added it to webvr.xml with the same result .

I also switched gyro to false onexitvr and onentervr for both cases and tested it. It isn't working.


Am I missing something. *sad*

Thanks,

Dar maniac

ParallaxVT

Beginner

Posts: 21

Occupation: Photographer

  • Send private message

4

Saturday, May 7th 2016, 8:34am

Hello,

This time I've tested it and it's actually very difficult to disable the gyro on VR Mode!
My solution doesn't work because VR Mode doesn't use the gyro plugin *mellow*

I've took a look to the WebVR documentation and it doesn't mention anything about how to disable the gyro. I think the use of it it's defined inside webvr.js itself and I can't find any option to turn it off.

Sorry.

5

Saturday, May 7th 2016, 9:00am

Hi,

No problem. *smile* I also had the same impression and tried to dig deep. I think Klaus might have some insight.

Thanks,

Darmaniac

6

Saturday, May 7th 2016, 9:50am

Hi,

the WebVR plugin and the gyro plugin are two independent plugins - the WebVR plugin has its own gyro tracking and when the plugin is enabled it takes automatically control about the pano view. That means when the gyro plugin was enabled before that doesn't matter for the WebVR plugin.

WebVR itself without gyro tracking doesn't make sense - that's one of the core features of the plugin.

The WebVR plugin itself is mainly a package of:
  • the 'real' WebVR browser API (for WebVR enabled browsers with VR headsets like the Oculus Rift or HTC Vice)
  • a solution for mobile devices with
    • manual gyroscope tracking
    • with lens pre-distortion
    • with a device screen-size detection for correct lens distortion and 'eye alignment'
    • a 'VR cursor'

What usage case do you have?
If you only want stereo rendering, this can be done also without any plugins - just enable the display.stereo setting...

Best regards,
Klaus

7

Saturday, May 7th 2016, 10:55am

Hi Klaus,

The usage case that I require is that in VR mode I want to have a fixed autorotation for every scene and after it reaches a specific view, it should automatically go to an adjoining scene.

So for that I was trying to disable gyro. *g*

Thanks,
Darmaniac

8

Wednesday, June 8th 2016, 9:42pm

What usage case do you have?

Hi! My customer wants panovideo with forced rotation based on some scenario.
For example, when video starts in VR mode, it is necessary to disable gyro (like switching to simple stereo-rendering).
Then we call lookto() and the camera turn on first man. After that we call lookto() and the camera turn on second man. Etc.

Further we enable the gyroscope for full VR mode. There by we allowing user to turn his head after few seconds from start.

I tried use display.stereo and then switch to VR but it is very bad solution because there is no smooth transition.

http://360c.ru/vr-video/


What is right solution of my task?
How to disable/enable gyro in VR?
Thanks!

Posts: 1,852

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

9

Friday, June 10th 2016, 7:35am

They think they want it.. until they experience it once.

Best solution is to fade out and fade in to the desired lookto.
Rotations with the headset on SUCK. PUKE!
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

10

Friday, June 10th 2016, 7:51am

Best solution is to fade out and fade in to the desired lookto.
What do yo mean?

Initial task is to fix/hold the camera for the first few seconds of the video, and then activate the gyroscope from this hlookat position. Is it possible in VR mode?

Kabkee

Trainee

Posts: 82

Location: South Korea

Occupation: South Korea

  • Send private message

11

Sunday, April 2nd 2017, 6:19am

Disable Gyro while VR mode.

What usage case do you have?
As like others, I need to force the view change to what I'd like to see.
For example, when users look at a hotspot the view looks where the hotspot located and zoom-in (fov change) using like " lookto( 10, 10, 40 ); "
However, there's no use of lookto action in VR mode because Gyro is enabled.

Since that,
I'd like to temporary disable the gyro embeded in WebVR plugin.

Any solution on this?

Kabkee Moon.

12

Sunday, April 2nd 2017, 8:00am

Hi,
I'd like to temporary disable the gyro embeded in WebVR plugin.

Any solution on this?
Yes - that's possible - see the 'headtracking' setting in the WebVR plugin documentation here:
https://krpano.com/plugins/webvr/#headtracking

But I wouldn't recommend that - if you want to change the viewing direction in VR, better use the 'lookat' action of the WebVR plugin:
https://krpano.com/plugins/webvr/#lookat

Best regards,
Klaus

13

Wednesday, February 5th 2020, 9:03pm

Hi Folks,
But I wouldn't recommend that - if you want to change the viewing direction in VR, better use the 'lookat' action of the WebVR plugin:
https://krpano.com/plugins/webvr/#lookat


Has anyone found a smoother solution for the transition between points in the webvr? Unlike lookat, disabling the gyro that could share the xml here?
Thanks! *thumbsup*