protonscr

[Feature Request] SteamVR Workshop Tools

steamvropen enhancement
ValveSoftware/SteamVR-for-Linux#336 · opened 2020-04-12 by TheGubbinsCat · updated 2021-05-18 · 3 comments · github
1 matching comments, n / p to jump
TTheGubbinsCat 2020-04-12 github

I completely understand if this is too big of an ask, but I would like a way to access the workshop tools on linux.
Due to the workshop tools only being accessible through the Windows version SteamVR itself, and that not working under Proton (not that it'd be an ideal setup anyway), accessing any of these tools is currently impossible under linux.
As far as I can see there are two ways of doing this. Either porting Source 2's tools to linux, which could be a lot of effort depending on how much they depend on Windows, or using something like Proton to run them, which I can see coming with some difficulty as they aren't separated from the natively run SteamVR.

SSetantaLP 2021-02-17 github

I tested around a bit and I think there are three main problems when it comes to using the workshop tools on Linux:

  1. SteamVR on linux doesn't include the executables/libraries for the workshop tools, which are steamtourscfg (for creating new addons and launching the editor) and parts of the steamtours executable (which exists on linux but is most likely missing the editor parts/the parts that load the corresponding libraries). But most of the assets seem to be there.
    So to even have a chance to run the workshop tools you have to play a bit around with Steam to also download the Windows part of SteamVR without erasing the Linux part (which you absolutely need because it includes the executables/libraries that allows OpenVR based software to use the headset either natively or through the custom vrclient.dll in Proton, unless you move that part of SteamVR elsewhere and modify openvrpaths.vrpath accordingly).
    Once you have a hybrid installation of SteamVR you need to create a shell script that launches the steamtourscfg.exe through proton and modify the tools.vrmanifest to use this script for the workshop tools. But sadly that's not enough because Clicking "Launch" in steamtourscfg.exe will result in a crash.
  2. the custom vrclient.dll in Proton is missing IVROverlayView_002, which steamtours.exe requests when launched from steamtourscfg.exe. The problem here is, that when VROverlayView was added to the official OpenVR API the version string was already IVROverlayView_003. And by that previous versions are not part of the custom vrclient.dll in Proton even though the native vrclient.dll/vrclient.so shipped with SteamVR include them. You can work around that problem by creating another script that launches steamtours.exe without the VR related parameters. So the workshop tools will now show up, but you will run into the next problem.
  3. All 3D views (preview in the asset browser, the map view in hammer, ...) in the workshop tools are empty so while the workshop tools run, they aren't really usable (especially when it comes to creating a map), because you can't see what happens. And sadly that does not change, when using the different proton options for disabling certain DirectX versions and will always result in the same error message (I think it was about some unsupported format but I will check that once I get back to my Linux PC) in the dxvk log once one of the tools tries to initialise a 3D view.

Problem two is most likely pretty easy to solve for valve because as far as I can see there is not much difference between IVROverlayView_002 and IVROverlayView_003 so it's probably possible to simply update steamtours.exe to a newer version of OpenVR (unless there have been other big changes in OpenVR that are not compatible with the current code) or to add IVROverlayView_002 to the custom vrclient.dll in proton.

Problem one might be a bit more difficult to solve because that requires to select a proton version, finding out where it is installed and launching it from inside SteamVR (which could be solved via a pop up window) as well as downloading some parts of windows SteamVR (which is probably just a configuration change in the backend).

Problem 3 is probably the most difficult one because it most likely requires changes to the rendering code (or changes to proton/dxvk in order to make the rendering code work there), even though the changes might not be that big because according to the launch params steamtours uses Vulkan on Linux so it might be possible to get the Vulkan rendering work on Windows too and expand it from the runtime to the editor (which would make things much easier for proton, because Vulkan runs natively on linux while DirectX requires a translation to a different graphics API (usually Vulkan) on Linux).

SSetantaLP 2021-05-04 github

By the way, while hooking around in the dlls on windows I realised that SteamVR Home consists of a bunch of shared libraries that pretty often have a function called CreateInterface which works similar to GetGenericInterface from the OpenVR API. And it seems like each shared library with this function implements one or two interfaces that can be requested by using this function and that are most likely the same on windows and linux.

And most importantly this applies to all rendering system dlls and also to the vr.dll. So if you have the header files for these interfaces (which valve definitely has) it would be possible to create wrapper dlls for them by using the same tools that are used to create the vrclient wrapper in proton from the OpenVR headers and by that most likely solve the rendering problems and the problems with the vr initialisation without having to directly port all the tools to linux.

The only thing that would have to be additionally implemented, before that could actually be released as a beta feature for linux users, is an easy way to download the workshop tools on linux and a way to select the proton version you want to use.

SSetantaLP 2021-05-18 github

And another note: I found a much easier way to download the workshop tools on linux.

  1. download the linux version of SteamVR (if you haven't already)
  2. open the steam console (via steam://nav/console) and use the command download_depot 250820 250831 to download the windows version of SteamVR Home and (once the first download as finished) download_depot 250820 250833 to download the workshop tools (you need both because the latter only contains some additional dlls and executables for the workshop tools)
  3. go to the directory where both depots have been downloaded to (will be mentioned in the console once the download has finished) and copy all contents of both depot directories into the root directory of your SteamVR installation. In case the file manager asks you what to do (since some folder hierarchies overlap) tell it to merge the directories (and if you update the installation it will probably also ask you if you want to overwrite the files, which you should do).

When SteamVR gets an update you have to to step 2 and 3 again, since the contents of both depots are not automatically updated (maybe unless you add them to the app-manifest).

And concerning the error i mentioned earlier: when using DX11 (even on 6.3 proton with dxvk v1.8.1) you get warn: D3D11CoreCreateDevice: Adapter is not a DXVK adapter directly at the beginning of the log file (on DX9 not but that doesn't change the result) and every few seconds you'll get warn: winevulkan detected, disabling exclusive fullscreen support and err: Failed to create surface.

DLLs