Oculus Performance in Unity Part 6: Quality Settings and Lighting

So far I have established a recipe for getting repeatable performance metrics, have taken baseline metrics on the island scene, have seen that they were initially far from the required goals, especially in terms of number of draw calls, but have managed to reduce that number by almost 70% by removing some unnecessary objects from the scene and by using culling techniques.

We achieved a substantial improvement in the last post by “baking” occlusion data, in other words by performing a lot of geometric calculations ahead of time instead of at runtime. We can similarly improve performance by “baking” or precomputing lighting effects such as shadows, as explained in the Unity Manual. This improves the number of draw calls by more than half, from 1690 to 754.

Now let’s try something very obvious. In fact, some people may have tried this first. The island asset has a default Quality Setting of Ultra on PC. What would be the effect of lowering this? I defined a new quality level called “VR quality” which differs from the Ultra settings in a number of ways, all of which should improve performance and the expense of graphics quality. In particular:

  • Texture Quality is reduced from full to quarter resolution.
  • Using only hard shadows rather than hard and soft.
  • Medium rather than high resolution shadows.
  • A much smaller shadow distance.
Settings for VR Quality.

When I tried this I was surprised by the results. The metrics were almost identical to the previous test, even with these changes in quality values. I do not know the reason for this. Perhaps the baked lighting resulted in most of the benefit already, so that these changed quality settings had little additional impact on performance. If any readers have more insight on this, please leave comments below this post.

Frames per SecondCPU timeGPU timedraw calls / frametriangles / framevertices / framedropped frames
Goal90 consistentlyat most 11 msat most 11 ms50 - 1001-2M1-2Mrare, maybe a few at scene transitions
Baseline90 but with downward spikes11.11 ms7.48 ms56191.6M1.8Msome during spikes
Fewer Objects90 but with downward spikes11.12 ms7.89 ms43531.1M1.2Msome during spikes
Culling90 with very occasional downward spikes11.11 ms8.02 ms1690459K532Ksome during spikes
Baked Lighting90 with very occasional downward spikes11.12 ms7.99 ms754191K219Ksome during spikes
Reduced Quality Settings90 with a spike at startup11.11 ms8.19 ms734181K206Kduring spike

The current number of draw calls, 734, although reduced from the original 5619, is still not as low as the value of 100 recommended by Oculus. There are still a couple of things to try, to be explained in the next post…