Sie sind nicht angemeldet.

1

Freitag, 6. Mai 2016, 09:58

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

2

Freitag, 6. Mai 2016, 17:16

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

Quellcode

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


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

Quellcode

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:

Quellcode

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

Samstag, 7. Mai 2016, 07:35

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

4

Samstag, 7. Mai 2016, 08:34

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

Samstag, 7. Mai 2016, 09:00

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

Samstag, 7. Mai 2016, 09:50

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

Samstag, 7. Mai 2016, 10:55

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

Mittwoch, 8. Juni 2016, 21:42

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!

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

9

Freitag, 10. Juni 2016, 07:35

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

Freitag, 10. Juni 2016, 07:51

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

Schüler

Beiträge: 116

Wohnort: South Korea

Beruf: South Korea

  • Nachricht senden

11

Sonntag, 2. April 2017, 06:19

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

Sonntag, 2. April 2017, 08:00

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

Mittwoch, 5. Februar 2020, 21:03

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*