HOW TO: Play any VR Game With Full Locomotion on Omni! Arizona Sunshine Verified

2

Comments

  • JoeJoe Posts: 160
    Hey guys, working on this now. Quick question: Anyone know the story behind the 'gamepad' mode and it not working with xbox controller based games? My understanding is a user usually has to use a tool (x360?) to have the Omni emulate a 360 controller when in 'gamepad' mode. The reason I ask, is I have two choices on this...I could try to capture the omnis gamepad outputs and then send them directly as analog stick movements...or I can just take wasd and send those. The gamepad might actually be awesome for games that support analog movement (different speeds vs. just walk OR run). It looks like the openVR Input emulator has a library, so this may be more direct than I expected to pull off
  • EVOLEVOL Posts: 123
    edited November 15
    I can't tell you why Virtuix choose to use DirectInput instead of Xinput. VirZoom and from what I understand Katwalk is DirectInput also. I personally have no interest in keyboard mode. Analog controls are a requirment for a good experience. I don't know how much your able to do but it would be awesome if you could add a DirectInput controller option into the controller menu on OpenVR-InputEmulator which could then be remapped within VR.
  • EVOLEVOL Posts: 123
    edited November 15
    The program usually used for DirectInput to XInput is x360ce. FreePIE can also do DirectInput to Xinput emulation.
  • JoeJoe Posts: 160
    Gotcha, perfect. The way I imagine this working then is I’d build a direct input “client” that would re-emit the inputs as touch/Vive controller inputs. I have to make sure I can capture direct input messages when not in focus. I’m working on getting a build environment setup still and going through the source
  • JoeJoe Posts: 160
    Ok quick update on where I got, and to share info in case someone else is working in parallel.

    To build the OpenVR Input Emulator solution, you'll want to do everything in 'initial setup' here: https://github.com/matzman666/OpenVR-InputEmulator/blob/master/Readme.md
    He uses the Boost libraries, and QT, but you can remove the Leap motion project. After that I was able to build fine (protip: install boost somewhere like c:\local\boost, and then copy it over to the third party directory...otherwise you may get weird errors)

    After that, there's a lib that we can build against or extend to do what we want to inject input, and the console project is a great sample for how to do that. That all being said, there's still a challenge....we need a listener for directinput that can capture the low level calls without a window...what this means is that if a game has 'focus', any input from direct input goes directly to that game...and not to our little listener that is trying to intercept it and translate it to what we want. I just built a demo using rawinput apis (the modern way to listen to directinput calls) however when it isn't in focus, it doesn't work (as expected due to what I said previously).

    However it seems that FreePie is doing this somehow...so I'll dig into that source next. It might still be sloppy, but the 'fix' may be to have freepie call directly into openinputemulator...we can make the install easier by bundling them together and scripting the install/setup. I may actually do that as a hack in the short term if I can get it done in the next few days. No promises though, this is going to be like peeling an onion...there's layers of problems to get past.

    Long term, I could see pulling the directinput listeners out of freepie, wrapping them against the lib in openinput emulator, and then having 2 steps: install openinputemulator to get the driver, then running our custom 'Omni to thumbstick' app. But we're several iterations from that at this point.


  • JoeJoe Posts: 160
    Some other quick useful notes:
    FreePIE is pulling directinput in via slimdx: https://github.com/AndersMalmgren/FreePIE/blob/master/FreePIE.Core.Plugins/JoystickPlugin.cs

    Evol's Freepie thread (and others) about getting this working (putting it here as something we should watch for developments in case more info comes in: https://www.mtbs3d.com/phpBB/viewtopic.php?f=139&t=22219&sid=ecc7611839e03139f5dc786097f8b6c5) (also great job man getting things this far, I can see you've been putting in quite a bit of work there!)

    I have to get some sleep, I'll try to keep at this.
  • EVOLEVOL Posts: 123
    edited November 15
    UPDATE: I think the conflict with some games not working with the Hydra driver is related to the Unreal engine. I got Killing Floor: Incursion today and of coarse it being an Unreal game it has the same issue. So I decided to disable the driver during launch and re-enable it after the controllers/hands were working in game. It was a success! I have not tried all the games that were on the not working list but I think they should all work now. Instructions updated with new method to play Unreal Engine games. As Robo Recall is an Unreal game I'm going to assume Oculus games running through Revive don't have this issue.

    Unreal Engine games require Hydra disabled before launch.

    (These games will have no controllers when launched with the driver active. You can still use the driver, just not at launch.)

    Select Device: hydra0, Device Mode: Disable, and Apply (Also do this for hydra1)

    After the game is loaded and you can see your controllers/hands. Return Device: hydra0 to Device Mode: Default and Apply (You only need hydra0)
  • JoeJoe Posts: 160
    Quick update from my end: Rawinput allows us to monitor 'gamepad' inputs from background tasks. This means I'm able to write an app that can be minimized, but listen to input from the Omni. I have that part working with a different gamepad, but not yet on the axis. Next up I'll start a project that listens for the axis (working from this sample: https://www.codeproject.com/articles/185522/using-the-raw-input-api-to-process-joystick-input) and combines that with the lib for doing the vr input emulation. As I think about this..what we really want is something that listens to gamepad input, and then translates that to either vive or occulus touch input...it's not really something that is Omni specific necessarily. Anyway still plugging away, and I want to document my progress in case another decides to jump in.

    TLDR: Still working on it. approach = Rawinput + openVRInputEmulator lib
  • EVOLEVOL Posts: 123
    Awesome Joe I look forward to seeing what you come up with.
  • sparentsparent Posts: 2
    EVOL and Joe - I just wanted to say thank you for your work and dedication. I too am still waiting for my Omni. It has been an up and down ride for sure.
    The forum was a sad place. EVOL, you have brought life back to it. Joe, I’m glad you didn’t give up. You two have brought me hope again. :)
  • coolrain82coolrain82 Posts: 13
    edited November 17

    I installed the emulator

    C:\Users\yourname\AppData\Roaming\matzman666
    says does not exist, {i did change my name
  • EVOLEVOL Posts: 123
    edited November 17
    You will need to start SteamVR one time. Maybe even open OpenVR-InputEmulator and create an empty profile first. Sorry didn't think about that before.
  • oh wow you are here i was expecting an answer much later. Also to confirm this runs games in oculus rift as long as steam vr is turned on or run games bought only from stem vr for oculus rift?
  • EVOLEVOL Posts: 123
    edited November 17
    It runs only in SteamVR however with Revive you can run your Oculus Home games with an Oculus Rift/Touch through SteamVR.
  • EVOLEVOL Posts: 123
    edited November 17
    sparent said:

    EVOL and Joe - I just wanted to say thank you for your work and dedication. I too am still waiting for my Omni. It has been an up and down ride for sure.
    The forum was a sad place. EVOL, you have brought life back to it. Joe, I’m glad you didn’t give up. You two have brought me hope again. :)

    Yeah, the consumer Omni was dead in the water before this. Hopefully all the people who gave up on their Omni will find this before selling it off.

    I'm so glad I figured this out and happy to pass on the knowledge for others. ;)

  • for some reason axis0 (trackpad) [r;3] is not appearing in the remap choices
  • EVOLEVOL Posts: 123
    edited November 17
    Hmmm let me boot up my Oculus system and take a look...

    Well SteamVR needs to update on my Oculus machine and it currently says 45 mins... My internet is slow...
  • I actually got that part, it says 6 since (L) oculus controller is designated as 6. My next question is when you said redo for the other controller you meant right controller with use of hydra right?
  • EVOLEVOL Posts: 123
    edited November 17
    Yes but it's probably not necessary for Oculus Touch. It's more for the ambidextrous Vive wands or if your left handed and you select to use the right hand controller for movement ingame options. As for the left/right hydra it doesn't matter they are both mapped to the Omni you don't need to map both only one.
  • I got it working. Question the decoupling in omni does not work on this, i still move to where my face is pointed?
  • EVOLEVOL Posts: 123
    edited November 17
    You select in game either head direction or controller direction. The Omni doesn't send the ring information through joystick controls sadly.
  • It works weird with pavlov. noticed that if i walk forward it goes forward, i walk back it goes back to go sideways kick your rigt foot towards right strafe move left foot towards left. Info purpoae, havent tried with other games.
  • BTW thank you so much for this, i almost was disappointed with this omni because of no suport.
  • EVOLEVOL Posts: 123
    Hmmm... I don't have Pavlov to test. I'm trying to understand your issue so are you saying that when you step left on the Omni you move right in game?
  • its like it doest matter where i am facing. imagine a clock and you are in the middle, it doesnt matter where you face if i run forward i move towards 12 oclock, i swing my (R) foot (R) i move 3 oclock, if i run back i move 6 oclock, will do further test.
  • EVOLEVOL Posts: 123
    edited November 17
    So when you turn on the Omni you can't turn and run forward in a different direction in game?
  • Lets say i started the game and i am facing forward that's my original 12, if i face 3 and run forward i move towards 12 bur is facing 3. if i am facing 12 and swing my foot towards 3 i move towards 3.
  • EVOLEVOL Posts: 123
    edited November 17
    Well that's strange I haven't came across anything like that in other games I've tested. Maybe some option in game can correct it. When you use the touchpad it works this same way? Maybe a 360 rotation option in game?
  • I dont know yet need to make more test, also the green thing with hydra wont turn off by pressing space bar
  • EVOLEVOL Posts: 123
    You have the script running in FreePIE?
2
Sign In or Register to comment.