OpenXR Performance improvement

Since going from SteamVR to OpenXR I have seen some odd performance issues. I am currently testing performance in UE5.1 using Nanite and Lumen but also using the Forward Shader.
While with Forward Shading enabled I get a framerate of about 90 fps using SteamVR, switching to the OpenXR plugin decreases the framerate to about 45 fps.
Using the Deferred Shader and Nanite and Lumen I cannot seem to get the framerate above 45 fps, no matter the quality settings I try.

While looking at Unreal Insights I noticed that most tasks listed under GPU are done relatively quick (approx 13 ms.). The total frame however takes 22.1ms.


While looking at the graphs I see a WaitFrame which comes from OpenXR, maybe this explains the difference.
For general Performance I do not see anything obvious which takes that much. Most of the time seems to be taken by the CPU, however there I also see WaitForTasks and WaitUntilTasksComplete.
Does anybody know what might cause this behaviour or how I can improve performance?
I am currently running an RTX 3090 so if that is unable to run a simple VR scene at 90fps it seems that something, somewhere is wrong.

1 Like

VR runtimes will usually throttle the frame rate to half if the application canā€™t maintain the full rate. If the runtime uses positional reprojection ( ASW, Motion smoothing), it will always throttle the frame rate down the instant it dips below in order to be able to render extrapolated frames.

What headset and OpenXR runtime are you using? If switching from SteamVR made a performance difference, maybe your OpenXR runtime is telling the app to run at a different default resolution.

Lumen is very performance intensive in VR. Itā€™s very unlikely that you can get high frame rates with it with the default settings and at full resolution.

1 Like

Thank you for the reply, I am currently testing with the Vive Pro (1st gen) so I am using the SteamVR runtime.
My assumption would be that since it is both the SteamVR runtime (only difference is OpenXR or not) that shouldnā€™t make a difference.
I have checked and Motion smoothing was on, so this might be one issue.

I know Lumen is very performance intensive in VR, even turning Global Illumation, Shadows and Reflections to low didnā€™t really deliver high performance.

However, since I also saw the difference while using the Forward Renderer and switching between the SteamVR and OpenXR plugin, is there something else I might be missing?

Hard to say what could be causing it. The SteamVR plugin does frame synchronization a bit different from the OpenXR plugin. SteamVR blocks the render thread, while OpenXR blocks the game thread. Have you profiled it with Forward Rendering on to see if itā€™s still GPU bound?

Not really, hard part is that Iā€™m currently testing on UE 5.1 using Nanite. Forward Rendering has a performance difference between OpenXR and SteamVR. Deferred Renderer has worse performance (as expected) but trying to use this with SteamVR crashes the editor.

I am currently trying to get decent performance with Nanite. Currently I am getting quite good results using GPU Lighmass for the lighting. However I am still seeing some artefacts in the mesh. Iā€™ll come back on this.

Edit:
I have been testing and getting reasonable performance, meaning around 80 fps using Nanite meshes from Quixel. This was done with Globabl Illumation disabled and using the GPU lightmass plugin (although I didnā€™t really see a difference after disabling it).

I have however noticed one artefact which seems to be related to Nanite. When moving the HMD I see white artefacts on the Nanite meshes, as can be seen in attached video.

EDIT 2:
It seems like this issue is related to the high quality of the Nanite meshes coming out of Bridge. Downloading a High resolution model and enabling Nanite does not create this issue.
Downloading a Nanite mesh directly has this issue (it also has a lot more polygons and thus detail). Going in the mesh settings and reducing the ā€˜Keep Triangle Percentā€™ value to 5-10% of the original reduces the issue significantly for most meshes but does not entirely solve it.

So, even if you get less detail in the mesh the best way to work around this issue seems to be to download a High resolution mesh and manually turn on Nanite.

I donā€™t know if anyone from the Epic team has an advice on this?

Nanite and Lumen for VR is still highly experimental, and we donā€™t have an ETA when we expect these technologies to perform well enough to ship an experience at a solid 90 fps. I should also note that testing performance in-editor is not advised as keeping certain tabs open (Bluprints, and other tools with viewports) can reduce performance.

Enabling/Disabling GPU lightmass plugin doesnā€™t do anything other than enabling the GPU Lightmass tool to bake lighting, which, if youā€™re using Nanite, is not a suggested workflow due to how large the lightmaps would have to be to provide detailed baked lighting on such high poly meshes.

1 Like

Hi Victor,

Thanks for the reply, if Iā€™d want to use Nanite would the only recommended workflow be to use Lumen? (in regard to the large lightmaps)
Or would disabling Lumen and just using Nanite also work?

The only ā€œrecommendedā€ workflow that I can vouch for is Lumen, but, Iā€™d suggest you experiment! This is new territory.

Thanks for the reply, Iā€™ll keep experimenting then. Exiticing new stuff, thatā€™s for sure.

One question regarding the size of the lightmaps. Would the main concern for the size of the lightmaps be the cost of performance or size on disk?

Available RAM

Okay, thanks for the input!