SteamVR / OpenVR

I wish there were going to be more than 1200 dev kits for the Vive - I’ve got a VR game that uses Hydra and supports the Rift right now that would be perfect for the Lighthouse controllers.

I don’t believe there is any real source for this information, I think this is hearsay based on some articles reporting that 1,200 dev kits will be released to the press and some universities.

I just wanted to note that I’m having trouble packaging up SteamVR support. It works with my DK2 in the editor for testing purposes but when I package it up it crashes on launch with or without a headset plugged in. The Oculus plugin works fine packaged but disabling that and enabling SteamVR breaks. I’ve filed a bug report on answerhub but posting here to bring attention to it: [4.8p2] SteamVR Plugin Crashes Packaged Build on Launch - UE4 AnswerHub

It is really cool though seeing your program fade into the empty white room that is the SteamVR compositor default view while using the editor, would be awesome to be able to package it up soon to share with others!

If you’re running with my 4.7.6 github branch, you need to manually copy Engine\Binaries\ThirdParty\OpenVR over into your packaged build. Keep the full relative path.

This shouldn’t be required with 4.8. I’ll update my GitHub branch to note this.

Thanks! Unfortunately the build I’m using is a few checkins away from 4.8p3 which got released today and I don’t see anything in there that would reflect that. I’ll check to see if everything got copied over when I get home, but as of now it is a 4.8 packaged build that is failing to run, builds fine though and runs in the editor great :slight_smile:

I just confirmed that the directory is copied in 4.8 and while it only had the win64 folder with dll copied, adding the win32 version didn’t change anything, same crash on startup of packaged build.

Ok, we just hit this as well internally. I’m still trying to find the correct solution, but for now, take:


and copy it to your packaged Engine\Binaries\Win64

We’re working on a real fix.

Also scratch that, this temporary solution has other issues.

Glad it isn’t just me :slight_smile: Also, steam_api64.dll is currently copied to: Engine\Binaries\ThirdParty\Steamworks\Steamv132\Win64 in my packaged build. I’ll wait for the fix, but it is so close considering how well it runs from the editor. Performance should hopefully be even better packaged and no editor running much like binaries using Oculus plugin is when I build that way.

Also, is there a priority for plugins? Should I enable one or the other or will the Oculus plugin take precedence for their headsets and I can package with both enabled? Also, is there a way to force SteamVR mode if a packaged build has both for testing purposes?

Hopefully this is the real fix for now:

The issue is that we are still on Steamworks 1.32 which still has the old SteamVR API exposed. So for any potentially shared export functions, I use GetProcAddress to explicitly grab the function pointer from the correct DLL.

And yes, there is a way to set HMD plugin precedence, at least in 4.8. Please see BaseEngine.ini in 4.8p3+:

; Since SteamVR also works with the Oculus Rift, give priority to the native Oculus plugin before trying SteamVR

Note: you should be able to ignore the steamvr.h change in that commit. It’s a much less scary commit without that file, which we never include :slight_smile:

Thanks! This is perfect. I will test the fix tonight but your checkin came an hour after I was done for the day. And yeah, my eyes just glazed over when I saw the steamvr.h file, the rest makes sense but I still wouldn’t have guessed :slight_smile:

Edit: It did work eventually after multiple rebuilds. Not sure why sometimes it fails. I’ve been having packaging issues with 4.8 including Tick events not firing, etc… maybe this is one of those random need to keep rebuilding till it works issues?

It didn’t work. I ended up getting the following message: Plugin ‘SteamVR’ failed to load because module ‘SteamVR’ could not be found. Please ensure the plugin is properly installed, otherwise consider disabling the plugin for this project.


Make sure the plugin is enabled. Also make sure that the .uplugin still has ‘enabledbydefault’ set to true.

Then rerun ‘generateprojectfiles’ and build (no need for a full rebuild) again. When in doubt, touch steamvrhmd.cpp just to see if it actually builds and links.

Edited above. It did eventually work, on my last rebuild as I was posting this! Thanks again for all your help, looks good now!

Question: In terms of visual quality, is SteamVR better than Oculus? Has anyone tried both?

Also, what about performance? Any noticeable difference?

Picture quality-wise the rendering seems the same to me in-engine. The only difference is that it does feel slightly less responsive than the Oculus plugin, I’m guessing this is due to the lack of timewarp support as I don’t think they are using the Oculus driver but rather their own. I could be wrong. Hopefully with late-latching which applies to both Oculus and SteamVR and some other optimizations the difference won’t be as stark. I’m sure by the time both devices are out the differences will be negligible, for now though even with fast hardware timewarp does add a slight advantage in that there is one final tweak based on head orientation before rendering out to the eyes and that helps a lot.

We are building content that we would like to demo on a Vive system at some point.

Will we need any special license keys to enable Vive support when we go to hook up the HMD?

Do you have to be logged into Steam or does the new OpenVR release allow you to run without connection to Steam?

I don’t know 100% but I expect that there shouldn’t be any keys needed. With my DK2 I just needed to have the latest SteamVR beta installed through Steam, I don’t even have Steam itself running.

I did find that the plugin priority feature in the BaseEngine.ini no longer works in the latest source build so I had to disable the Oculus plugin completely to get a Vive build, but otherwise it works quite well and pretty much seamlessly like the Oculus plugin.

I have tried both HMD and in terms of visual quality they are both about the same. However the Steam controllers are amazing and I would get SteamVR just for them. It is an amazing experience to be able to interact with objects in VR and the manner in which the Steam controllers allow you to do this is unprecedented IMO.