XaiJu
Bryan Bortz
Bryan Bortz

patreon


Optimization


We all know VRChat has its share of performance problems. And getting a smooth experience with 20+ people in the room is not the easiest thing.

Recently I have implemented new updates that should help with performance on two fronts. 

First, network lag. Back on Dec. 31st of last year, I implemented a patch that added functionality to pickups that causes them to respawn when they sit on the floor or other unwanted places for too long. This helps to keep items available for people to use and keeps the Pug looking reasonably tidy. This works great, but at some point between when I implemented this and now a patch to VRChat started causing severe network lag. The lag occurred when someone new joined a Pug instance that already had a lot of people in it. It ended up being related to how triggers check colliders on dynamic objects and I have implemented a change that alleviates the issue. The VRChat devs helped me track the issue down, and are aware of it. I'm hopeful they will implement a patch to fix this issue to help all world builders.

The second area is framerate. VRChat is CPU bound, this means that the hardware in your computer that gets hit hardest is your processor, not your graphics card. The sources of CPU load are many in VRChat, and it comes down to a few big ones:

I can only make an impact on one of those, and it is draw calls. Draw calls happen when the app sends graphics data over to the GPU for rendering. So this means that each unique item in the scene that does not strongly share properties with another item incurs a draw call that the CPU processes to tell the GPU what to render on the screen. 

Recently I have made a point to focus on reviewing models in The Great Pug and assessing what I can do to reduce draw calls, it is a slow process, but I have already made good progress on it. And I expect to be able to shave off a couple draw calls here and there as time goes on. 

I am always looking to further improve how The Great Pug performs, and tons of optimization work has been done over the past year to work towards a goal of smooth frame-rates. It is an on-going iterative process.

Additionally, when VRChat is able to get to it, future Unity engine upgrades (like to Unity 2018) will further reduce draw calls due to advancements deep in the engine. I also expect things to improve greatly once VRChat starts implementing proper limits on how many resources one person's avatar can utilize. Right now there are some ridiculously unoptimized avatars going around.

Please spread the word about optimizing avatars! And I encourage you to use the VRChat Canny, it is a place where you can vote on feature requests, make your own, and post bugs you find. Below are a few Canny items relating to avatars and optimization that could use some more upvotes:

For those who would like to learn how to optimize avatars they are making, I recommend reading this forum thread over on VRCat.club where Tupper, one of the VRChat employees, digs into the topic:


More Creators