Jump to content

BabylonJS/Gear VR


juanmajr93
 Share

Recommended Posts

hi @Deltakosh I am loading my scene from samsung browser and WebVR API (v 1.1) is the library used to reproduce VR in this browser. If I test the camera that you said me  VRDeviceOrientationFreeCamera  I can only see over 2d panel (which appears in samsung browser) something like the follow image. Maybe must I code a full screen??

VR.png

Also if I check this file http://david.blob.core.windows.net/babylonjs/SponzaVR/index.js you can see two declaration of cameras and I dont know what is the chosen camera by GearVR.

        if (navigator.getVRDisplays) {
            vrCamera = new BABYLON.WebVRFreeCamera("vrCam",
                engine.scenes[0].activeCamera.position, engine.scenes[0], false, {
                    trackPosition: true,
                    displayName: "HTC Vive MV",
                    positionScale: 1
                });
        }
        else {
            vrCamera = new BABYLON.VRDeviceOrientationFreeCamera("vrCam", engine.scenes[0].activeCamera.position, engine.scenes[0]);
        }

Although, the result with SponzaVR is the same... two divided screen..

 

Link to comment
Share on other sites

23 hours ago, juanmajr93 said:

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!

hey man I will be working on this camera this weekend let me know if you still have issues 

Link to comment
Share on other sites

Hi @Deltakosh I have tested this code: 

if (navigator.getVRDisplays) {
  navigator.getVRDisplays().then(function (displays) {
	if (displays.length > 0) {
	  vrDisplay = displays[0];
	  alert(displays[0].displayName);
	}
  });
}

If I probe this in my gearVR, it shows me SAMSUNG SM-G920F.

What must I know to be sure that I need WebVRCamera?

The link to import BabylonJS is that:https://cdn.rawgit.com/BabylonJS/Babylon.js/master/dist/preview release/babylon.js" Maybe is it not the last?

Link to comment
Share on other sites

Hi all again, these days I have tested many options to manage that WebVRCamera works.

I have detected the error in browser of GearVR. It is:

Reference error: VRFrameData is not defined

Later, I reviewed the babylon.max.js of 2.6 version and in the line 48541 is the error:

        _this._frameData = new VRFrameData();

This doesnt work in browser of GearVR, maybe do you know the cause? The examples of Three.js works fine with GearVR and use this class too.:(

@davrous @MrVR @Deltakosh

Link to comment
Share on other sites

@juanmajr93

Yes, I am going to work on Babylon's WebVR support in the very near future.

The bug you are describing might shed some light as to why the current implementation doesn't work - we don't fall back to WebVR 1.0, but Three.js does.

VRFrameData is part of the WebVR specifications - https://w3c.github.io/webvr/#interface-vrframedata . We have made a strategic decision back when 1.0 changed to 1.1 to support only the latest version of WebVR. It seems like Samsung's GearVR web browser is still using WebVR 1.0. I found this - https://uploadvr.com/samsung-updates-webvr-support-gear-vr/.

The change between 1.0 and 1.1 is, IMO, a change from pre-alpha version to a stabler alpha. It is not 1.1, it is more of a 2.0 for me. They use different classes and different concepts. 

I will, however, say this - if I find and easy way to fall back to WebVR 1.0, I will do my best to support it in Babylon.js. I just don't want to get too much into "hacks" and spaghetti code in order to support a version that will be gone from the (VR) world in a few months.

 

Link to comment
Share on other sites

Start with NOT plugging into the USB of the GearVR and use the browser of your choice using the VRDeviceOrientationCamera. Then work from there to access the sensor in the GearVR. But first get a simple scene in crappy 3D. And I only say this as current VR is about to change to real AR/VR soon. But there is still a market for Oculus in the next 2 years if you have compelling content.

DB

Link to comment
Share on other sites

 @RaananW - I'm glad you asked. Light field projectors on a molecular scale will be released in 2 years. Oculus and existing other crappy (and I mean this in the best possible way) will die a fast death, as the new technology is realistic light projection directly onto the retina of the eyball. This is not sciece fiction, as I work with Weta directly and have seen it working well. It's simply a matter of mass producing, and to add to this, Luckey Palmer used to be my PA, and took what we we developed for Lockheed Martin and made a fortune. Not to blame him, but there's nothinng new in VR to date. But very soon there will be a seachange in AR/VR.

DB

Link to comment
Share on other sites

Warning, personal opinion!

@dbawel - let me first say - I believe you. New and better technology is already available. And it will arrive pretty soon! But from this to calling the current technology crappy? ...

I know you are glad I asked, you really wanted to write the last paragraph.

Let's just stop developing! WebGL 2.0 will soon be available, so why bother with WebGL 1.0? I say - stop using Babylon.js as a whole. It is using crappy technology. It is also using ES5. And callbacks! Ancient technologies. Better yet, I heard ES7 is coming pretty soon as a standard, so - let's just wait and not use javascript until then.

We are always evolving. And the reason we are evolving is because we are learning. No Matter what we are using. The person who masters WebVR now, will be able to use this technology with better hardware in the future. People who wait and say "well, this is crappy" - they won't.

 

Link to comment
Share on other sites

Some people will find fault with everything, no matter how fantastic it is (and Babylon.js is fantastic). There's always something better just round the next corner - it's the refrain of perfectionists everywhere. Perfection doesn't exist so it's impossible to ever be fully satisfied. I'm not picking on @dbawel here. I say this as a recovering perfectionist myself ;)

Link to comment
Share on other sites

My apologies if I offended anyone. I'm personally developing for several VR / AR devices, and recommend everyone else to try thier hand at it; as much of the dev process will be similar. The only reason I mentioned the word "crappy", is that there is nothing new about this technology in over 10 years time, and I get a headache using the current devices. They are not truly 3D in any way, and simply trick the brain to sort of believe it's a 3D environment. 

But I'm working on these anyway, as I've been for many years.

DB

Link to comment
Share on other sites

Hi man how are you @dbawel I purchase the MOGA, (it came with the R2 button broken btw :( ) , and I install the app but it does not show as its connected with the Bluetooth but I can not make it work on the browser , is there something IM missing, I even read the instructions jaja but I still not figure it out how to make it work

hey @MackeyK24 let us know how you connect yours when you get it 

thanks 

 

 

Link to comment
Share on other sites

@MrVR-

Perhaps you received a defective contoller. Akways use mode A to connect, and there are no issues I've personally found using the GearVR Pro. Also connect using bluetooth after your GearVR and/or Oculus app is loaded.  If I can be more help, please let me know. this is simple to fix if you have any issues.

DB

Link to comment
Share on other sites

1 hour ago, dbawel said:

@MrVR-

Perhaps you received a defective contoller. Akways use mode A to connect, and there are no issues I've personally found using the GearVR Pro. Also connect using bluetooth after your GearVR and/or Oculus app is loaded.  If I can be more help, please let me know. this is simple to fix if you have any issues.

DB

Ok yes on the Gear VR it connects thanks

Link to comment
Share on other sites

@dbawel The most important problem that I have with GearVR is that BabylonJS is not compatible with the API (WebVR) version  supported by Samsung browser. If I use the other camera (VRDevice OrientatioFreeCamera) and I stop the VR service of Oculus I can connect to my usb and test it with Chrome. In this example, I have another problem relatives to performance. FPS is so low... How can I improve this?

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...