Skip to content

Releases: matzman666/OpenVR-InputEmulator

OpenVR Input Emulator v1.3

14 Jan 20:12
Compare
Choose a tag to compare

Finally got Input Emulator working with the new OpenVR driver API. There are some MASSIVE changes to the driver API which required me to completely overhaul the hooking mechanisms and significantly change the inner working of Input Emulator. Therefore the code may (and most probably will) still contain bugs, and some things don't work as expected.

The previous API basically worked as follows:

  1. Driver tells runtime that button 2 has been pressed on device 4.
  2. Runtime tells application that button 2 has been pressed on device 4.

For button remapping i only needed to change some numbers, and everything directly translated to the application side.

The new API now basically works as follows:

  1. Driver tells runtime that input component "/input/grip/click" (that you need to register first at startup) on device 4 has been set to true.
  2. ???
  3. Runtime tells application that button 2 has been pressedon device 4.

To be able to remap buttons I now need to know to what button a specific input component is mapped, which I cannot for all devices. I own only a Vive, so I can only know it for sure for this device. There is enough information on the internet so that I can pierce together a mapping for the Rift, but for other devices like the Windows Mixed Reality headsets some inputs may not work.

Also I can only map a button to another button for which an input component already exists. So mappings to arbitary non-existing buttons will not work. Even some exising ones are now ignored, e.g. it is not possible to map a button to the trigger button on the Vive controller despite an existing suitable input component. I suppose the same is also true for the trigger and grip buttons on the Touch controllers.

For documentation about Fallout 4 VR specific fixes see here.

Changelog

  • Added support for the new OpenVR driver API (Works with all current SteamVR branches)
  • Keyboard bindings are correctly saved into profiles.
  • Keyboard bindings allow to configure whether virtual key codes or scan codes are used.
  • Tuned down volume of audio cue.
  • Other bugfixes and improvements.

Requirements

Requires the newest version of whatever branch of SteamVR you are currently on.

Usage

Installer

Download the installer and then execute it. Don't forget to exit SteamVR before installing/de-installing. After that you can access the configuration overlay in the SteamVR dashboard

Command-Line Client (Optional)

Download the command-line client archive, unzip it, and then execute the contained binary in a cmd window. Enter 'client_commandline.exe help' on the command line for usage instructions.

OpenVR Input Emulator v1.2

21 Dec 21:56
Compare
Choose a tag to compare

Warning: Does NOT work with the current SteamVR Beta.

This is the final version of the Oculus Rift controller fixes for Fallout 4 VR. It allows to emulate trackpad behaviour with the Rift's joysticks. Therefore, on the input remapping pages of each analog axis a touchpad emulation mode can be configured.

Currently there are two modes available:

  • Position Based: This modes assumes that the joystick can only move further away from the center position. All newer positions smaller can the last known position are ignored. The saved highest position is reset when the center position has been reached. The idea is to ignore input events caused by the joystick snapping back to center position. As soon as the center position is reached it is immediately send to the application in a position update. This helps with movement controls as otherwise any movement in an application is not reset when the joystick is let go by the user, and FO4 menus ignore this position update. However, the pipboy map does not ignore this position update.

  • Position Based (Deferred Zero Update): This modes works exactly the same as the mode above with one small difference. The position update when the center position is reached is not immediately send but only when the joystick starts moving again. This helps with the pipboy-map but messes up movement controls. To still be able to move you can configure a toggle button to turn on/off touchpad emulation mode (see below).

To enable/disable the touchpad emulation mode at will you can configure a toggle binding on any digital button. Therefore, select a digital button, select either normal, double or long press, and then select "Toggle Touchpad Emulation" as binding type. Now with audio cue.

FO4 also tends to ignore joystick clicks when the joystick is exactly at center position. To help with this you can also activate the deadzone fix for button presses on the analog input remapping page).

Touchpad emulation mode settings can now be saved into profiles.

Changelog

  • Added Oculus Rift controller fixes for Fallout 4 VR.
  • Added audio cue for touchpad emulation toggle and redirect mode toggle bindings.
  • Other bugfixes and improvements.

Requirements

Requires the newest non-beta version. It does NOT work with the current SteamVR Beta.

Usage

Installer

Download the installer and then execute it. Don't forget to exit SteamVR before installing/de-installing. After that you can access the configuration overlay in the SteamVR dashboard

Command-Line Client (Optional)

Download the command-line client archive, unzip it, and then execute the contained binary in a cmd window. Enter 'client_commandline.exe help' on the command line for usage instructions.

OpenVR Input Emulator v1.1_beta1

21 Dec 21:56
Compare
Choose a tag to compare
Pre-release

Update 3: Final version of Oculus Rift Fix for Fallout 4 VR has been released.

Update 2: The second version of the oculus fix for FO4VR is online. I have refined the deadzone fix for the stick button to not move the player. I also implemented a new method for emulating a touchpad with the stick. This time it uses the position of the stick to ignore any back movements of the stick till it reaches neutral position. Also you can now configure a button to enable/disable the touchpad emulation mode.

To configure it, open the dashboard overlay, select a controller, go to Input Remapping page, select the analog joystick axis, and select a touchpad emulation mode and/or enable the deadzone fix.

To configure the button for toggling the mode, open the dashboard overlay, select a controller, go to Input Remapping page, select any digital button you want, select either normal, long or double press, and select "Toggle Touchpad Emulation" as binding type.

The new settings are NOT saved into profiles yet. I quickly hacked together this version due to lack of time. If I have time again and have confirmed that the fixes are working as intended, I will implement a proper version that does save the new settings.

Update: The oculusfix1 version is a first try to fix the problems Touch user have in FO4VR. Go to the analog input remapping page of the joystick axis and select "Ignore Snap To Neutral Position" and/or "Button Press Deadzone Fix". I don't have a Rift, so it's completely untested. Please report your results!


The big input remapping release. Completely overhauls input remapping and allows to configure remapping on the dashboard overlay. Adding remapping profiles works too. However, due to limited time and energy there are large potions of completely untested code (hence beta), so beware of any bugs.

Changelog

  • Revamped input remapping and added a GUI.
  • Added "kalman filter" and "moving average" as motion compensation vel/acc compensation mode.
  • Other bugfixes and improvements.

Requirements

Requires the newest SteamVR (or SteamVR Beta) runtime. Does not work with the current SteamVR Beta.

Notes

Any third-party application using the Input Emulator API needs to be recompiled to the new API specification due to slight changes.

Usage

Installer

Download the installer and then execute it. Don't forget to exit SteamVR before installing/de-installing.

Command-Line Client (Optional)

Download the command-line client archive, unzip it, and then execute the contained binary in a cmd window. Enter 'client_commandline.exe help' on the command line for usage instructions.

OpenVR Input Emulator v1.0.3

05 May 20:17
Compare
Choose a tag to compare

Attention: SteamVR Beta 1495144709 (the one that added SteamVR Home) changed some things internally causing the overlay to crash. Use the SteamVRHome version when you want to use SteamVR Beta 1495144709 or greater, for earlier versions use the other installer.

Update: Added vel/acc compensation modes & some bugfixes.
Update2: Fixed bug in redirect mode.

Requires the newest SteamVR (or SteamVR Beta) runtime.

This is still WIP and will contain bugs.

Installer

Download the installer and then execute it. Don't forget to exit SteamVR before installing/de-installing.

Command-Line Client (Optional)

Download the command-line client archive, unzip it, and then execute the contained binary in a cmd window. Enter 'client_commandline.exe help' on the command line for usage instructions.

Vel/Acc Compensation Modes:

The problem with only adjusting the headset position is that pose prediction also takes velocity and acceleration into accound. As long as the reported values to not differ too much from the real values, pose prediction errors are hardly noticeable. But with fast movements of the motion platform the pose prediction error can be noticeable.

Available modes are:

  • Disabled: Do not adjust velocity/acceration values.
  • Set Zero: Set all velocity/acceleration values to zero. Most simple form of velocity/acceleration compensation.
  • Use Reference Tracker: Substract the velocity/acceleration values of the motion compensation reference tracker/controller from the values reported from the headset. Most accurate form of velocity/acceleration compensation. However, it requires that the reference tracker/controller is as closely mounted to the head position as possible. The further away it is from the head position the larger the error.
  • Linear Approximation (Experimental): Uses linear approximation to estimate the velocity/acceleration values. The used formula is: (current_position - last_position) / time_difference, however the resulting values do cause a lot of jitter and therefore they are divided by four to reduce jitter to an acceptable level.

OpenVR Input Emulator v0.1

08 Feb 19:08
Compare
Choose a tag to compare
Pre-release

Driver

Download the driver archive and copy the contained directory into "\drivers".

The activateMultipleDrivers setting must be set to true in the steamvr.vrsettings, otherwise SteamVR will not load the driver.

Client

Currently there is only a command line client available. Download the client archive and unpack it. Enter client_commandline.exe help on the command line for usage instructions.