I’m running into an issue whereby a packaged shipping build is performing much more slowly on Oculus Rift CV1 than it does in editor, but the same packaged executable runs fine on HTC Vive.
Has anybody else encountered something like this? Are there settings or details I should be aware of that differ between the two platforms?
I am having similar issues, but haven’t tried my Vive yet… I need to get it working in the Oculus! from 90 FPS in editor to 14 FPS packaged!!! I’ve tried Instanced Stereo, Dynamic Resolution Reduction, I’ve unchecked the smoothed framerate option, and I’m only rendering a small window on the monitor in addition to the Oculus.
Did you ever find a smoking gun, and if so, how did you solve this?
The issue appears related to use of rendertarget2d. I’ve tried various render target formats. no improvement so far unless I disable this in my application.
I have the same problem. Works fine in the editor, but the packaged version gives me ~3 fps when using the Oculus Rift.
Even if reduce the scene complexity to an almost empty scene with default floor (but leaving the spectator camera which use rendertarget2d) I can never get more than 45 fps.
The HTC Vive works perfectly fine in both editor and packaged version.
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.
@XGibbousX Thanks for the suggestion. I have not tried your proposed solution yet, since I have all my HMDs at work. But could you elaborate a bit why this should work, i.e. what does that console command actually do? I tried googling the command but can’t find a good description of what actually happens.
Also since this behavior is exclusive to Oculus (Vive’s are unaffected), it should still IMHO be considered a issue.
@anonymous_user_b677394b Thank you too. I can only guess as to why this works. I found the following on r.SceneRenderTargetResizeMethod though:
Control the scene render target resize method:
0: Resize to match requested render size (Default) (Least memory use, can cause stalls when size changes e.g. ScreenPercentage)
1: Fixed to screen resolution.
2: Expands to encompass the largest requested render dimension. (Most memory use, least prone to allocation stalls.)
It seems that there is some conflict between the Oculus and Unreal Engine resizing a scene capture onto a render target. It seems that option “2” is the least performant but highest reliability based on the description above.
I agree that this is a big issue and should be fixed by Epic. There’s even an official bug report that Epic claims is “Fixed” in Unreal Engine 4.23 but I tried it and it’s not fixed. Therefore, this is the only way right now and it works very well for me.
The official bug report that you refer to is probably UE-70352, which I reported. I have contacted Epic again about this issue and they have been able to reproduce it with 4.23 as well. I have ongoing communications with them about this issue and I will report your workaround to them as well.