Jump to content

Is WebVRCamera for Cardboard devices ?


Vousk-prod.
 Share

Recommended Posts

Hi everyone,

 

Deltakosh, on 03 Jan 2015 - 8:33 PM, said:

    To support WebVR specification (http://blog.tojicode.com/2014/07/bringing-vr-to-chrome.html) and CardBoard devices (https://www.google.com/get/cardboard/)

 

I tried by curiosity to put a WebVRCamera in a scene, I get the expected splitted stereo view with some fov distortion, but the camera is not moving at all, even when changing orientation of the smartphone. Is it expected behavior ?

Is WebVRCamera intended to be used with a cardboard ? And how are we supposed to use it then ?

 

Cheers

Link to comment
Share on other sites

ooops I didn't attachControl ^_^ (I falsly presumed that canvas events listening is not applicable for this kind of camera)

 

Now it moves !! Yeah !!

But roll (alpha) is not taken in account, and pitch (beta) and yaw (gamma) are inverted... (that could be corrected by inserting the phone inside the cardboard in the other direction but that's not possible, the camera hole is on the left, and the magnet button also)

Link to comment
Share on other sites

Another problem : VRDeviceOrientationCamera extends OculusCamera (prototype._onOrientationEvent), but I don't have an oculus rift to check and validate any change in that class...

It seems that the orientation changes come from the "regular" deviceorientation event listener... does the browser catch the plugged oculus rift's movements and convert them to deviceorientation events ?

 

Pretty sure that alpha, beta, gamma values won't be consistent on every different kind of devices AND oculus rift... <_<

Wouldn't be less hasardous to override prototype._onOrientationEvent for the VRDeviceOrientationCamera ?

Link to comment
Share on other sites

Oh, we'll also have to pay attention to gimbal lock problem <_<

Looks like this universal/portable VRDeviceOrientationCamera won't be an easy task, particularly for a non math-skilled people like me :lol: :lol: , but I'll try to do my best !

Link to comment
Share on other sites

@RaananW: I agree we need to be as generic as possible, and taken screen orientation in account seems important for that. But if this camera is specificaly designed for cardboard, the orientation of the smartphone will always be landscape... In fact in general terms, camera designed for head mounted display VR viewing is always stereoscopic, and since we all have our two eyes on an horizontal line, it's always parallel side by side stereoscopy, which usually implies landscape mode for viewing confort.

If we decide to take screen orientation in account, how will we decide when to switch from one orientation to other, do you think that people who "yawed" their head to 90° really would see their scene suddenly changing orientation ? Better to simply continue following their head movement I think.

In fact this screen orientation stuff is a more complex (but interesting) problem. Should the BJS engine lock screen orientation when using this kind of camera, to avoid the browser to suddenly rotate during VR experience ? Is it possible, and is it or not too intrusive ?

Link to comment
Share on other sites

  • 1 year later...
On 3/5/2015 at 7:20 PM, Vousk-prod. said:

@RaananW: I agree we need to be as generic as possible, and taken screen orientation in account seems important for that. But if this camera is specificaly designed for cardboard, the orientation of the smartphone will always be landscape... In fact in general terms, camera designed for head mounted display VR viewing is always stereoscopic, and since we all have our two eyes on an horizontal line, it's always parallel side by side stereoscopy, which usually implies landscape mode for viewing confort.

If we decide to take screen orientation in account, how will we decide when to switch from one orientation to other, do you think that people who "yawed" their head to 90° really would see their scene suddenly changing orientation ? Better to simply continue following their head movement I think.

In fact this screen orientation stuff is a more complex (but interesting) problem. Should the BJS engine lock screen orientation when using this kind of camera, to avoid the browser to suddenly rotate during VR experience ? Is it possible, and is it or not too intrusive ?

Has there been any solution for this? I'd like to be able to toggle between a DeviceOrientationCamera and a VRDeviceOrientationCamera. That way the user can use their phone with or without a Google Cardboard viewer. The rotation and positioning of both camera are really buggy. I don't know enough about device orientation details to attempt it myself. With VR hitting hard this year, this seems like a missed opportunity for Babylon.

Link to comment
Share on other sites

You can switch manually between the two cameras (attach/detach control) according to screen orientation (there is a dedicated js event listener if I remember well).

And after deeper tests, I discovered that the problem is not really the device orientation cameras but... the devices and browsers (for instance galaxy s4 completely messed up the magnetometer data in every browsers and many native apps, but it's ok in cardboard apps because they accessed sensors differently).

Link to comment
Share on other sites

Correct, Vousk. I am able to attach and detach camera accordingly. They just don't play nice with all device orientations like you said. But with Babylon keeping to the theme of keeping things simple, and with the numerous amount of cameras, it'd be great if there was a VR solution that worked. For example with webvr-boilerplate with ThreeJS, there is one camera that toggles in and out of VR mode. With all of BJS's features and tools, I seriously believe that Babylon could kill ThreeJS, if only the WebVR support was better. And I think now is the time to pull ahead with VR becoming so hot.

Link to comment
Share on other sites

For now WebVR is only supported by recent nightly mobile versions of Chromium and Firefox. As usual for new cool stuff, we'll have to wait it becomes a standard for a global adoption... Until that we can't do really better orientation support.

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