Performance increase by switching from low sp to high SP and back to low SP

Hi guys,

Using UE4.6 and Oculus 0.4.4 running in direct mode, I have found significant performance increases by setting sp really high (hmd sp 300) then back down to something sensible (hmd sp 100) and doing nothing else.

In my scene I was struggling to hit 75 fps, typically getting anywhere between 50 and 65, trying everything, did this simple test as above and now Im getting 80 - 100 fps, even better a vsync that stays solid at 75.

My question is, why?

Out of all the dozens of settings I have been playing around with, the profiling I have done, why this?

it seems to me that I force the frame rate down and then something tries to compensate, then when i switch back the compensation is still kicking on…

Any thoughts?

Interesting. I’m going to try this, but one quick question. Does it maintain it after restarting, or do you need to do it each time?

Unfortunately each time, and you need to give it a second or two at sp 300… Also as I have had vsync problems with extended mode I have been using direct to rift mode, it is in direct to rift mode that I see the highest increase.

Confirmed! I just tested in the Blueprint sample using my GTX 970 & DK2 - 35fps before the 300/100 flip, 80 FPS after. Now it only stutters when the uber-tri Tree hits the scene

Very odd.

Will have to test this as well. Let me ask, in Direct Mode, does switching SP lock up the hmd display until you turn stereo off and back on?

Have you reported this on AnswerHub? Don’t get me wrong, in a way it’s a good bug, but I believe an AnswerHub entry will get it tracked in their bug database and a developer assigned to investigate it.

Also, is there any unexpected image quality loss when the framerate doesn’t return to the expected level (meaning something is getting disabled to compensate, and not turning back on)? If not, this sounds like an easy win :wink:

Along these same lines: I’ve spent months working on Rift performance and I’ve noticed some other strange instances of unexpected performance gains/losses when toggling the console scalability presets (sg.PostProcessQuality, sg.ShadowQuality, etc) between maximum/minimum and back. E.g., I’d start the game defaulting to “sg.PostProcessQuality 3”, toggle that to 0, then back to 3, but the framerate wouldn’t necessarily return to nearly where it was, even though as far as I could tell the image quality had returned to its original high quality.

Hi Guys,
I’m sorry but I’m new to unreal engine and oculus, I’m trying a simple scene and experiencing stuttering problems when using oculus, so I’ ve tried to scale down antialiasing, shadows and post process, getting better performances but not enough to have a fluid vision.
now the question is what do you mean when you say " switching from low sp to high SP and back to low SP "?
What do I have to do to switch from high to low and back?
Any other good suggestion to increase FPS?
Is it true that under 75 Fps oculus DK2 will give stuttering problems?
Thanks to evereybody

Crazy idea, but you sure it isn’t because default SP is >100?

Good point, default SP in the Rift is 130 or 160 or something (is this published somewhere? Has it changed over the various SDK versions?) to improve image sharpness, I believe to offset some of the “screen door” effect.

HMD SP is roughly equivalent to the “r.ScreenPercentage” command for non-VR mode: it changes the “virtual” resolution that the game renders at before being scaled to the actual screen framebuffer resolution. So if it’s lower than 100 (percent), you’ll get a more pixelated image, but noticeably better performance… and if it’s higher than 100, you can get much sharper images (the equivalent of supersampled antialiasing), but your performance will drop off precipitously.

To switch the SP setting temporarily, bring down the console in-game (press the tilde ~ or backtick ` key on US keyboards, may be different in other regions), then enter the command:


hmd sp 200

to get a sharper image, esp if you have hard-to-read onscreen text or a lot of aliasing/jaggies (but possibly much lower performance)

Or switch to a lower SP than default:


hmd sp 75

to get lower image fidelity (more grainy / visible pixels) (but noticeably better performance)

If using blueprints, you can easily bind these commands to keyboard keys, or even set a default value in your level blueprint by running this console command on the BeginPlay event.

Strip everything to the bone, and fake as much as you can :wink: This video should be pinned on these forums somewhere – Epic engineers discuss performance in UE4 and how they got the Showdown demo at Oculus Connect to look so amazing and still run at 90 fps:

And if you’re pretty seriously interested in developing for the Rift (or VR in general), all the talks from Oculus Connect are on YouTube and very much worth your while to watch:

Good luck!

I was doing a bunch of profiling today on my OVR project and I noticed something similar. I then used some hardware monitoring tools and my suspicion was confirmed. What was happening to me was that, when moving from a scene that was cheap to render to a scene that was expensive to render, my game would drop below the 75fps vsync on DK2 and stay there, rendering at 37fps. When viewing the cheap-to-render scene, the game was hitting 75fps easily, and the GPU was throttling itself down to around 900mhz (GTX 970). When I moved to the expensive scene from there, the clock speed of the GPU at 900mhz was not high enough to hit 75fps, so vsync was keeping it at 37fps. At 37fps, the GPU utilization was around 30%, and so the card remained clocked to 900mhz. If I ran something like hmd sp 200, or turned up some other effect that increased the GPU load, it would clock up to 1200-1400mhz. After switching back to the previous quality settings, it would be rendering at 75fps, and GPU utilization would be higher (~50%) and then it would stay clocked up between 1200-1400mhz until moving back to the cheap scene, where it would lower the clock speed back down to 900mhz.

The solution for me now is to disable the underclocking using some overclocker/tweaker tool. Perhaps there is a way to do something like this in the engine, though.

Good job “cancel”!

I hope that Epic/Oculus can find a way to fix this problem in-engine!

Perhaps this should be submitted to the UE4 answerhub?

For the last few weeks I’ve had a scene that starts off smooth, but then gets juddery without any provocation (the scene has no change - no gameplay). And sometimes after looking around the scene with massive judder, randomly it will speed up again and be smooth no matter where I look.

I was trying this sp300 -> 100 thing to see if I could benefit, but instead of a speedup at sp100, I was getting a slowdown. I setup all the scalability options to toggle through a button press, and starting out at medium, my scene was fast. Then I toggle high, then epic, and both got heavier and heavier with judder, but then going to Low and Medium, I would still have constant judder, more than the smoothness I had at medium from the start. Going through the cycle several times, I noticed at weird seemingly random cycles would my perf be fast again at Low and Medium, but most other times it would be judder butter.

Thanks to Cancel’s post, I went into my NVidia control panel for my GTX 680 and found a power management option that defaults to “Adaptive”, and I turned it to “Performance”, and while I was there I found a VR prerendered frame option set to 1 and I set “let application decide”, though this probably wasn’t the culprit. Anyhow now every time I run my test scene, I no longer get the weird judder from nowhere, and every time I go through the scalability settings cycle when I hit medium and low the performance scales up as it should, smooth and judder free. BTW I’m using latest oculus runtime 0.4.4 but with 0.4.3 sdk library integrated into a C++ based UE4 4.6.1

Thanks for sharing your investigation results wes!