I’m experiencing consistently occurring frame timing issues when using SteamVR. Every now and then the render thread will start blocking for several milliseconds waiting for RenderQuery results. This causes the app to miss the SteamVR running start frame synchronization and can easily cause periodical dropped frames. Missing the running start seems to also cause additional issues with jitter and increased reprojection artifacts. The frequency of the frame blocking seems to vary with performance, and the render thread can block in a few different places, but always waiting for a RenderQuery.
This seems to occur in 4.26 regardless of graphics settings, even with a fresh project using the VR template. I’ve only tested with a Valve Index and a nVidia GTX 1080 under Windows 10. It doesn’t seem to happen when using OpenXR, although it doesn’t work well enough in UE4 under SteamVR to test properly.
This bug seems to report a similar issue, but unlike it, I’m not seeing any direct correlation with occlusion settings.
Anyone have any ideas on why this might be happening, any ways around it?
Capture showing the render thread being blocked. Note the multiple consecutive frames blocking.
Editor capture using the VR template project. Purple is the SteamVR frame sync, green is the blocking query. Note the issue occurring every other frame.
SteamVR timing graphs of the VR template project.
Looking further into it, disabling running start with the AllowAsyncRunningStart command from the SteamVR debug menu seems to make the the issue disappear.
With running start:
This is still an issue, no change with the latest 471.11 Geforce Drivers. I submitted a bug report several months ago, but it still hasn’t been acknowledged.
I also feel like I’m getting random spikes where it should not be happening. Interesting that the runningstart command seems to be making a difference but obviously not very viable if we can’t force that from UE to a user. Have you tried messing with OpenXR to see if that solves things? I was thinking about switching but I can’t easily migrate my current project to do an accurate comparison.
EDIT: Or UE4.27 / UE5 for that matter. Feels like they’re all built on 4.26 so not sure if it would help but who knows.
It works properly using the OpenXR plugin from what I’ve seen. Unfortunately the SteamVR OpenXR implementation is still far from feature parity with their native API, and Valve seems to have very few people working on it.
I haven’t tested with 4.27 or UE5 yet though.
Disabling running start isn’t really a proper solution even if it was possible to set, since it will limit the frame budget to the render thread and GPU time added together.
Can I ask what you’re missing most from OpenXR compared to native SteamVR? I’ve seen a post on discord of someone including some extra features that are missing in OpenXR that you might be interested in.
On the SteamVR side, mainly support for the binding interface and for arbitrary device profiles. Also support for passthrough cameras (although I can’t get those to project properly), signaling frame discontinuities to the motion smoothing, and access to the frame timing performance stats.
On the UE4 side, I’m missing animgraph nodes for finger tracking, although I can probably code those myself if needed. Also, support for applying a single action to more then one hand (using OpenXR sub actions), so that it is possible to independently track the action on each device.
I’ve spent a lot of effort on fixing and trying to add those features to the SteamVR plugin, so it would be kinda detrimental to start over and wait for Valve to eventually (if at all) add the features into the runtime.