Basic Usage

Basic Usage #

Use Automatic Optimization #

There are several optimizations which can be performed automatically for Avatars.

  • Removing Unused BlendShapes(Shape Keys)1
    • For BlendShapes with non-zero weight, freezing BlendShapes will reduce processing cost.
    • Even if the weight is zero, removing BlendShapes will reduce the size of avatars.
  • Removing unused Behaviours such as PhysBones
    • If there are enabled PhysBones which do not need to be swayed (e.g., the swaying target mesh2 is always disabled), extra computational cost is caused.
  • Merging bones which is not animated or swayed with PhysBones
    • If the clothes bones are nested into the body bones, there will be many bones which are never moved locally. Such bones cause extra cost.

With AvatarOptimizer, these optimizations can be performed automatically by simply adding AAO Trace And Optimize component to the Avatar Root!

add-trace-and-optimize.png

Upload Avatar #

Now that you have added AAO Trace and Optimize component, let’s try uploading your avatar! AAO: Avatar Optimizer is a non-destructive avatar modification tool, and processes avatars on entering play mode or building them. Therefore, no special steps are required for uploading. Upload your avatar via VRCSDK Control Panal as usual.

However, even though the hard limit will not be exceeded through Avatar Optimizer optimization, etc., the upload button cannot be pressed because the limit has been exceeded at the time of the VRCSDK pre-build check, the following methods can be used.

  • Upload the avatar generated with Manual bake avatar.
    (Select the GameObject of the avatar, then press Manual bake avatar in NDM Framework from Tools at the top of the Unity window)
  • Upload using Upload without pre-check by Sayamame-beans.

Checking performance rank without uploading avatar #

When using non-destructive avatar modification tools, Performance Rank on the VRCSDK Control Panel is no loner be relied upon.

Instead, you can check Performance Rank in Play Mode with Actual Performance Window of anatawa12’s Gist Pack. Please check basic usages of anatawa12’s Gist Pack and documentation of Actual Performance Window for more details。

Reduce polygons with BlendShapes which shrink parts of the body #

By removing polygons which are hidden by clothes or something, you can reduce rendering cost, BlendShape processing cost, etc. without affecting the appearance so much. To make this easier, AvatarOptimizer allows you to remove polygons with BlendShapes for shrinking parts of the body, which many avatars have!

Let’s add AAO Remove Mesh By BlendShape component to Body Mesh!

Enable Automatically set BlendShape weight for preview when toggled to make sure that unintended parts of the body are not removed, and select BlendShapes from the BlendShapes list below that shrink the parts of the body you want to remove!

In case polygons you want to remove are not removed, or you do not want to remove are removed, you need to adjust the Tolerance value! Tolerance decides how much the vertex is moved by BlendShape to be removed. In the first case, increase the value a little, in the second case, decrease it a little!

remove mesh by BlendShape

Merge Meshes to reduce # of Skinned Renderers #

You can easily merge Skinned Mesh with Avatar Optimizer! Merging Skinned Mesh will not allow you to turn them on and off individually, but merging them will reduce rendering cost!

Why will we merge Skinned Mesh?

Merging Skinned Mesh will reduce number of deforming mesh (skinning). Also, Merging with MergeSkinnedMesh can reduce material slots so we can reduce number of drawing.

This time, I’ll optimize Anon-chan as a simplest case.

start.png

First, create GameObject for merged mesh. Right-click avatar GameObject and click Create Empty to create new GameObject. Then, rename to understandable name. In this document, I call it as Anon_Merged.

create-empty.png

Then, Add AAO Merge Skinned Mesh component to Anon_Merged.

add-merge-skinned-mesh.png

This adds AAO Merge Skinned Mesh component and Skinned Mesh Renderer component (which will be the merged mesh).

To make it easy to specifying merge target meshes to AAO Merge Skinned Mesh component, lock the inspector with Anon_Merged selected. This allow us to drag & drop multiple meshes at once.3

lock-inspector.png

Then, select meshes except for Body, which is the face mesh, and drag & drop to Skinned Renderers of AAO Merge Skinned Mesh component!

drag-and-drop.png

Why don’t we merge face meshes?

BlendShape (Shape Keys) is a feature became heavier in proportion to the count of vertices and BlendShapes. Therefore, merging face mesh, which has many BlendShapes, and body mesh, which has many vertices, can make your avatar heavier than before so I recommend not to merge face mesh.

Next, configure Anon_Merged!

Because of many reasons4, AAO Merge Skinned Mesh component doesn’t configure anything except of bones, meshes, materials, BlendShapes and bounds. So, please configure Anchor Override, Root Bone and so on yourself on the merged mesh (Skinned Mesh Renderer component which is added at the same time as the AAO Merge Skinned Meshcomponent). I think specifying what is configured in your avatar’s body as Anchor Override, and setting Hips as the Root Bone will work well.


  1. BlendShape is the name of Morphing in Unity. Maya call them as Target Shape, Blender calls them as Shape Key, Metasequoia and MMD call them as Morph. ↩︎

  2. In this document, mesh means SkinnedMeshRenderer or MeshRenderer, not the Mesh asset in Unity. ↩︎

  3. It is useful to keep in mind that it can be used in many other places such as specifying multiple colliders for PhysBone. ↩︎

  4. Root Bone and Anchor Override are impossible to merge automatically I think. If you know any good algorithm, please tel me that. ↩︎