Jump to content

BabylonJS/Gear VR


juanmajr93
 Share

Recommended Posts

Hi all,

I am developing a very interesting project with BabylonJS. Some members of this forum helped me to add many features of my scene. Well, now I have a new goal. I must offer a virtual environment using Gear VR. I don't know if you have used this technology and how are your experiences with BabylonJS. Gear VR offers a WebVR API to load applications web based on WebGL. Another option is to migrate all of my Babylon scene to Unity and later exports this to an APK file. Unity has a plugin to create application for virtual reality with Samsung Gear VR.

What do you advice me?

Thanks!

Link to comment
Share on other sites

I am about to start messing with stuff ion my toolkit.... i currently setup a Camera Rig system for working with cameras... You have two basic chooses...

 

1... VRDerviceOrientedFreeCamera/GamepadCamera

 

of 

 

2... WebVRCamera (Requires there to be an attach VRDevice to the browser... the browser WebVR API handles all the heavy lifting)...

For samsung GearVR you have to activate the WebVR support in the GearVR web browser :

To enable WebVR, all you need to do is open the Samsung Gear VR internet browser on your headset and visit internet://webvr-enable or visit internet://webvr-disable to disable WebVR support.

 

I just bought a brand new Samsung S7 Edge and the 2016 (The Black One) Version of Samsung GearVR headset... Gonna try some VR stuff with my toolkit... Curious to see how WebVR Camera will differ from VRDeviceOriented camera... Mainly how WebVR camera will handle IPD (Pupil Eye Distance)

 

Yo @MrVR We should try the WebVRCamera instead of the VRDeviceOreientedCamera since we both now have samsung S7 devices... Just gotta active like above from device using the gear vr browser then set camera rig to webvrcamera and see what happens :)

 

Link to comment
Share on other sites

Yo @MrVR I finally got my Daydream View headset... Thanks too much... have not even open yet...

Now i got the

1... Homido V2 (which looks great with S7 Edge and has eye distance controls)

2... Daydream View with the hand control from you (THANKS SOOOOO MUCH)

3... The Black Samsung Gear VR free from sprint when i bought the phone (S7 Edge)

I am excited to give Mobile VR another SHOT :)

 I am hoping the WebVRCamera with Samsung GearVR browser makes the IPD eye distance issue a MOOOT point :)

 

Link to comment
Share on other sites

Yo @MrVR Dude... you gotta go get a actual Samsung Gear VR headset... All the clone models fail in comparison... But you can only get the full WebVR experience so we can use in the BabylonJS toolkit games... You gotta have an actual GearVR headset... once you first install into headset it will install GearVR software on your device... One of the that will allow access to Samsung Internet For GearVR with full support for WebVR 1.0... Now the babylonJS WebVRCamera will work...

Dude.. its a whole other experience in the native Samsung GearVR WebVR enable browser than the clone headsets we where using... and should be crystal clear on Samsung S7 Edge running at 2560 x 1440 with like 560+ pixels per inch thru the native browser supported WebVR API not using the native device orientation especially for the compensate distort effect that causes the jitter... Hope its good for IPD as well :)

But really go get a Samsung GearVR headset... The black one... not the white one... :)

 

Link to comment
Share on other sites

1 hour ago, MackeyK24 said:

Yo @MrVR Dude... you gotta go get a actual Samsung Gear VR headset... All the clone models fail in comparison... But you can only get the full WebVR experience so we can use in the BabylonJS toolkit games... You gotta have an actual GearVR headset... once you first install into headset it will install GearVR software on your device... One of the that will allow access to Samsung Internet For GearVR with full support for WebVR 1.0... Now the babylonJS WebVRCamera will work...

Dude.. its a whole other experience in the native Samsung GearVR WebVR enable browser than the clone headsets we where using... and should be crystal clear on Samsung S7 Edge running at 2560 x 1440 with like 560+ pixels per inch thru the native browser supported WebVR API not using the native device orientation especially for the compensate distort effect that causes the jitter... Hope its good for IPD as well :)

But really go get a Samsung GearVR headset... The black one... not the white one... :)

 

send me the link I will get them online. and contact me I want to try it and yeah men I have a cheap version but you can kind of adjust the distance and its crazy inmersive

Link to comment
Share on other sites

@MrVR @MackeyK24 Hi, i have gear vr headset and S7 mobile. I have tested my scene in Bayblonjs with Samsung browser inside Gear and it only offers me a screen to see the application web. It is not inmersive (i am using universal camera and I have enabled WebVr API support)

By this way, are there anyway to get a more inmersive scene?

Link to comment
Share on other sites

@juanmajr93 and @MackeyK24 -

I have been working with the white GearVR for over a year, and find it simple to develop for. I also have the black GearVR, and it doesn't improve anything for me personally - as well as to realize that most users currently use the white GearVR whic is your target audience. I also have the S5, S6, and S7 - and the main difference other than GPU speed is that the S6 is prone to overheat. So with any of the 3 (as they can all overheat with intensive use and shut down on their own) is to buy cheap gel packs and don't freeze them, but simply place the room temperature gel pack on the back of the phone after pluging into the GearVR. Otherwise, if you're pushing any heavy use of your GPU, you'll shut down in about 20 minutes which sucks if you're trying to work (develop). 

As for my own personal process, I generally use the Samsung internet browser, with the browser elements off-display to take my media full screen. And certainly don't launch the Oculus app as it is a paing to develop through this medium. I don't find any advantage in using the WebVR API, as I build my scenes natively in BJS and javascript, and use the WebVRCamera - it's that simple. In my opinion and after developing for more than a year on the GearVR, this is the quickest and easiest process to quickly build content, as using the WebVR API means to slow down my workflow until I have the app developed. Then I can port wherever I need - whether it's GearVR, Cardboard, Vive, etc.

Just my opinion, but I personally would advise keeping it as simple as possible until the content is practically complete and working natively in the Samsung browser for GearVR. And for other VR/AR devices, I keep it equally s simple.

DB

Link to comment
Share on other sites

@juanmajr93 -

It appears you're working within the Oculus environment as seen in the reference image you provided above. However, the way I work is to avoid plugging in the Samgung phone into the GearVR, and simply launch the browser in landscape mode. I then use a MOGA bluetooth controller to control not only my phone's UI, but also my content or game. This is the fastest and simplest method I've found to develop for multiple devices quicky and efficiently, and then once the game is functioning as desired, it's easy to port to practically any VR device. It simply allows speed and flexability working in this method. 

DB

Link to comment
Share on other sites

ok @dbawel I understand you but I have to use the GearVR environment using the Samsung browser. My application works well if I test it in this browser.However, I would like to add the VR mode like you could see in the video. Maybe, could I get it changing to another type of camera? Today, I can only see my web application in the 2D screen:huh:...

Link to comment
Share on other sites

5 hours ago, juanmajr93 said:

ok @dbawel I understand you but I have to use the GearVR environment using the Samsung browser. My application works well if I test it in this browser.However, I would like to add the VR mode like you could see in the video. Maybe, could I get it changing to another type of camera? Today, I can only see my web application in the 2D screen:huh:...

I use BABYLON.VRDeviceOrientationGamepadCamera and move the in the vr scene with the xbox one controller try that ...

Link to comment
Share on other sites

6 hours ago, dbawel said:

@juanmajr93 -

It appears you're working within the Oculus environment as seen in the reference image you provided above. However, the way I work is to avoid plugging in the Samgung phone into the GearVR, and simply launch the browser in landscape mode. I then use a MOGA bluetooth controller to control not only my phone's UI, but also my content or game. This is the fastest and simplest method I've found to develop for multiple devices quicky and efficiently, and then once the game is functioning as desired, it's easy to port to practically any VR device. It simply allows speed and flexability working in this method. 

DB

Hey @dbawel is this MOGA control the same as the the xbox one controller ? I like the fact that you can hold one device so you can sync the video with the vr inside the headset je je.

I'm just testing different controllers but so far the xbox one woks fine 

Link to comment
Share on other sites

@MrVR -

The MOGA Pro controller is the best on the market, and cheap to buy. It has two different modes to connect to your phone or device, and mode A will act as close to the Xbox controller as possible. It's completely plug and play, and even if you aren't developing, will provide the best control for any VR game you have. But for devs, it wil provide all of the standard XBOX control schemes.

DB

Link to comment
Share on other sites

6 hours ago, juanmajr93 said:

@MrVR Umm i dont have any bluetooth controller. Maybe some of VRCameras work fine with touchpad of GEARVR. The before sample works so well with the controller of headset but it is made with three.js...

Humm we may we need to fix this to work with the webVR camera then, I will look into this later this week or let me know if you were able to make it work

Link to comment
Share on other sites

10 hours ago, dbawel said:

@MrVR -

The MOGA Pro controller is the best on the market, and cheap to buy. It has two different modes to connect to your phone or device, and mode A will act as close to the Xbox controller as possible. It's completely plug and play, and even if you aren't developing, will provide the best control for any VR game you have. But for devs, it wil provide all of the standard XBOX control schemes.

DB

Hey  man, I was going to purchase the controller but there are several online maybe some fake who knows,

can you please provide the link where you got yours please I would appreciated if you point me the to the right one.

 

I saw this but they are kind of pricier here 

Link to comment
Share on other sites

1 hour ago, juanmajr93 said:

@MrVR I have bought this controller:https://www.amazon.es/gp/product/B01MDU3NUK/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1 and I will use  BABYLON.VRDeviceOrientationGamepadCamera. I hope that it works!:rolleyes:

 

Hey man I have the same I just go it from best buy and it did not work, so I think you should get the  The MOGA Pro controller That @dbawel mention. I saw one for $16 bucks online but i want to confirm before I buy, but this is cheap.

The xbox one  controller works very well and I think the xbox 360  control works as well, let me know if your work and later I will send you a PM on the one i have when I get home

Link to comment
Share on other sites

6 hours ago, juanmajr93 said:

@MrVR I receibe this controller today and I will test it. I dont know why do you say that it doesnt work.... Maybe the problem is about the camera of babylonjs? I am only intereted in joystick and clic botton and this option is cheaper than MOGA.

Yes I understand , let me know y if does work, I want also to get cheaper controls than the Xbox 

Link to comment
Share on other sites

Hi again, I havent still received the bluetooth controller however I have been making somes tests in my GearVR headset with different cameras. @MrVR @dbawel I have used the follow camera:

 var cameraPosition = new BABYLON.Vector3(600, 200, -500);
 var camera = new BABYLON.WebVRFreeCamera("camera", cameraPosition, scene);

I have activated WebVR API and the result is a white viewport so it doesnt work. If i use other cameras i only can view two reapeated images. have you tested this camera in Gear VR?

 

I have tested other examples like this: http://www.babylonjs-playground.com/#1JSXHW#19 and give me the error "VrFrameData is not defined"... The version of this API is 1.1 https://github.com/w3c/webvr

 

Thanks!

Link to comment
Share on other sites

Hey man, I have not play yet with the GEAR-VR framework I'm not sure if babylon supports it, if it does not, you have to add support for it I think @juanmajr93 , what I do in the mean time I just put the phone in the other direction so it do not hook it into the power jack.

Also ,(and  have n try yet), you could access you oculus gear-Vr chrome browser ans see the app deployed in a website or find your IP and then the localhost  in your phone will be 192.168.xx.xxx:8888 

 

FOR THE WEBVR API I will try this later on but here is the webVr in type script so you can add it to the Babylon library 

https://github.com/retyped/webvr-api-tsd-ambient

Link to comment
Share on other sites

I have read in others topics about BabylonsJS and GearVR with webvrfreecamera and it must work fine. Are there any sample to test in my GearVR with Babylon?

I hope that some developers know why doesnt it work? @AB95 @Wingnut

I also have tested this demo http://david.blob.core.windows.net/babylonjs/SponzaVR/index.html developed by @davrous and when I active VR I can only see two divided screen

 

Thank!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...