Hey guys. I was hoping I could ping some brighter minds than mine on some performance issues I’ve recently come across in a VR project. Any help at all would be tremendously appreciated.
It’s a room-scale VR experience built in Unreal Engine 4.12.5 for the HTC Vive. My main development machine is a custom-built one with an i7-4790K a GTX 1080, and 16GB of RAM. Both PIE and the packaged game run great on this machine. However I’m noticing significant frame rate stuttering when running either version on our portable demo rig: a Razer Blade 2015 (specs here) with a Razer Core External Graphics Dock housing a GTX 980 Ti. This issue only manifests in the rendered scene and not in the SteamVR compositor as the chaperone still renders smoothly. I never get a white or gray screen or appear back in the default SteamVR polar grid room; the frame rate is just choppy, and uncomfortably so.
I’m fairly certain it’s GPU issue, but I haven’t been able to identify the source in my project. The entire scene has 130k triangles total and about a dozen lights, 2/3 of which are static and the others are stationary with only one dynamic shadow caster. I’ve even turned off shadow casting for most of my scene’s stationary objects. We tried disabling the post processing effects we were using: scene color tinting, vignette, color saturation, bloom, and lens flares. Nothing jumped out as a suspect.
After that, I dug deeper using the profiler on both machines to see what the discrepancy was. I found another thread that seemed to be related to my issue (link here) in which someone suggested that it may be caused by FDrawSceneCommand hanging when polling the HMD pose. In my profiler test I noticed that my own FDrawSceneCommand:Self event was rather high, around 12ms on the demo machine. As a test, I replaced my VR pawn with the DefaultPawn and the Self call dropped below 0.01ms. Interestingly, that same event took around 14ms on my dev machine but there’s no stutter.
So my current thought is that it’s an issue with how UE4 interfaces with SteamVR, and my dev machine just so happens to be powerful enough that the performance hit isn’t noticeable. I would prefer it to be an issue on my end so I can fix it myself, so hopefully someone here can prove me wrong.
I’ve linked a zip here containing 3 profiler logs: one from my dev machine and the other two from the demo rig running PIE with VR and the DefaultPawn. I’ve also included the DxDiag reports for both machines, if those help. Unfortunately I can’t post a link to the project itself since it’s an internal demo for my company, but if more details or screenshots are needed, I’ll see what I can do.
Edit: we’ve confirmed similar performance issues on other machines, including this pre-built ASUS desktop as well as another custom built development desktop machine. I’ve included the DxDiags for both in the above zip file labeled Asus and Dev Machine 2 respective