Spectacular! Sure to move the 'splat revolution' forward fast.
Congratulations on another technical triumph.
Spectacular! Sure to move the 'splat revolution' forward fast.
Congratulations on another technical triumph.
Thanks,
I'm developing a vtour skin with better support for stereoscopic tours, based on krpano 1.22.4. One important feature is to enable side-by-side 'fake VR' display on all flat screen devices, so that the user has the option of using a stereoscope.
It is reported that on 18.3.2 iPadOS my skin does show the VR button, but that tapping it does nothing. Unfortunately I do not have an iPad for testing. If you have one, please visit https://tks-vr-tours.s3.us-east-1.amazonaws.com/BNJ-OnDeck/tour.html and try for yourself.
I would not expect any problem with side-by-side display on an iPad, so would assume that my code has somehow disabled that. However I am puzzled. All references to this button in my skin xml have to do with its visibility; the webVR plugin, which I have not modified, is responsible for reacting to it. My xml has mobilevr_fake_support="true", I can't see anything in webvr.xml that would explain the problem.
Is it possible that the person who reported this has somehow configured their iPad so that fake VR fails?
The so-called 'fake VR' display mode is very useful for stereo enthusiasts as it allows viewing panoramas with a stereoscope -- not only 'cardboard' style phone accessories but also large format professional units. For the latter, an iPad is an ideal display device, but unfortunately by default krpano does not enable 'fake VR' on iPad, even when it is enabled for phones and desktop. Can anyone show me how to correct this?
SOLVED. The renderloop needs to be decoupled from the nextscene action through a global variable pair and onchanged(). That gives the effect of cooperating asynchronous processes even though krpano runs on a single thread.
SOLVED. The correct solution, as suggested by indexofrefraction, is to keep the renderloop running as long as webvr is enabled. It posts its findings to global variables, and the consuming code is triggered by onchanged(var, action). The loop posts a variable only when it is zero (and other conditions are right), and the consuming code ignores the value zero.
This way gives the effect of cooperating threads, even though krpano runs on a single thread.
This has enabled me to create a new skin for stereoscopic tours, that works to my liking on all devices including VR headsets. Example here.
thanks, Kris, I will try that.
I have had some luck using krpano global variables, but there are problems with multiple instances of the renderloop function getting started. I think a subroutine call will be more reliable.
The basic problem is that I need to stop the renderloop function in order to load a new scene, then start it again after the scene loads. I am having a hard time getting my head around the fact that krpano code is all synchronous -- I keep thinking in terms of cooperating threads.
I have a Javascript action that runs a renderloop function to decode some input device events. For some events, it terminates the renderloop, and at that point it should return or post some variables accessible to the calling action, or alternatively call some other action with those values. I have tried several ways that don't work, and would appreciate some definitive guidance.
Klaus, are you listening?
I am trying so far unsuccessfully to make a VR controller joystick trigger scene changes.
I assume the cause is some race condition that could be solved by synchronizing the renderloop function with the scene update. But I don' kno2 hos to do that.
Thanks, Kristof
Just what I was looking for. I suspected it was external JS inserted in the render loop; now I know how.
Can anyone share code showing how to receive and act on VR controller joystick movements?
That does not seem to be available in the released webvr plugin.
Can it be done within krpano xml, or does it require external Javascript?
Thanks.
Excellent.
Can you share the code that receives and acts on joystick input? That does not seem to be part of the standard webvr plugin. Or are you using external Javascript?
HI Tuur
I was asking about joysticks/thumbpads. I don't think those are defined as 'buttons', but the docs are not clear on this.
Pano2VR's webxr tours do use the joystick x axis events to switch between panos.
Thanks, Tuur.
But what is walkaround?
-- Tom
I want to use VR controller joysticks/thumbpads to set view direction and for other things. The webvr documentation describes how to find controller configurations and read joystick positions, but is not clear on how joystick changes could trigger actions. Is there example code for this?
SOLVED
This was also an https issue. Enabling debug mode on the phone and using adb to reverse port 8090 makes it possible to access the tour via url 'localhost:8090'. Then gyro is available and fake VR mode works.
It seems the webvr plugin supports 'fake VR' (side-by-by side) display only on desktop and tablet devices, but not on phones.
I am developing a skin specific for stereoscopic tours, and would like it to enable fake VR also on phones, with gyro support. This would make the tours more attractive for the 3D photography community, who generally can view such a display 'free' or with a phone stereoscope. I have already added anaglyph display, which works nicely, thanks so much for that.
I'm sure this is an elementary problem but I do not know krpano well enough to find the solution.
OK, I retract the question. It is an https issue. With a proper localhost or https URL, the Quest 2 shows the stereo tour correctly.
Using stereo panoramas and vtour-vr.config, V.1.22 tools builds a tour that does not go into immersive VR mode on the Quest 2 -- it displays a shifted 'fake VR' pair instead.
I remember that this is the case also for earlier krpano versions. I also remember that there is some secret xml edit that made it work -- but I can't remember what that is. If you know, please refresh my memory.
Or could this be an https issue?
-- Tom