In case 1 its working correctly. The texture is the diffuseTexture and i can change the uOffset of this texture an see the effect. This is the normal Mode and the texture is in default “Explicit” mode.
But in case 2 (which i need) it is not working. As soon as you set “useDirectMapping: false” so that you can change the “dome.fovMultiplier” a few other things change too. The texture is no longer a diffuseTexture but a reflectionTexture (why???). The texture mode changes from “Explicit” to “Fixed Equirectangular Mirrored”. In this mode, it seems like all Offset, Angle and Scale values of the texture are ignored. What’s bad, because uOffset is exactly the value i want to change in this mode.
So any ideas how to keep case 2 like it is(useDirectMapping: false, dome.fovMultiplier = 0.8), but change the Offset of the texture anyways?
Because we want to use it in VR. And as soon as the dome’s position and rotation are not exactly at (0,0,0) you get this weird zoom effect like described here: Zoom-in and -out effect while rotating head in VR
So we wanted to rotate the dome by changing the uOffset of the texture directly. Which works perfectly in case 1 but not in our case.
hey, i just looked up the source code and it seems like the default rotation of the camera in VR is rotated by 90°. But why is it not at 0 like you would expect it to be. You can look this up here (line 29 defaultCameraOrientationY: -Math.PI / 2,): Extensions/amp-360video.ts at f859d23dea6367b9c3c245dc7a36cb04da1ed91c · BabylonJS/Extensions · GitHub
It seems like your preview 360 video of the tractor (which i used in my playground too) is also rotated by 90°. So the right side of the video is centered as default. But (i might be mistaken) as far as i know, the center of a 360 video should be at front. (not the right side)
This scene changes the location and position of the camera once every second. The image seems to stay correct and not distorted. Is it possible for you to use XR and test it? or are you trying to use an orientation-camera?
Hey, Sorry for the late response (was on vacation).
I just wanted to try your playground link, but when i open it with google chrome and click on the “enter VR” Button i just get “error” (what i almost expected). But when opening it with Firefox i just get this error in the console : TypeError: this._xrNavigator.xr is undefined ( babylon.js:16:1137902)
And no enter VR button is showing, so i cant test your code.
When i try running your “Mansion Demo” for XR (https://www.babylonjs-playground.com/#JA1ND3#161) I get exactly the same error and cant test it either.
and this is the error. The only browser currently supporting proper specs is chrome (and soon Chromium-Edge).
Having said that - WebXR is the future. WebVR was already removed(!) from chrome, so i wouldn’t develop using it. And WebXR is constantly updating and receiving new features.
But as I said, when using Chrome and i click on the button in the lower right corner, to enter XR (in the playground link you provided) nothing happens but “Error” gets displayed on the button and the console logs : “The specified session configuration is not supported.” So what do i have to do, to test it correctly?
Oh, I had a lot of problems with the oculus rift, but I eventually got it to work. A few tips:
make sure unknown sources is enabled in the oculus settings
make sure oculus flag is enabled in chrome flags
play with the sandbox and openxr flags in chrome, i dont remember what configuration i managed to get to work, but this was the culprit in my case. Dont forget to restart the browser every time…
okay i will have a try. But this does not seem very userfriendly to me. As a developer it might be okay, but i cant expect users of the site to check all their settings and test around This seems like a big contra point for webxr at the moment, because webvr in firefox works right away, without changing any settings.
webvr is deprecated, webxr is being developed and officially only supported by windows mixed reality devices and chrome. This is the current state, sadly…
Give it a few months and it will look different. Things are changing rapidly.