Jump to content

sony PSVR and PS4-controller


javalang
 Share

Recommended Posts

Hi,

can someone give me some advice how to use a sony headset in conjunction with babylon.js and browser on pc side? Are there any projects outside? Is it in general possible to config a camera to bring the right output format? How can the controller configured to give the right input (Keyboard  mapping)?

Or should I forget the idea adapting a sony VR system to babylon.js?

Thanks in advance for some hints,

greetings to all

Link to comment
Share on other sites

Hello,

To use Babylon.js on a VR headset, you need to go through WebVR. Neither the PS4 or the PSVR on a PC works with WebVR. 

Now, if you talk about such approach: http://www.tomshardware.com/news/psvr-on-pc-trinus-psvr,33461.html, maybe our VRDeviceOrientation camera could work if the device is exposed as an accelerometer usable from the browser via the Device Orientation API. This is how we were doing the first demo of VR in Babylon.js with Oculus DK1 in IE11 with a specific windows driver we wrote a couple of years ago (long before WebVR ;))

David

Link to comment
Share on other sites

Thank you David,

I already found out TrinusPSVR and PSVRToolbox - which seems more interesting because the accelerometer data of the headset is sent via UDP (in json format). But  unfortunately I'm far away to know how webvr drivers are working. IMHO it could be possible to modify/extend an existing driver to accept this data ?!

Nevertheless I have to dive deeper in the WebVR topics, maybe there are some guys more with experience in this direction,

again thank you,

Cheers Hans

 

Link to comment
Share on other sites

  • 5 weeks later...

For all users interested to connect a PSVR + controller to a PC and run BABYLON, its much easier than expected (there is no need for WebVR/Steam/SteamVR):

1) With PSVR connected (USB and HDMI) and powered on, start TrinusPSVR (my version is 0.6, license to pass the 10 min limit is about 7$)

2) On TrinusPSVR select PC-Mode (Mouse), PSVR-Display (i.e. \\.\DISPLAY2)  and PSVR-Mode (VR) and start (Headtracking is now running as mouse-pointer, PSVR-Display is expecting a SBS window)

3) Optionally use DS4Windows to connect a PS4 Dualshock controller

4) Run browser with your BABYLON scene in fullscreen (i.e. chrome in kiosk mode) and shift it to the PSVR-Display (Shift-Windows-key + left-Arrow-key)

5) Move the mouse to the PSVR-Display, click and use the headset to enjoy :)

PS: For your scene, make following assignments:

var metrics = BABYLON.VRCameraMetrics.GetDefault();
metrics.hResolution = 1920; metrics.vResolution = 960;
camera.setCameraRigMode(BABYLON.Camera.RIG_MODE_VR, {vrCameraMetrics: metrics,interaxialDistance: 0.1637 });
camera.inertia = 0; camera.angularSensibilityX = camera.angularSensibilityY = 200;
scene.onPointerDown = function (evt) {canvas.requestPointerLock();} 

 

Link to comment
Share on other sites

I tested

  • VRDeviceOrientationFreeCamera
  • WebVRFreeCamera
  • ArcRotateCamera+setCameraRigMode

They all worked, which to use depends on your szenario

BTW: For testing without a headset, you can use the controller and check the option Gyro->Use as mouse in DS4Windows. The gyro part of the controller is functioning now like a headset .Of corse now you have a split screen in the browser window  but you don't need the PSVR and the TrinusPSVR software.

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