ValveSoftware / steamvr_unreal_plugin

SteamVR Input Unreal Plugin - Documentation at: https://github.com/ValveSoftware/steamvr_unreal_plugin/wiki Sample project (UE4.15-4.23): https://github.com/ValveSoftware/steamvr_unreal_plugin/wiki/sample/SteamVRInputPlugin.zip Sample Project (UE.424+): https://github.com/ValveSoftware/steamvr_unreal_plugin/wiki/sample/SteamVRInputPlugin_UEIntegrated.7z
Other
168 stars 29 forks source link

4.24.1 UE4 VR Template no Vive controller tracking #112

Closed eliotbnz closed 3 years ago

eliotbnz commented 4 years ago

Every scene I have created using 4.24.1 no longer works with the VR template when it is packaged. 4.23 works perfectly. I have tested with the default template scene using both engine versions, and it is only 4.24 that refuses to cooperate.

Essentially what is happening is the vive controllers are no longer being tracked, and within the headset, SteamVr is throwing up a window stating "Vive Controller binding for "My Project Name" was not set. Please select a binding option from the list or create a new one."

Creating new bindings doesn't work, as none of the action mappings appear as options in the controller binding menu.

If I package the project with pak files, I can take the SteamVRBindings folder from the base engine version install, put it in the config folder in the packaged game, and the controllers will then track, but with no bindings... Given you have incorporated SteamVR Input into the SteamVR plugin for 4.24, I suspect something has gone haywire here.

1runeberg commented 4 years ago

Hi @eliotbnz -

Thanks for the detailed report.

The new SteamVR Input System requires the json bindings to function correctly. these should be automatically packaged outside the pak files when you do a build and we've tested prior to 4.24 release.

I've just tested the UE4 public version in the Launcher, and with 4.24.1 it does seem that the engine isn't packaging the json config files.

I've also tested with 4.25 (Github-master) and the json config files are being packaged properly in this release.

The behavior may have been introduced in 4.24.1 and is something outside the control of SteamVRInput. I'll coordinate with Epic and provide updates in this ticket.

In the meantime, you can manually copy Config/SteamVRBindings in your project to the packaged build directory here: e.g. /WindowsNoEditor/{Project Name}/Config/SteamVRBindings

You may need to create the Config directory as well.

eliotbnz commented 4 years ago

Hi @eliotbnz -

Thanks for the detailed report.

The new SteamVR Input System requires the json bindings to function correctly. these should be automatically packaged outside the pak files when you do a build and we've tested prior to 4.24 release.

I've just tested the UE4 public version in the Launcher, and with 4.24.1 it does seem that the engine isn't packaging the json config files.

I've also tested with 4.25 (Github-master) and the json config files are being packaged properly in this release.

The behavior may have been introduced in 4.24.1 and is something outside the control of SteamVRInput. I'll coordinate with Epic and provide updates in this ticket.

In the meantime, you can manually copy Config/SteamVRBindings in your project to the packaged build directory here: e.g. /WindowsNoEditor/{Project Name}/Config/SteamVRBindings

You may need to create the Config directory as well.

Thanks for that. Unfortunately, your fix doesn't work either. I have tried that already, and while it allows for the controllers to be tracked, none of the default bindings work any longer.

As a side, I tried it with the Unreal Studio Collab Viewer Template also, and found that some of the default bindings work in some way, but they seem to be attached to entirely new buttons on the vive, and even then are limited. I'm really surprised this has made it through to a released build of the engine - seems very amateur on their behalf.

1runeberg commented 4 years ago

@eliotbnz - it's likely a regression somewhere. engine hotfix 1 as far as im aware are merely crash fixes, so understandable a full regression test didnt occur. anyways, awaiting Epic feedback and will let you know.

I'm getting proper inputs and tracking on my tests with a fresh vr template and doing the manual copy. please note the directory needs to be copied from your project config directory and not the ones in the engine config (if i understood your initial post correctly).

if you're still having issues, send me a copy of a base vrtemplate project you have and the corresponding build and i can double check those and provide feedback.

eliotbnz commented 4 years ago

@eliotbnz - it's likely a regression somewhere. engine hotfix 1 as far as im aware are merely crash fixes, so understandable a full regression test didnt occur. anyways, awaiting Epic feedback and will let you know.

I'm getting proper inputs and tracking on my tests with a fresh vr template and doing the manual copy. please note the directory needs to be copied from your project config directory and not the ones in the engine config (if i understood your initial post correctly).

if you're still having issues, send me a copy of a base vrtemplate project you have and the corresponding build and i can double check those and provide feedback.

Thanks, I appreciate it. The Config/SteamVRBindings folder doesn't exist in my 4.24.1 project regardless. All I have in there is the "Default..." files. They don't exist anywhere in the project, nor any I create from scratch using 4.24.1. SteamVR plugin is enabled.

1runeberg commented 4 years ago

that's very odd -- can you send me the test project you have please.

also, is it in version control? if so, ensure that the engine is able to create new folders under Config

eliotbnz commented 4 years ago

Packaged file or .uproject?

No version control - it's as simple as it gets - just me working on a single UE4 template.

1runeberg commented 4 years ago

just a zip please of the whole directory of your test project excluding Build, Intermediate, Saved and Binaries sub-folders.

eliotbnz commented 4 years ago

https://drive.google.com/file/d/1RilpBfOCAsG0VKH5bwpEl55E-ftz4Ozp/view?usp=sharing

Is that what you're after?

1runeberg commented 4 years ago

Hi @eliotbnz - thanks for the file.

Ok so with stock 4.24.1 (Launcher version) and stock SteamVR, opening the same project you are testing with, the SteamVRBindings folder is being generated as expected including all the correct json files:

image

I've also done a test build, created a Config directory and underneath it placed the SteamVRBindingsFolder (and all the json files) from the Project and everything is working as expected.

Other than the permissions issue, all I can think of is the Engine is using Oculus as the primary VR platform, but since your hardware is Vive, this shouldnt be the case. And I'm assuming your SteamVR is running based on the Issue Report.

You may want to verify though the integrity of your UE install and check if there are any relevant error log entries when you're opening the project. The plugin automatically creates the SteamVRBindings Folder and all the relevant jsons on startup and on every input mapping change if needed.

The folder not being packaged by UE is certainly an issue and awaiting feedback from Epic on, but the plugin not generating the SteamVRBindings folder itself isn't from my tests. In fact, without this folder no inputs including tracking should be working even in the UE4.24 Editor either.

if you're still stuck after the above - send me your SteamVR System Report and UE4 Project Logs for analysis. There may be some sensitive info on the logs, so you can send them over to runeb@valvesoftware.com.

1runeberg commented 4 years ago

@eliotbnz - are you still having issues with the SteamVRBindings folder not auto-generating on your project/environment?

As for the packaging issue, it seems this is fixed in the upcoming engine hotfix 4.24.2. Still not sure when the engine regression happened but will keep a close eye on it.

eliotbnz commented 4 years ago

I am. I've now tested it on my own home PC and experiencing the same behavior. I'm going to uninstall all the UE4 versions, and the epic launcher and start fresh and see what happens

eliotbnz commented 4 years ago

Have uninstalled all versions of the engine, removed Epic Games launcher and reinstalled all and still the issues persist - applies to both my work PC and home PC. I see others on the Epic forums are suffering similar issues, some have fixes , some not, though the fixes seem to apply to earlier versions. I have disabled all other VR related plugins, to no avail.

Is there any means to simply disable the Steam VR Input part of your plugin so I can revert to previous method of controller tracking and binding? I'm getting some pressure from my client and my project budget is getting drained on something I've never had issues with previously.

eliotbnz commented 4 years ago

I've checked my log when opening the project - no relevant errors I can see, though perhaps I'm not looking in the right place.

As a side - would it matter if I have the Vive running on the machine I am working on and packaging the project? I have SteamVR on both my workstation and our VR test-bed machine (latest version of SteamVR) but only the test-bed machine has the Vive running on it. I assume not, but worth checking as you mentioned it trying to use the Oculus by default.

1runeberg commented 4 years ago

Hi @eliotbnz - Thanks for the update.

Just to be clear that we're not mixing up issues here:

(1) Issue with Packaging - This is an Engine issue, can confirm Epic has this resolved for 4.24.2 (unreleased)

(2) Issue with SteamVRBindingsFolder not being generated on the VR Template in UE 4.24.1 - This is the one we can't replicate on our end, including prior QAs by Epic and us..

So for (2), can you send me the Project Logs please after you open the test project you sent earlier? Also, the SteamVR System Report:

image

As I mentioned on my last response, this could contain some system info you may not want to share publicly so you can send them to runeb@valvsoftware.com instead.

~~Re: Epic Forums Can you share the forum post links to me please so we can assist the developers there as well.~~ Found it, seems we missed the notifications on that thread - they're not related to this folder issue you are having though but thanks for bringing this to our attention.

Re: Disabling the Input Module UE4.24 introduced significant XR changes including the SteamVR Input System, this is now the only way to do SteamVR Input in UE with the built-in plugin and therefore not possible to disable the input module.

Re: Hardware SteamVR MUST be running for any of the plugin features to work (creating the SteamVRBindings folder, generating jsons, processing input, etc) - this is normally opened by the Editor automatically for projects with the SteamVR Plugin enabled. You should also see a SteamVR Menu appear in the toolbar.

Packaging may work but please note Issue (1).

1runeberg commented 4 years ago

Hi @eliotbnz - FYI, the Hotfix 2 has been released today. Automatic copying of the SteamVRBindings folder to a build is still unfortunately buggy and unreliable. The Epic Build team is still looking at this.

In the meantime, it'll be safer to simply copy the SteamVRBindings folder in your project to your packaged build.

If you're still having issues with the folder being generated in your project, the only way we were able to replciate this behavior is when SteamVR isn't running or running with an error code (e.g. no HMD connected). But let me know how you're going and if you can share those logs for review if you are still having problems with this.

cavesrd commented 4 years ago

not sure if anyone is still having problems with this, but I'm also unable to generate the steamvrbindings folder for the VR template in 4.24.2. I'm using an oculus rift CV1, @1runeberg you mentioned that it could be related to the engine using oculus as the primary vr platform? I want my current project to be compatible with all headsets but I currently only have the rift to test it on. I was thinking of trying to build the VRtemplate without connecting my rift, or is there anything else you would reccomend that I try?

1runeberg commented 4 years ago

@cavesrd - When you open the editor, do you have the SteamVR toolbar button visible?

image

SteamVR must also be up and running properly (no errors, headset is detected).

cavesrd commented 4 years ago

@1runeberg thanks for getting back to me, no the toolbar is not visible, neither does ue4editor.exe appear in steam vr when I attempt to set the controller bindings. I was thinking I might try a fresh reinstall of 4.24 today

1runeberg commented 4 years ago

@cavesrd have you tried disabling the Oculus plugin already? (in case I misread your first question). The SteamVR plugin doesn't need the Oculus plugin to use Oculus hardware.

You can also change the hmdpriority in your engine.ini, but for builds we recommend disabling the plugin that's not bound for a particular platform's store.

cavesrd commented 4 years ago

@1runeberg that did it! I wouldn't have thought to disable oculus because becuase my previous games have used both plugins simultaneously without a problem. really appreciate your help, I can get my game packaged and sent now!

eliotbnz commented 4 years ago

I have managed to get this working with the latest hotfix. However, I have a question about how it is implemented.

Almost all our work is done on our workstations, which aren't connected to a headset. It seems that this is what is causing the issue. The steamvr plugin doesn't seem to run because there is no headset detected. Even opening the same project on a machine with the headset running, the plugin will still refuse to run, and as a result, the controllers are not tracked and none of the bindings work. The steamvrbindings folder is generated, to no avail. If I make a blank project from fresh on a machine with the headset working, and then migrate my levels across, it all works as per, but this is a pretty janky approach.

1runeberg commented 4 years ago

A fix for the original issue for this thread is bound for UE4.26 as per Epic XR Team (correct project json files not coming across in packaged builds)

cwarns commented 4 years ago

Looks like we have similar issues. I'm in the middle of trying to find out why my toolbar won't show up in 4.25 we previously had this working in 4.23 but since the merge happening with SteamVR plugin, we can't seem to work our way through the random bugs that show up on various machines. Unfortunately we have not found a solve yet. Was hoping there's still some open conversation in this thread...

Changing the priorities for the HMDPluginPriority within the DefaultEngine.ini for the project resolve the issue of SteamVR being able to recognize UE4 for the controller bindings.

As mentioned above in this thread, there are no errors within the steamVR console that i can see. I do have the Null driver enabled and that seems to be loaded fine within the console. Unreal has generated the bindings, but i can't see the steamVR input tool within the UE4 editor. Any idea where i can look to find out what's causing this not to show up?