Forum Discussion
kideternal
11 years agoProtege
Performance Improvements ETA?
The performance I'm seeing with native Oculus integration in Unity 5.1 has been poor since it was released compared to the old script-based solution. On my Nvidia GTX 970, I'm seeing ~185FPS reduced to ~65FPS once I turn-on the Rift. I'd hoped that the promised "better performance with v0.7" would be true at this point using Unity, but so far it's about the same despite all of the other issues.
Are there any confirmed performance improvements coming to Unity/Oculus within the next month or so? I'd like to release my project soon, but it's becoming almost impossible to maintain decent performance once I enable VR mode. Is there some sort of timeline for upcoming speed enhancements?
Are there any confirmed performance improvements coming to Unity/Oculus within the next month or so? I'd like to release my project soon, but it's becoming almost impossible to maintain decent performance once I enable VR mode. Is there some sort of timeline for upcoming speed enhancements?
17 Replies
Replies have been turned off for this discussion
- vrdavebOculus StaffThe short answer is that Unity 5 has some general performance drops compared to Unity 4. However, since Unity 5 already shares some work between the two eyes (shadows, culling), it manages to perform about the same in most cases. Unity is continuing to improve the overall performance of U5, especially when using physics, particles, lightmaps, the standard shader, and occlusion culling. I'm not sure how much faster U5 will be within 2 months, but the long-term VR performance will be better than U4 because of the scheduling and multi-eye improvements that are possible.
"kideternal" wrote:
On my Nvidia GTX 970, I'm seeing ~185FPS reduced to ~65FPS once I turn-on the Rift.
You mean you get 185FPS in Unity 5 without "Virtual Reality Supported" enabled and then you get 65FPS when you turn it on? Note that it's impossible to get above 75FPS on DK2 with Unity 5 because we require vsync. To compare performance between Unity 4 and 5, please use U4 integration 0.6.1 and U5 utilities 0.1.0, which both work properly with the 0.7 runtime. You can use our performance HUD as documented here: https://developer.oculus.com/documentation/pcsdk/latest/concepts/dg-hud/. It will tell you how long Unity is taking to render as well as other important metrics. - SvenVikingExpert ProtegeI've been seeing reduced performance on Gear VR since Unity 5.1.0 whether using the legacy or built-in integration. For example, the original Game Jam build of Scorched Battalion ran at a constant 60fps most of the time in Unity 5.0.x using the default CPU/GPU throttling settings. In 5.2.0f3 using built-in VR support with Oculus Utilities, the exact same scene runs at 30fps most of the time even if I set the CPU/GPU levels to 3/3. There's also what appears to be occasional screen tearing (e.g. one frame every few seconds).
- drashHeroic Explorer
"Svenviking" wrote:
I believe 3/3 is an invalid setting anyway so it might be falling back to dynamic throttling.
even if I set the CPU/GPU levels to 3/3.
Either way, I agree that there is a significant performance hit when using Unity 5 + native VR functionality for the last few patch releases, and am disappointed to hear that it's still not addressed in 5.2.0. - SvenVikingExpert ProtegeAccording to the documentation, though "strongly discouraged", "The combinations (2,3) and (3,3) are currently allowed for the initial release of the device". In this case I was just trying it out of desperation.
- kideternalProtege
"vrdaveb" wrote:
You mean you get 185FPS in Unity 5 without "Virtual Reality Supported" enabled and then you get 65FPS when you turn it on? ... To compare performance between Unity 4 and 5, please use U4 integration 0.6.1 and U5 utilities 0.1.0, which both work properly with the 0.7 runtime. You can use our performance HUD as documented here: https://developer.oculus.com/documentation/pcsdk/latest/concepts/dg-hud/. It will tell you how long Unity is taking to render as well as other important metrics.
Thanks for the response.
"Virtual Reality Supported" is always checked. With the Rift turned-off, I get 185+ FPS in my scene. Turning it on causes framerates to drop tremendously to a third of what they were before: ~65 FPS. No anti-aliasing, and I'm using a 1080p monitor and GTX 970. I currently will need to achieve 200+ FPS with the Rift off to ensure that when I turn it on I'm at a stable 75 FPS. There's always been a framerate drop in Unity using a Rift (half?), for many reasons, but it seems much worse now using Native VR mode. (I know this, because I've been doing a lot of optimizations during the past 6 weeks, and almost all of my gains in stability vanished with the move away from Plugins to Native. It's as if Timewarp is suddenly unavailable or something worse is going on.) I haven't used Unity 4 in months; my observations are purely based on changes seen since switching Native VR in Unity 5.1 with 0.7.
I'm not currently using the 0.1.0 utilities because I don't need them. Could that cause the problem? Is there a performance benefit to using them beyond what plain-old Unity 5.1.3p2 gives you?
I'll try to find time to integrate them and provide further metrics as time allows. - MikeFTrusteeevery update post unity 4 has had big performance impacts on my end. Each update seems to get more performance heavy, hopefully this is something that will be fixed because at the moment its got me really frustrated developing with the rift.
I miss working with my dk1, plug & play and it always worked. I know that's not a really fair comparison since so much has changed, its just disappointing to have to keep scaling back my projects to meet the new limits - vrdavebOculus Staff
"kideternal" wrote:
I currently will need to achieve 200+ FPS with the Rift off to ensure that when I turn it on I'm at a stable 75 FPS.
This could be a number of things in addition to vsync.
1) Compared to a 60Hz 1080P non-VR monitor, you have to render around twice as many fragments per second to the eye buffers of a DK2. If you set VRSettings.renderScale to 0.7, you can bring that back down to the original rate.
2) Normally, Unity tries to maximize the amount of overlap between CPU and GPU work, increasing throughput. When VR is enabled on PC, we sacrifice some of this for better latency by blocking the CPU from sampling one frame's render pose until the GPU is done rendering the previous frame. You can get back some of this parallelism without giving up too much latency by setting OVRManager.instance.queueAhead = true (see https://developer.oculus.com/doc/0.1.0.0-unity/class_o_v_r_manager.html#a02190cc4c5efa87e9542cfc58fc83c10).
3) Unity does a little extra work (0.1-0.5ms) to display the main monitor preview. You can disable that by setting VRSettings.showDeviceView = false.
4) When the 0.7 runtime is active and queue-ahead is disabled, power-saving features like Intel SpeedStep can kick in, reducing the available performance. You can disable that by setting "High Performance" mode in the Windows Power Options."kideternal" wrote:
Is there a performance benefit to using them beyond what plain-old Unity 5.1.3p2 gives you?
Not necessarily. I generally see about the same performance with or without the Utilities. However, you need to use them to toggle settings like queue-ahead on PC and the CPU/GPU levels on Android."MikeF" wrote:
I miss working with my dk1, plug & play and it always worked.
Performance and your experience are very important to us. DK1 was a bit special because it didn't require any special drivers. It was a standard monitor and HID device. One of our goals for CV1 is to make it "just work"."drash" wrote:
there is a significant performance hit when using Unity 5 + native VR functionality for the last few patch releases
When did you start to see the slowdown? We are working on a few near-term optimizations that should improve texture bandwidth and pixel fill. - nilstasticExplorerI've just upgraded my GearVR project from unity 4.6 to 5.1.3p2 and I am noticing a few things.
1. AA has disappeared from OVRManager and I need to set the AA in Unity to 8x to get similar results as the 2x in the OVRManager. This does not help performance.
2. I am using OVRManager.display.acceleration for triggering jumps, this does no longer work (I'll need to investigate this further)
3. The main thread goes from 0.5ms on Unity 4 to 0.7-1.0ms on Unity 5. A 40% performance penalty (at best) really hurts when you're just barely hugging 60fps in Unity 4.
All of the above is making it impossible to transition to Unity 5. This is a shame since I cannot justify buying Unity pro ($75 * 2 * 12 = $1800) and release a game to a platform that even in the best of worlds (where everyone buys the game) would not even pay for the license cost. :-/
Unity free is an option, but having no static batching, no profiler and a monoscopic broken splash screen takes the fun out of things. - vrdavebOculus Staff
"nilstastic" wrote:
AA has disappeared from OVRManager
In Unity 5, QualitySettings.antiAliasing (the one under Project Settings > Quality) controls the RenderTexture anti-aliasing on the eye buffers just like OVRManager's setting used to. Setting that to 2x should result in exactly the same output as the old setting. Were you using native texture scale before? If so, apply the same value to VR.VRSettings.renderScale."nilstastic" wrote:
I am using OVRManager.display.acceleration for triggering jumps, this does no longer work
It is implemented and should still work.
Velocity and acceleration seem to be unimplemented on Gear VR. For now, you could use the following temporary work-around:[DllImport("OVRPlugin")]
private static extern bool OVR_GetAcceleration(ref float x, ref float y, ref float z);"nilstastic" wrote:
The main thread goes from 0.5ms on Unity 4 to 0.7-1.0ms on Unity 5.
That isn't good. It would help to see profiler output before and after the upgrade. Is the increase in a specific area, or is everything just slower? Does it also happen with VR disabled? Unity 5 has a new job scheduler that is still being optimized. There have been some known performance losses with particle systems and physics, but I'm not aware of a major slowdown in script execution, etc. - kideternalProtegeSo, I had hoped that today's release of Unity 5.2.0.p1 would improve upon the performance of 5.1.3.p2 so I could release my project soon. But unfortunately, the opposite is true.
I have a scene that in 5.1.3p2 runs at 75 FPS on my GTX 970.
In 5.2.0.p1, with the player/camera in exactly the same spot of the same scene, I get 50 FPS!
What the heck is going on? With every new release performance only gets WORSE!
I can't even go back to the "good old days" of pre-native because Oculus v0.7 runtime doesn't support them. :(
I get 180 FPS by running with the Rift turned off.
Whoever is working with Unity on this needs to be working closer.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 6 months ago
- 5 years ago
- 10 years ago
- 5 years ago