(Vidoe) Shaking camera in VR connecting to host

We are developing VR-game for multiplayer-only gaming.

But recentlt we found HMD image shaking after connecting to host.

Video captured in HMD: shaking.mp4 - Google Drive

How we launch it:

  1. start 1st copy of the game without helmet and host server
  2. open SteamVR on desktop and inside Meta Quest 2
  3. connect HMD through wi-fi
  4. open 2nd copy of the game and join as client

Shaking feels like sync failure or smth like that.

But shaking doesnt happen:

  1. in quest link
  2. through usb connection of HMD
  3. playing game without host (client only)

we tried a lot of different things, but still can not find out how to fix it

maybe anyone had the same problem or can even understand where should we dig out ti find it out?

Are you running both games on the same computer? Or one on computer one standalone on headset?

Your video looks to me like severe “reprojection” and space warping due to there not being enough frames rendered to keep up with head movement. If you were to profile your FPS I would expect you’d be rendering the experience at something like 10 FPS. In this case you’d need to dig into the basics of performance profiling. You can use the “stat unit” and “stat FPS” console commands, and using “ProfileGPU” in the editor will show you what features are eating up your GPU budget if that’s the issue.

About your question: it doesnt matter if i start both builds on the same computer of different ones - always happening connecting to host.

Thanks for your advice, i ll try to find out smth in profiler

Definitely measure frame rate with the solo app and frame rate with the multiplayer connection. You don’t want to try two apps on the same computer though. VR rendering is already hard enough as is.

If it’s truly only in multiplayer on separate machines there’s a chance that there’s something in your replication code doing it. You might be trying to control the pawn location of the clients and this causes the headset to jitter. The headset does a lot of trickery in an attempt to smooth out head movements, so if you’re moving the pawn a lot through replication, you might be overriding that.

1 Like

We compared graphs with SteamVR tools, this is what we got:

Also I read smth about “reprojection” in SteamVR, but as far as I understand its not about it

Thanks for that. I haven’t used that debug tool before, but I’ll offer an interpretation of what I’m seeing. The GPU graph on the bottom goes from 0-22 milliseconds, with 22 ms equaling 45 FPS. 45 FPS is the threshold for a comfortable VR experience that SteamVR can reproject to 90 FPS (or 72 I guess). Your frame timings are always below 45 FPS even with a single player, but I can’t tell how far below. So your VR experience will likely be choppy no matter what and you should nail down why it’s rendering so slowly. It is taking very slow late rendered frames and trying to move them in front of the viewers eyes. You could use Unreal Insights to log this data, or just start with stat unit and stat FPS commands, and profileGPU in the editor.

Besides poor baseline frame rate, there’s another factor here that I didn’t really pick up on in your initial post. You are streaming this experience to the headsets wirelessly. So in the best case scenario your PC is sending low frame rate video to the headset at low latency and with perfect lossless quality. But the WiFi signal is going to be a little noisy, pretty latent, and will definitely drop or at least compress the footage from time to time. Streaming to more than one person or running more than one application really compounds this problem. Not only do you need to debug your UE performance, you probably have to debug your network performance. It says here you’re sending 119-210 mbps of data to the headset. Make sure that’s well within your WiFi’s capabilities (it should be). It also says it’s sending 27-31 FPS. That might be the limit of the application optimization, but again, it’s very slow for VR. To make up for wireless streaming you should be aiming super high for your frame rate goals. 90 FPS or more should be the target. Back when I did this more often, I would target the non-VR desktop app to run at 200 FPS. Based on the style of your content I think there are probably some easy wins, like turning off rendering features you don’t need, sticking with baked lighting, or finding a few problem assets that are hiding in there.

If you have spare time you can watch this video about the amazing Four Seasons VR experience. 4 person multi-user collocated experience with 4 high end workstations and 4 dedicated WiFi routers to stream the experience to the headsets. They had to work through a lot of issues like this.

1 Like