My Portfolio

Friday, December 31, 2021

Quest 2 - Application Space Warp and Optimization Test

The new application space warp announced by Oculus last month is supposed to gave applications up to 70 percent additional compute. I wanted to test its effectiveness with my own flocking project where the goal is to to have as many flocking objects on the Quest 2 while maintaining 72 fps! As a quick summary, application space warp did allow me to break past my bottle neck.


The Flock simulation is composed of a single Flock Manager that spawns and tracks all of the Flock with each individual Flock using a FlockController. The Flock has two main behavior methods which is to move towards a target point and separate from each other

For performance tracking I wanted to use the Oculus Developer hub for the first time and ran into issues with that as well. Upon install of ODH I found that Unity started running into issues when creating a build for the Quest. I found a helpful answer here where there suggestion of copying the files from Unity platform-tools folder into the ODH resolved the issue. 

To get as many objects on screen as possible while maintaining smooth fps I saved application space warp as the last optimization option to see if it would allow me to break past the project limits.

I iterated on several setups for the flock manager to try and push the limits. The first significant iteration was implementing a request manager which handles the movement needs of the flock which I showcased in my previous post. The second iteration I implemented was the C# Job system along with burst compiler. This allowed me to significantly increase the number of movement updates for the flock and enable better simulation without dropping FPS but not increase the flock count.

Finally during the setup of application space warp I ran into issues following the Oculus documentation because it was was already out of date. For my personal issue it was because I needed to use Unity 2022 beta and not Unity 2020.3 as specified in to documentation. Using application space warp requires a specific oculus branch of Unity's Universal Render Pipeline which was only compatible with Unity 2022 beta.

Once I got past these hurdles it was a big success. Application Space warp got me up to 1000 objects with no noticeable drop from my target 72 fps. All my other optimizations and set up I did only got me to 800 flocking objects where performance starts to dip a bit when it gets really busy.

No comments:

Post a Comment