Scenecapture2d poor performance in vr packaged game

I’m trying to use a scenecapture2d and everything works fine until I package my project and view it in VR with an Oculus Rift. Just starting with the First Person Blueprint Template I add a scenecapture2d and applying the render target material to a cube in the scene. Everything renders at 90fps in the VR Preview but if I package the project and run it my framerate drops to 14fps. If I don’t enable the HMD in the packaged game it runs fine so the only time it has a problem is with the packaged game and the HMD enabled. It always runs fine in the editor.

Can anyone confirm? Maybe this belongs in the VR thread?

Can anyone with a Rift try this and see if they have the same result?

Just tried this starting with the VR Template and it has the same issues. Rock solid in the editor, unusable when packaged. Anyone?

This takes five minutes to try if anyone can confirm this for me.

Yep, same thing is happening to us. Lowering the scenecapture resolution helps but it’s strange that the issue only occurs in a packaged game.

Thanks for the confirmation. I’ve just tried it with a Vive and it runs fine so it must be an Oculus issue.

Just saw that this has been reported as a bug in the last week (UE-59090). It seems setting the render target to oculus native resolution (2720x1600) is a work around if your scene can handle the size. It’s supposed to be resolved in 4.20 and shouldn’t be a problem in 4.18 although I haven’t checked that.

I’m also having this issue. Couldn’t find the commit for the fix, but have asked about it on the developer network.

I am having a similar issue!!! I’ll try 4.20 to see what happens!

In relation to UE-59090 which involves poor packaged performance of Ocvulus VR applications that utilize SceneCapture2D functionality, I have improved the performance of my Packaged application greatly by setting r.SceneRenderTargetResizeMethod to 2, but am still seeing roughly half the frame rate of the VR Preview. The issue is considered solved by Epic, but I am still not totally satisfied. After all, this worked well under 4.18. In the editor, using dynamic rescaling, my game stays at 100% resolution, perhaps dropping to 94%. In Packaged game, it drops to 50% which was unacceptable.

This issue is due to assigning a RenderTarget2D to a SceneCaptureComponent’s “Texture Target”.

This is solved by executing the console command “r.SceneRenderTargetResizeMethod 2” in your BeginPlay event that assigns the RenderTarget2D to the SceneCaptureComponent.