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.

Thursday, December 2, 2021

December 2nd - Spatial Partitioning and Custom Playables with Timeline

My goal this week was to to improve the performance of my flock simulation by improving the main update loop. 

Spatial Partitioning

Currently, the main bottle neck is how I implemented the Separation method for the flock controller which needs to do a distance check against all of flocks in the scene. This quickly becomes really expensive because each additional flock added increases the number of calculations needed in update for everyone.

In order to improve this I wanted to try and implement Spatial Partitioning. How it would work would be to split the map into grids where the distance check for each flock would only be against the other flocks in the same cell and ignoring the ones outside of it.

Thursday, November 25, 2021

Nov 25th - Procedural Animation and Basic Shaders

I did some animation rigging during my last project with the Dune worm and I decided that I wanted to do a really deep dive into it. So far I've been having a lot of fun and feel like the animation rigging package could really help me create some great boss battles and more easily creating cinematic/scripted events. Here are some clips from what I've been experimenting with.


My first mini project was to try and create a walking 2-legged robot where the legs automatically move themselves after they exceed a set distance from the main body. It was amazing when I got it work and I could see the legs automatically animating themselves while manually moving the Walker-Bot around. Here is a GIF where you can see me manually moving the body with the legs procedurally animating themselves. 

Saturday, November 20, 2021

November 13th - My Team's VR Mario Showcase Project

During the PXR2021 Conference there was a goal of creating some sort of collaborative virtual reality project throughout the week. I wanted to participate because I thought this could be a fun short-term creative VR project opportunity. 

My team had students across multiple disciplines and background. Not everyone could meet at the same day/time and as a result it was only towards the last 2-3 days of the conference that we really got going with sort of VR project.

For my team we had a few students who really wanted us to help them create a Mario inspired VR experience. Using that as our creative theme and direction we made a Nintendo Mario themed Altspace world. 

Poster art by Dylan Coakes

Friday, November 19, 2021

Nov 14 - Performance and XR 2021 Virtual Reality Conference

I got an opportunity to attend the Performance and XR 2021 Virtual Reality Conference through a director at the Centre for Entertainment and Arts. The whole conference was centered around using Altspace as the VR venue. 

When I first tried VR Chat I remember getting motion sickness after a while of using it. Similarly I'm finding a bit of motion sickness in Altspace when using continuous loco-motion but I think I'm starting to build more resistance to it now. Either way, I do prefer using the teleport locomotion since I get far less motion sickness with it. At the moment I find both VR chat and Altspace to be pretty similar to one another.

I also built my first Altspace world as well.

Experiencing and Building worlds in Altspace

For my first Altspace world I decided to try and create a scene inspired from the big sci-fi movie Dune with a world that has a giant Desert Worm hopping around. 

This is footage from the Unity Editor where I first created the VR experience. However, I found that you can't just directly import the Unity scene into Altspace. There is a huge limitation where you can't use be uploading a scene that utilizes any custom C# monobehavior scripts. 

After experimenting for an afternoon, I decided to use Unity's Timeline sequencing to create this scene and trigger the sound and particle effects at the right time. Kinda sucks that you can't use scripting at all. Especially since I had spent the time rigging the worm using Unity's Animation Rigging which allowed for real-time animation. Regardless I was still able to pretty much deliver the full VR experience I intended for VR.

For the modeling I used Probuilder to create the Dune Worm.

If you want to check out this Altspace world you can using the world code : PKI578.