General bad Oculus Rift performance in Unreal Engine 4

Have you tried restarting the rift? Once I change HMD I have to restart it to make it work, that or not run it in direct HMD mode, which also gives me better FPS for some reason.

Ok i’ll repost a mix of tips i learned from aussieburger, spyro and others in case some people missed them:

  • In order to have good performance while developing (without having to close the editor):

    1. Editor Preferences -> Miscellaneous -> Performance -> Tick “Use Less CPU when in Background”
    2. When launching the app, press the little Arrow next to Play and select “Standalone Game”
    3. While the game is loading Minimize the UE4 editor
    4. Once the game has loaded in it’s window press Alt+Enter

At least on my machine i get exactly the same fps as running the game from outside the editor or packaged.

  • If using Direct Mode, disable mirroring to gain A LOT of performance back (about 20 fps more for me)!

    1. Launch game
    2. Bring up the console
    3. Type “hmd mirror off”

    (you can also set via Blueprints)

  • If using Direct Mode, setting Screen Percentage (hmd sp) manually while in-game freezes the App, BUT it does work if you set it via a Blueprints:

    Use “Execute Console Command” (hmd sp XXX) after “Event Begin Play”.

  • Direct Mode (without mirroring) seems to have less latency and about 15 fps better performance for me than Extended mode.

R9-290, using the “VR First Person Template” in Direct Mode, with “Shadow Quality=2”, “Anti-Aliasing=6” and “Screen Percentage=160” (rendering internally at 3072 x 1728), i get between 80 and 100 fps (locked at 75 with vsync on).

Have fun!

Thanks very much for the break down, most appreciated. I’ve tried all that apart from the blue prints tip. Not sure how to do this “Use “Execute Console Command” (hmd sp XXX) after “Event Begin Play”.”

Being able to set the screen percentage will surely solve the low FPS problem. If I can some how set hmd sp xxx

I don’t think I can restart the Rift and expect UE4 to pick it up again in Direct Mode. If I run in Extend I get low FPS.

It can be restarted and ‘picked up’ again while the editor is running (and oculus runtime is in direct mode) I’ve done it a few times to get positional tracking back. You need to restart it in the config and turn it off/on from the rift power button and it should be fine.

Also to do the bit you are unclear about…

in your level blueprint - add the node ‘event begin play’ (type that into the box and it will show) then add another node ‘execute console command’ - join them up and add the text “hmd sp XXX” in the box of the node you just added.

I have a number of these in sequence to put me instantly into full screen (to rift) no messing needed. You won’t need all these and can remove/add whatever you like but should steer you in the right direction!

You just saved me… THANK YOU!

MANY thanks. I will try tonight!

You can also disable and then re-enable stereo either by using “stereo off/on” or simply by pressing Alt+Enter to enable/disable full screen to unfreeze the screen after a screen percentage change.

THANKS, specially to Sharpfish and Atsk !!!

When you press alt+enter twice, the resolution changes. For example, after I do so, r.SetRes returns 1366x768 (my monitor’s native resolution). Made a thread about it here: Reset frozen rift screen - XR Development - Epic Developer Community Forums

Hi guys,

First of all, thanks you all for putting so much effort in troubleshooting the performance issue ! However I have tried everything I could find, and I’m not able to get above 40fps without going under 100 with “hmd sp” with really really simple demo. I have tried the following :

  • Both extended and direct mode from the editor
  • Checking the CPU usage thingy from the editor
  • Disabling realtime rendering
  • Tried the “hmd timewarp” command
  • Lowering the editor window when using “Standalone game”
  • I have tried the whole blueprint sequence from the post above while in direct mode
  • I have tried running demo without the editor
  • Lowering all the graphic settings down
  • Checking the “unbound” option of the PostProcessVolume
  • The “hmdwarp s” command doesn’t seems to exist anymore so the reddit post from eVRydayVR is not of any use to me (guy is awesome btw!)
  • Updating my video card driver.
  • Oculus runtime and the firmware are updated

Here are my specs :

  • ATI Radeon 6990m
  • I7-2790qm 2,20GHZ
  • 8Go

I’m able to run most UE4 demo from the following editor at a solid 75 fps in medium/high settings, and never had any performance issue on any DK2 demo.

I’m getting a bit desperate here, if you guys got any ideas, please let me know !

Hi folks, I’ve been looking everywhere for a definitive list of all Rift Dk2 console commands so that I can make a super blueprint to optomise my stuff. Do you guys know where I can find one?

Cheers!

Just what I needed, thanks! Though the ‘fullscreen’ doesn’t seem to make it… full screen.

@Inpu, that is right where mine is limited. I tried everything and its seems to be related to vsync for me. If I disable vsync (hmd vsync off) I get 3x or more frame rate consistently and it doesn’t dip down. Obviously you can’t run without vsync as the panel is portrait and will make you have a migraine but I’m curious if you can try it and if you get the same results.

I was having trouble with a DK2 on my GTX660.

I upgraded to a GTC780 and all performance issues have gone away. VR is always going to be super heavy on the GPU, that is the nature of the beast.

Just make sure you have sufficient hardware then make sure you are viewing in Stand-alone mode with no other 3D apps running in the background.

BTW guys, some tips:

  • Make sure to turn off dynamic shadows for most things
  • Turn off collisions between static actors
  • Turn off gravity for static actors.
  • Make any non-moving level geometry static (not movable).
  • Reduce the number of lights that cast shadows.
  • Keep GPU particles to a minimum, or use lowest LODs for GPU particles, and no scene collision.
  • Use no more than one particle light node.

I was able to get my juddering mess of a demo to run perfectly smooth.

i disable all gravity and i not got more fps. fortunately i still can keep my proyect adove 90fps (with a r9-290 evidently)

perhaps gravity its cpu based?

Hi,

I’ve noticed problem. I created a new project from the blueprint first person template and stuck a pointlight on the projectile. That’s all.
Now, if I use the rift (direct mode, but no special other settings made like suggested here), everything is smooth. I can move my head from left to right quickly and I got no lag.

As soon as I fire only one single projectile and keep moving my head from left to right it studders extremely.

Can anybody explain to me why or reproduce this?

Have you checked your framerate while doing this? it needs to be hitting 75fps - with VSYNC on to be ‘smooth’.

If you haven’t set up your post processing volume for VR you can save some performance by doing so (reducing/removing effects that don’t work in VR or are not advised).

Hi Sharpfish,

without the Oculus I can spawn about a dozend projectiles with lights attached or so before I see a real impact on the framerate.
If I do not move my head in the Rift there is no impact on the smoothnes. It’s only if I move my head quickly from left to right that the stutter occurs.
If I find time weekend I’ll try to record a sample and upload it to Youtube.

Thanks,

Ben