I am running an unreal application in the background while running another application in the foreground. The unreal application is doing some calculations and then sending those somewhere else. To further complicate things, I’m doing this in VR.
The way to get unreal to run steam VR in the background rather than in the foreground, is to edit this file:
Engine\Plugins\Runtime\Steam\SteamVR\Source\SteamVR\Private\SteamVRHMD.cpp
and change this:
VRSystem = vr::VR_Init(&VRInitErr, vr::VRApplication_Scene);
to this:
VRSystem = vr::VR_Init(&VRInitErr, vr::VRApplication_Overlay);
or this:
VRSystem = vr::VR_Init(&VRInitErr, vr::VRApplication_Background);
More info on that can be found here: API Documentation · ValveSoftware/openvr Wiki · GitHub
If you make the change above and rebuild unreal, what you see is a black window and nothing renders to that window or to the HMD. But if you use print statements, you can see that unreal is still tracking everything. This seems like it’s working correctly and that this is expected behavior. But I’d like one more thing. What I’d like is for it to continue to not render to the HMD (this is how it is currently and this is how I want it to stay since another app is rendering to the HMD), but to render something to the window. Since it pops up a window, I’d like to be able to see something and not just have an empty window. Right now all I can see in that window are my print statements. Is it possible to render a camera into that view? Does anyone have any thoughts on things I can try? I realize this is a very strange scenario.
Thanks in advance.