matzman666 / OpenVR-InputEmulator

An OpenVR driver that allows to create virtual controllers, emulate controller input, manipulate poses of existing controllers and remap buttons. A client-side library that communicates with the driver via shared-memory is also included.
GNU General Public License v3.0
716 stars 138 forks source link

Use SteamVR Wands with Oculus HMD #56

Open DerKorb opened 6 years ago

DerKorb commented 6 years ago

I tested today, if it was possible to combine the SteamVR wands with the Oculus headset. (Mostly to play FO4).

I found out that it is possible to use the wands with a SteamController USB dongle and managed to have the lighthouse and wands listet in SteamVR.

However, as soon as the Rift is connected SteamVR switches to some kind of Rift mode and the wands and lighthouse are not listed anymore.

Now I have read, that it is still possible to get location data from the wands via OpenVR, so I thought maybe your emulator might be able to do this with some minor changes (Looks like you already get your input from openVR and emulate vive wands anyways).

For matching the two coordinate systems I think it might be possible to mechanically connect a touch controller and a wand, move them around and calculate their offset and the transformation matrix between both spaces from their movement data.

I am not afraid to do some coding myself, but I would be interested in your opinion whether this should work or not and maybe some rough directions how to get your code to do this.

Balderick commented 6 years ago

One solution would be adding a steamvr tracked faceplate to rift hmd and write a proper openvr driver for your custom hmd so that all tracked devices are using the same tracking system to create a pose.

Simply enabling multiple drivers should allow oculus drivers be loaded for hmd and lighthouse drivers for vive controllers and then using inputemulator can he used to make a usable pose.

Adding "activateMultipleDrivers": true to the steamvr section of steamvr.vr settings file is how multiple drivers can be switched on.

DerKorb commented 6 years ago

Great, multiple drivers already allows me to have oculus and vive wands in steam VR. Now I just have to calculate the right transformation and use the input emulators offset functionality. Also steam complains I could only have two controllers although I only did bind one of the wands. Also it would be great if I could just translate the whole Vive space instead of the individual controllers. (Lighthouse also show up in the wrong place). Any ideas about that?

DerKorb commented 6 years ago

I managed to get it to work, seems like everything you need is in place already except for calculating the transformation. It would still be nice, if I could apply the transformation to the whole space somehow so the lighthouses would be rendered right, but fallout already works. Thx for the help.

QUAKEULUS commented 6 years ago

I'm trying to do the reverse of this: use vive HMD with rift touch controllers on same system. Have you had any luck?

DerKorb commented 6 years ago

I guess it should work the same, allow multiple drivers and manually set the transform for the HMD in InputEmulator.

QUAKEULUS commented 6 years ago

It was already ON:

"steamvr" : { "activateMultipleDrivers" : true,

The only thing I managed to achieve, is if connect rift first, then vive, I an add the vive wands.

QUAKEULUS commented 6 years ago

Well, Fallout 4 now officially supports oculus touch controls, but I'm still looking for a way to use touch controls with HTC vive