Performance hit and odd stuttering when compared to SteamVR in 4.17?

I’ve been testing on my project with both Vive and Rift, and since the 4.17 update I’ve noticed that I get strange stuttering and poor performance when using solely the Oculus plugin yet not when using solely SteamVR (oddly things are fine when playing the game on Rift through SteamVR). Scenes that reliably maintained 90fps on Oculus in 4.15 now often dip under (hopping down to 45fps), yet even when I go to great lengths to make sure the performance is good (extremely simple scenes, setting r.ScreenPercentage to something like 50), there’s odd tracking judder when I look around.

I don’t get this in a VR template project, so I’m a bit baffled at what I could have done in my project to trigger such a gulf between the two.

I get it as well with my Oculus. heavy stuttering even on 11ms … but it’s fine with the Vive.
It could be something related to Oculus SDK though. not sure

Same here doesn’t matter how little there is in the scene. Tested with 4.17.0, 4.17.1 and master/4.18 WIP

And the HMD name has changed to OculusHMD

Perhaps related to: [GearVR] 3D widget performance degregation in 4.17 - XR Development - Unreal Engine Forums ?
Do you have any 3D widgets in the scene? Since 4.17 on the oculus gearvr these now cause major hitches while on daydream 3d widgets look better than ever… wondering if it effects Rift as well?

@aussieburger Thanks, the 3D Widgets issue sounds like a similar effect (UI Stutter) but there’s no widgets in the scene I’m testing at least.

Any news on this. I just migrated from 4.15 to 4.17.1 and I get huge performance issues where there were none before.

How were you able to use oculus rift through steam vr in ue4? I know I can launch steam VR and play games (still opens oculus home), but what is different in setting up my project to run through steam VR over oculus VR?

I’ve been messing around with this and I found that if I disable steamVR plugin and keep the oculus VR plugin then play, my oculus rift will not display the game through the HMD, though in the mirrored window on my desktop I can see that moving the headset around the view changes. This is strange because usually when you take the headset off VR freezes on the mirrored screen because the headset knows your are not inside it. Now I can take the headset off and move the touch controllers. It’s kind of hard to tell but it looks like the output window is running at normal speed again. I don’t notice any hitching with the framerate. So why is it not displaying in the HMD? It seems like when Steam VR is disabled this problem goes away or at the very least isn’t effecting the mirrored output window (which is likely just the same data from a single eye being displayed.

UPDATE:: just recompiled project with steam VR off and I can now see through the headset. It is still jittery, but it seems maybe 50 percent better.

So after some more trials I’ve discovered that using Oculus tray tool and activating ASW Mode: to “Auto” worked for me. I generally do not use Oculus Tray Tool, but after all this mess I decided to try and see if the ASW which is usually reserved for performance assistance could help. Activating “Auto” mode in the OTT resolved my performance issues. So either the new builds of UE4 are trying my system enough to make ASW absolutely needed or there are some inefficiencies that have been introduced.

Definitely there has been a change in behavior from 4.16 to 4.17 when it comes to handling the Oculus interaction.

  • In 4.16 the HMD was active only when worn. In 4.17 it becomes active as soon as the VR Preview has been started. That has the effect of setting the VR tracking origin to wherever the HMD is when the preview is started, so a re-center (Reset Orientation and Position) is necessary each time.
  • In 4.16 the HMD would go off (black) as soon as ESC was pressed to exit the VR Preview mode. With 4.17 is stays on, the view in it freezes (very annoying) and often I can hear the audio from the Oculus Home being played. Plus sometimes I get a complete crash of the Editor.
  • In 4.16 the PIE performance was acceptable, in 4.17 it is lagging big times.

@Thumper I will try with your suggestions and see if that makes the experience better. For the time being I am sticking to 4.16.x for production.

Cheers,
Marco.

BTW, from my investigations, until 4.16.x UE4 uses LibOVR 1.17 / SDK 1.12. Starting with 4.17 it uses the OculusVR plugin 1.0 / SDK 1.15.0. It may be that the current Oculus integration through the new Plugin is still not fully optimized, hence the poor performances and issues.

I solved this in my project. It was using r.ScreenPercentage to set the supersampling. Setting this to anything other than 100 causes the issue.

Using the correct documented commands for Oculus Rift fixes this - vr.oculus.PixelDensity.adaptive on/off and vr.oculus.PixelDensity.0.5…2.0

Note that the r.ScreenPercentage setting persists in the editor so you need to reset this to 100 first.

Just tried this, but still got the stuttering. I was hoping it might get fixed with the new Oculus SDK 1.18 but it persists.

@alllesss bad news - it may be the case that just lowering the supersampling removes the stuttering by improving the framerate. i.e. there’s still a performance issue.

I noticed also that the most severe stuttering goes away if you set vr.oculus.bUpdateOnRenderThread to false in the console, though this doesn’t improve the framerate it means you don’t get bad tracking when the performance drops.

We’ve just started seeing this issue with our project after a 4.17 update as well. +1 for a fix sooner than 4.19.

Chiming in here, @jimsnomis, I’ve also found that that setting vr.oculus Render thread or whatever to 0 got ride of my serious stutter. Any idea what this does?

**@artoculon I think it runs the HMD tracking on a different thread so it’s no longer calculated independently. It looks like otherwise when performance is stressed, the HMD tracking stutters.

Seems to me that the performance is still worse than 4.16.2 even when changing the thread setting though, it just doesn’t stutter.**

Thanks! That really helped getting rid of most of the stutters. Although It’s still not as smooth as 4.16.2 !
I think we need some proper documentation about these new oculus commands and what settings are suggested to set at Begin Play.

@alllesss https://github.com/Oculus-VR/UnrealE…UE4-Oculus.txt is the doc I’ve used.