Banner for the page
0

How to create a VRChat avatar

A step-by-step guide for creating an avatar for VRChat.

Performance Test

This page is a Work In Progress.

What is this?

The avatar performance test is a suite of manual tests of optimization methods for VRChat avatars to determine if various optimization methods are impactful for VRChat avatar performance or not.

Each test is designed to evaluate the performance benefits of a specific optimization method in isolation. Some tests may combine multiple optimization methods.

Each test is conducted using the same environment and tools so you can directly compare different optimization methods.

Why did you do this?

There are a lot of rumours of how to do avatar optimizations. Both from professional modellers, Unity developers and random people I meet in VRChat. I wanted to get empirical data to support what people tell me.

It takes a lot of time to optimize and an avatar and the time it has taken to actually perform these tests and write this page is far less than "guessing" what works and what doesn't work.

Future Ideas

  • run VRChat inside a virtual machine for better consistency
  • run tests with different avatars (maybe a free one)

Test Environment

The test environment is a Windows 10 high-end PC with these specs:

  • Nvidia RTX 3090
  • i9-12700K
  • 32GB DDR5
  • 3840x2160 @ 144hz

With this software:

  • Unity 2019.4.31f1 Personal DX11 (running in background)
  • VRCSDK 2022.04.21.03.29
  • VRChat (with --fps=0 to unlock FPS) (with no mods)

Software running in background:

  • Opera Browser
  • Discord (out of call)
    • In testing if you are in a call and someone talks you lose ~20 FPS
  • Spotify
  • Notepad

With this avatar used for all tests:

Which looks like this:

An example test.

Why the Canis Woof?

  1. It is my main avatar so I am most familiar with it.
  2. It is a pretty complex avatar.
  3. It is almost always "Very Poor" performance ranking in worlds I go to (it is released by default as "Poor" rating).

How to interpret results

There are 3 different metrics used in this test: average FPS, VRAM usage and download size.

The results are displayed in a table for your comparison. A colored indicator helps identify if it is a positive (green) or negative (red) change. If the change is within 5% then it is orange.

Average FPS

The average FPS of an avatar in VRChat is determined using Windows Game Bar (Windows 10) FPS counter while the VRChat client is running with the avatar loaded into an ultra-basic VRChat world called "Avatar Performance Testing".

The VRChat client window inside the VRChat world with FPS counter.
  1. Launch the VRChat client in desktop mode
  2. Visit "Avatar Performance Testing" VRChat world
  3. Switch into the avatar to test
  4. Disable mirror
  5. Open Windows Game Bar (press Win + G)
  6. Open the "Performance" widget and pin it
  7. Record the average FPS number after 65 seconds
What the FPS counter looks like.

VRAM Usage

Video cards have a maximum amount of VRAM before Unity decides to put assets into regular RAM. To calculate the VRAM, we use Thry's VRCAvatarTools (which uses Unity's inbuilt memory profiler) to determine VRAM usage.

All sizes are rounded to the nearest single decimal place.

An example of what Thry's VRCAvatarTools does.

Download Size

To display a VRChat avatar the VRChat client must download the Unity asset bundle for the avatar. This bundle is created by the uploader therefor we can determine the download size by looking at the outputted bundle when performing a "Build & Test".

  1. Go to %APPDATA%/../LocalLow/VRChat/VRChat/Avatars
  2. Find the avatar's .vrca file used in the test
  3. Record the size from Windows Explorer

All sizes are rounded to the nearest single decimal place.

An example of what the folder contains.

Baseline

The baseline for all tests is the avatar inside the default Canis Woof V11 scene provided by Rezillo Ryker:

KeyValue
VRChat SDK Performance RankingPoor
VRChat SDK Material Slots12
VRChat SDK Polygon count67736
Sub-Mesh Count5 (Body, Collar, Nametag, NameTag Chain x2)
FPS540
VRAM (all) (MB)230.7
VRAM (active) (MB)98.2
Download (MB)31.4

Tests

Atlassed Textures

What is the performance impact of atlassing all textures (merging materials) of a Canis Woof (V11)?

  1. Run Polytool (1.7.3) using this configuration:

    • Merge And|Or Atlas Meshes
      • Output Renderer: Body
      • Merging
      • Atlassing
        • Standard Shader
        • All Textures Selected (9)
        • Remove Excluded Materials
        • Remove Materials With Warnings
    • Save Created Assets
      • Compress Textures
  2. Build & Test.

DefaultAll Textures Atlassed (4K)%All Textures Atlassed (2K)%
FPS540448🔴-17%560🟠+3.7%
VRAM (all) (MB)230.7571🔴+147.5%299🔴+29.6%
VRAM (active) (MB)98.2422.7🔴+330.5%150.7🔴+53.5%
Download (MB)31.446.4🔴+47.8%34.2🟠+2.5%

Comments

It appears that only atlassing textures makes performance worse.

When we lower the resolution to a max of 2K it gets even worse!

That being said you probably need to combine atlassing textures with decimation and merging meshes to get better results.

Baked Blendshapes

What is the performance impact of "baking" all non-viseme blendshapes of a Canis Woof (V11)?

  1. Import the Canis Woof (V11) FBX (CanineV267) into Blender (3.1.2).
  2. Bake all non-viseme shape keys
  3. Import blendfile into Unity.
  4. Duplicate original avatar then switch mesh to imported mesh with baked blendshapes.
  5. Build & Test.
DefaultAll non-viseme blendshapes baked%
FPS540588🟢+8.9%
VRAM (all) (MB)230.7196🟢-15%
VRAM (active) (MB)98.263.5🟢-35.3%
Download (MB)31.428.1🟢-10.5%

Decimation

What is the performance impact of decimating sub-meshes for a Canis Woof (V11)?

  1. Run Polytool (1.7.3) to decimate each sub-mesh to 50% their original polygon count:
  • Decimate
    • Mode - Multiple
      • Body 33190
      • Collar 326
      • NameTagRoot 80
      • NameTagPivot3 120
      • NameTagPivot2 120
      • NameTag_Mesh 32
    • Current total polygon count: 67736
    • Resulting total polygon count: 33868
    • Denominator Precision - 100
    • Enable Smart Link
    • Preserve UV Seam Edges
    • Preserve Surface Curvature
    • Preserve Border Edges
    • Blendshape Smart Link
  • Save Created Assets
    • Compress Textures

Note: VRCSDK reports 33984 polygons.

  1. Build & Test.
DefaultAll Meshes Decimated 50%%
FPS540557🟠+3.1%
VRAM (all) (MB)230.7210🟢-9%
VRAM (active) (MB)98.277.5🟢-21%
Download (MB)31.429.3🟢-6.7%

Good Performance Ranking

What is the performance impact of using Polytool (1.7.3) to convert a Canis Woof (V11) to the "Good" Performance Ranking using the Polytool "VRChat PC (Good, Fallback-compatible)" preset?

  1. Apply Polytool (1.7.3) "VRChat PC (Good, Fallback-compatible)" preset to Canis Woof (V11) with no settings changed.
  2. Remove "VRC Contact Receiver" and "VRC Contact Trigger" components until Good ranking achieved.
  3. Build & Test.
DefaultGood Ranking%
FPS540611🟢+13.1%
VRAM (all) (MB)230.7293.7🔴+27.3%
VRAM (active) (MB)98.2136.7🔴+39.2%
Download (MB)31.434🔴+8.3%

Comments

Although we get a significant FPS boost we sacrifice VRAM and download size. You should combine the Good preset with other optimization techniques to lower your VRAM and download size.

Less Bones

What is the performance impact of reducing the bone count in the Canis Woof (V11)?

  1. Apply Polytool (1.7.3) to Canis Woof (V11):

    • Merge And|Or Atlas Meshes
      • Merging
        • Renderers To Merge - None
        • Remove Unmerged Renderers
        • Limit Bones
          • Bone Limit - 52 (all bones set in the Unity avatar plus Neck) Bone count: 146 Bones to remove: 94
        • Reset Vertex Colors
      • Atlassing
  2. Build & Test.

DefaultBasic Skeleton Only%
FPS540617🟢 +12.5%
VRAM (all) (MB)230.7234.7🔴 +1.7%
VRAM (active) (MB)98.2102🔴 +3.7%
Download (MB)31.434.4🔴 +8.7%

Comments

We only get a small FPS gain when deleting all bones that are not required for the Unity avatar. You may see more of an FPS gain when you are in a world moving your limbs as Unity will need to move vertices with your bones.

Merged Meshes

What is the performance impact of merging all sub-meshes into a single mesh for the Canis Woof (V11)?

  1. Apply Polytool (1.7.3) to Canis Woof (V11):

    • Merge And|Or Atlas Meshes
      • Merging
        • Renderers To Merge - All
        • Remove Unmerged Renderers
        • Limit Bones
        • Reset Vertex Colors
      • Atlassing
  2. Build & Test.

DefaultAll Meshes Merged%
FPS540577🟢+6.9%
VRAM (all) (MB)230.7234.8🟠+1.8%
VRAM (active) (MB)98.2102.3🟠+4.2%
Download (MB)31.431.4🟠0%

Comments

Merging all meshes without doing any optimizations has no impact on performance.

Reduced PhysBones

Texture Resolution

What is the performance impact of reducing the texture resolution for meshes in the Canis Woof (V11)?

  1. Duplicate avatar, all textures and all materials.

  2. Switch max resolution of all textures to 1K or below (if originally below 1K).

  3. Switch all meshes to use materials that use new textures.

  4. Delete all layers from animators that play animations that change materials/textures:

    FX:

    • CollarEmissiveToggle
    • EyeEmissiveToggle
    • HueChange
    • TextureSwitching
    • Emission
  5. Build & Test.

4K (Default)1K%
FPS545571🟠+4.8%
VRAM (all) (MB)98.268.2🟢-30.5%
VRAM (active) (MB)98.268.2🟢-30.5%
Download (MB)17.610.1🟢-42.6%