AB95 Posted January 17, 2017 Share Posted January 17, 2017 (edited) hi everyone, I look through the forum to see if anyone has worked on a babylonJS example that involved the use of WebVRFreeCamera with Samsung GearVR(with their phone device attached to the gear mini usb), since GearVR's internet browser "Samsung Internet" has webvr supported. But what I found mostly are people suggested using VRDeviceOrientationCamera for GearVR instead, which is using mobile screen as the vr display. So my question is as stated in the title: is it possible to just create a WebVRFreeCamera in the BJS scene for webvr experience to be worked on GearVR? I also found this example which uses Three.js and the webvr api, which I tested on gearVR's samsung internet and it works, but I had never learned Three.js before and I am keen to continue working on a babylon.js scene instead. Edited January 17, 2017 by AB95 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 17, 2017 Share Posted January 17, 2017 Let me ping @RaananW Quote Link to comment Share on other sites More sharing options...
AB95 Posted January 23, 2017 Author Share Posted January 23, 2017 hi everyone, sorry for pushing this up, just wondering if anyone has also tried to convert babylonjs scene into webvr experience specifically in GearVR's Samsung Internet? As I use GearVR to view a babylon demo that features webVRFreeCamera: http://david.blob.core.windows.net/babylonjs/SponzaVR/index.html but the camera doesn't work, and I was wondering the usability of WebVRFreeCamera in GearVR. Thank you. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted January 23, 2017 Share Posted January 23, 2017 Hi AB... sorry for the slow replies. I did a BJS Playground Search for webVRFreeCamera. 87 hits. If you have some time, could you check some of those... with your VR device? Are you seeing any JS console errors... such as "WebVR is not enabled on your browser" ? In older demos such as http://www.babylonjs-playground.com/#1JSXHW#19 ... I think the mouse still worked fine. Currently, it doesn't. So perhaps, webVRCamera has gone broken. Sorry for the inconvenience. I think I'll ping @davrous and see if he has some words for us. Perhaps @Sebavan and @Luaacro might want to visit, too. I think these guys have been studying VR headgear, lately. (thanks for your words/advice, guys!) (I'm just a pinging monster, today, not sure why.) We'll talk more, soon, AB. Thanks for pointing-out this situation. Quote Link to comment Share on other sites More sharing options...
davrous Posted January 23, 2017 Share Posted January 23, 2017 Hello, Thanks @Wingnut for the head up. I've quickly coded this demo: http://aka.ms/sponzavr to show usage of both deviceorientationcamera and webvrcamera. Usage: - Launch the demo - Press the camera icon to switch to "interactive mode" - Press the VR button If the device doesn't have WebVR support (most phones today), it will use the DeviceOrientationCamera. I'm doing feature detection in the code for that. If WebVR is supported, I'm using it. It will works for instance in specific version of Chrome with an HTC Vive for instance like in this video I've made: It uses our WebVR 1.0 implementation so I don't know which level the Samsung is implementing. If it uses 1.1, it won't work. @RaananW is working on it. If you'd like to understand how to code the same experience, simply have a look to the code of: http://david.blob.core.windows.net/babylonjs/SponzaVR/index.js in the switchToVR function. David Wingnut 1 Quote Link to comment Share on other sites More sharing options...
AB95 Posted January 23, 2017 Author Share Posted January 23, 2017 @Wingnut hi, I understand the growing BJS community and it is reasonable for questions being missed sometimes. And as the GearVR is currently not with me, I will test it on tomorrow morning(I currently stay in Singapore, it is now 12.01am). But based on my previous trial and error, there is something I am certain about while testing BJS WebVRFreeCamera with Samsung Internet using GearVR: 1. the device is certain in webvr mode during the testing ( I have seen the "WebVR is not enabled on your browser" error before when I first tried on GearVR,but that is because I have to manually type in internet://webvr-enable in Samsung internet url bar to enable webvr feature, after that the error's gone) 2. I had a button for switching between VRDeviceOrientation Camera and WebVRFreeCamera, if I pressed it to switch camera, it will do scene.activeCamera = new BABYLON.WebVRFreeCamera(...); and log window would return the current scene.activeCamera name. But everytime I pressed, there is no log result which I suspect the failure of WebVRFreeCamera initialisation. @davrous hi, I've seen this video which leads me to the Sponza demo, and I had tested the Sponza scene in GearVR. I can't remember the exact result of pressing the VR button already, it is either 1. switch to deviceOrientation camera(which i should see the two vr viewport display on the flat Samsung internet screen in front of me in GearVR( which is weird, because for what I remember, navigator.getVRDisplays return true during the beginning of each of my testing in GearVR), 2. or the scene shows no changes upon the button press, i will check again tomorrow, and it could be Samsung Internet is using webvr 1.1 too, so I am looking forward for Raanan's new WebVRFreeCamera! Finally, thank you all for the helps, BJS is very easy to learn and it helps me to build 3D scene on web page in a convenient way, I really appreciate all the active responses I got every times I ask a question here. davrous, GameMonetize and Wingnut 3 Quote Link to comment Share on other sites More sharing options...
RaananW Posted January 24, 2017 Share Posted January 24, 2017 I am starting to think that WebVR will eventually be as standard as web standards! I would think that the current implementation should be working, but I totally understand when it doesn't. I will find the time during the weekend and see what can be done! I just sadly have no GearVR, so I will have to trust demos and working implementations. Unless you want to send me one! GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.