ホーム 暮らし Avatar Modification Workflow in the Modular Avatar Era

Avatar Modification Workflow in the Modular Avatar Era

篠原 沙世 篠原 沙世 • 更新: • 公開: • 読了約 92 分
目次

Introduction

n1af13c43083d

In November 2022, a groundbreaking Unity extension tool called Modular Avatar was released by bd_.

Furthermore, in response to this, anatawa12 released another revolutionary optimization tool called Avatar Optimizer. (The official release and distribution on Booth began on June 27, 2023!!)

The arrival of these tools has significantly changed my (and many others') modification workflow. Therefore, along with the greatness of these new tools, I will roughly introduce my modification workflow as of June 2023. I'll say it in advance: this is long.
️Caution️
This time, there are parts where I haven't touched on the detailed work procedures in order to explain the overall flow. Also, it includes some content for advanced users. Since this is a workflow for someone who puts on unsupported clothing in Blender, does various setups in Unity to some extent on their own, and creates on/off animations from scratch, I am writing this as an introduction to what it's like to fully utilize tools like Modular Avatar!
As a prerequisite, it is assumed that the project is VCC-compatible.

Modular Avatar and Avatar Optimizer are great

Modular Avatar

For now, I have prepared a video. I am using Modular Avatar to put clothes on. All you have to do is drag and drop the clothes onto the base body.

Keywords:

  • Easy dressing, easy installation

  • Can be undone!

  • Can handle Prefabs as Prefabs

  • Improves project visibility

Modular Avatar (hereinafter referred to as MA) is a tool created with the concept of modularizing and managing avatars, clothes, accessories, gimmicks, etc., as the name suggests. Modules are simply parts. It's like making clothes and gimmicks as combinable parts, and then just sticking them together to complete it.

As an example, when putting on clothes, it was common until now to use tools like Kisetene to nest the bone structure of the clothes into the bone structure of the base body. However, while this is fine when putting them on, taking them off involves a considerable amount of effort. In such cases, I think many people either remade the avatar or just let it bloat. If you use MA, you no longer need to do that.

Also, when considering introducing gimmicks, I think it was common until now to manually tweak animations or use the included installation tools. With an MA-compatible gimmick, you can introduce the gimmick just by dropping in one Prefab.

What's even more important is that these can be done non-destructively (without needing to unpack the Prefab). Some people might ask, "What is a Prefab?", but it's the one displayed with a blue cube icon in the Unity Editor. I wrote an explanatory article, so please take a look here for information about Prefabs.

What's great about this is that changes to the original Prefab (Prefab Asset) are automatically reflected in all Prefabs in the scene (Prefab Instances). Furthermore, you can also create version-different Prefab Variants based on the Prefab. If there are any corrections, updating the original will reflect them in everything. MA allows you to perform modifications while making the most of these Prefab benefits.

For example, with previous modification methods, if the avatar body you purchased was updated, you had to redo the modification from scratch to use it. However, since MA does not destroy the Prefab, once you import the updated avatar data, all you have to do is re-upload it.

This is also extremely effective when uploading as separate avatars for each outfit. Until now, if you split avatar data into multiple parts, if you wanted to change common parts (hand signs for expressions, menus you want to keep common, animations, PB settings, etc...), you had to correct all the separated avatars one by one. However, with MA, since you can handle Prefabs as they are, if you correct one and reflect the changes, all avatars will be changed. All that's left is to upload.

As a result, you will be able to manage common avatar parts and other components separately. Animations and Expression Menus, such as toggling shoes or jackets, can be attached to the clothing side, while facial expression changes can be kept on the base model side. This makes the project much easier to navigate.

Another important point is performance improvement. This is also closely related to Avatar Optimizer, and it holds the potential to change the situation where Very Poor was the norm for modified avatars. Even if you were putting multiple outfits on one avatar due to the hassle of management, using MA makes it easier to operate with one avatar and one outfit per project. For some, this alone will result in a massive reduction in weight. Simply looking at changing clothes, MA integrates the clothing bones into the base model's bones (without nesting!), so the number of bones does not increase unnecessarily. Since the bones themselves are integrated, there is no risk of chest physics breaking due to nesting. Furthermore, when toggling clothes on and off, if you don't create an animation that toggles both the clothing mesh and the PhysBones, the PhysBones of the hidden clothing will continue to move and consume computational resources. Many people do this, and I wouldn't be surprised if there is at least one person in a group of ten who has five outfits on one avatar, with five sets of PhysBones constantly running. Since they are usually invisible, many people don't worry about it, but when many people gather, the CPU load is not negligible. While MA doesn't solve this immediately, the specification makes it easier to build animations that toggle PB along with the mesh.

Anatawa12's Avatar Optimizer

I have also prepared a video for this. I used Avatar Optimizer to integrate clothing meshes and PBs, bringing the rank from Poor to Medium.

Keywords:

  • Easy optimization for everyone

  • Reversible! Changeable!

  • Great compatibility with MA

Anatawa12's Avatar Optimizer (hereinafter referred to as AAO) is a tool for improving performance by integrating an avatar's meshes and PhysBones. It is common for avatar and clothing data to have meshes split up so that they can be toggled on and off in detail. While this is correct in terms of ease of modification, an increase in the number of meshes leads to an increase in draw calls (GPU calls), which degrades performance.

It is well known that VRChat is not optimized and therefore has higher performance requirements than typical games, and this is undoubtedly one of the major factors. (I believe that worlds are often well-optimized and lightweight, so if many VRChatters properly optimized their avatars, there is a possibility that fps could improve significantly even when large numbers of people gather.) Until now, the only way to perform such optimizations was to use paid assets or use Blender to integrate meshes at the fbx stage. If you can use Blender, the optimization work itself is easy, but it created tedious work if you later decided you wanted to separate the integrated accessories again. Avatar Optimizer can fundamentally improve this. In other words, you can keep the original data split as finely as you like and have it automatically integrated only when uploading. Even if you decide later that you want to stop integrating or redo it, you can change it as many times as you like. Regarding performance rank,

if the polygon count is within 70,000, it is often not difficult to escape Very Poor
in most cases. It is true that polygon count is the strictest condition, so it is difficult to escape Very Poor if the polygon count is high. However, even then, optimization should significantly change the actual load. This is also very easy to handle as a workflow because it separates the optimization work of mesh integration from editing in Blender. You can throw meshes that were split in Blender for the sake of editing directly into Unity. It's just wonderful!

Furthermore, an automatic optimization feature (Trace And Optimize) has been added through an update. With this, even people who don't understand modification at all can have their avatars automatically optimized just by attaching the component. It's god-tier.

Actual Performance Window

I will also introduce this as an extra. It is a tool created by anatawa12 of Avatar Optimizer that displays the correct performance rank in Unity. When you use Modular Avatar or Avatar Optimizer, mesh and bone integration is performed at build time, so the performance rank calculation by the VRChat SDK is not performed correctly (it is calculated based on information before integration). Of course, the correct performance rank will be shown once you upload, but it is troublesome if you cannot check it in Unity. That is where the Actual Performance Window comes in. If you install this, a window displaying the performance rank will appear separately from the VRChat SDK window when you play and build the scene. If you use MA or AAO, check your performance rank from here. The link above is not just for the Actual Performance Window, but a collection of several tools called anatawa12's gists pack. The Actual Performance Window is included in it. You can use it by adding anatawa12's repository in VCC (VPM).

About installing tools

Before introducing the modification steps, I will introduce how to install tools such as Modular Avatar. While you can install from a Unitypackage, I basically recommend the method using the VPM repository (VCC). This feature has been available in VCC since v2.1. If you are using an older version of VCC, please update. In VCC, you can easily add the VRChat SDK to your project by specifying the version, and the same can now be done for tools like lilToon and Modular Avatar.

There are many benefits to this.

  • No need to download Unitypackages yourself

  • Install just by choosing the version

  • Easy to upgrade and downgrade

  • You can immediately see which version of what you have installed

To add a repository, simply add the repository URL from Settings > Package > Add Repository.

For example, for AvatarOptimizer, add the following URL.

https://vpm.anatawa12.com/vpm.json

Now, where can you find the repository URL? It varies for each tool, but for example, for AvatarOptimizer (and anatawa12's repository that includes it), you can simply click the link in the installation instructions here to launch VCC and install it.

For Modular Avatar, you can launch VCC directly and add the repository from "Download (via VCC)" on the official page.

By the way, for lilToon, you can also launch VCC directly from the link labeled "VRChat Creator Companion" on the official page.

My modification procedure

Now, I will introduce my current modification procedure.
Basically, I use avatars for which there are no compatible outfits, so I modify incompatible outfits using Blender. However, since the Blender modification is only for the first half, which is fitting the outfit, please skip the first half if you are not using Blender.
Since I am focusing on explaining the overall flow this time, please note that there are parts where I have not touched upon detailed work procedures.
If there is a demand to know more about these areas, please feel free to contact me in the comments section or on my Twitter. I will probably be happy to write about it.

Table of Contents
  1. Import unitypackage into Unity

  2. Import fbx into Blender

  3. [Blender] Adjust scale and position

  4. [Blender] Adjust mesh

  5. [Blender] Adjust bones

  6. [Blender] Adjust weights

  7. [Blender] Correcting the coordinate system

  8. [Blender] Exporting the fbx

  9. Adjusting in Unity

  10. Dressing with Modular Avatar

  11. Checking for clipping

  12. Setting Bounds and Anchor Override

  13. Optimization: Automatic optimization with Trace And Optimize

  14. Optimization: Merging meshes

  15. Optimization: Merging PhysBones

  16. Optimization: Checking textures

  17. Checking performance rank

  18. Creating animations

  19. Verifying operation

  20. Creating a Prefab Variant

  21. Uploading

1. Import the unitypackage into Unity

First things first, import the unitypackage into your Unity project. Here, you will check the mesh structure, materials, and how the PB settings are configured.

2. Import the fbx into Blender

Once you have finished checking in Unity, import the fbx file into Blender. From here on, it is time for some fun in Blender. When dressing in Unity, the work from this point onward corresponds to tasks like adjusting bone scales in Unity. For compatible outfits, the entire portion corresponding to this Blender work becomes unnecessary.
This article only introduces the workflow and does not explain the detailed operations, but please refer to my other article here for Blender modifications.

3. Adjusting scale and position

First, select the imported clothing along with its hierarchy, and adjust the scale and position. I adjust things like the length by looking at the images of the corresponding avatar on Booth, and in my case, I basically align the position of the arms.
Once the position and scale are decided, I apply the transform for now.

4. Mesh Adjustment

I will fix the parts that are clipping. There are three main methods.

  • Utilizing existing shape keys

  • Adjusting bone scale in Pose Mode (same as modifying non-compatible outfits in Unity)

  • Vertex manipulation in Edit Mode

First, let's check the shape keys beforehand. Especially for the chest, there are often big/small shape keys included (it is also recommended to check if shape keys exist before purchasing). If adjusting the shape keys makes it look good, it is best to deform the mesh based on the shape key with the appropriate value.
After that, I use bone deformation for large changes like sleeves being too long overall, and vertex editing for partial clipping.
Here, in my previous article, I only introduced proportional editing, but I also recommend using the Mesh Deform modifier or Lattice as tools for more flexible deformation. These two are more effective for larger deformations than proportional editing. Also, for clothing that fits tightly to the skin, such as underwear, Shrinkwrap is very effective. When using Shrinkwrap, it is better to split the mesh by parts and adjust them before making final adjustments.

5. Bone Adjustment

Until now, I followed the procedure of separating the clothing's swaying bones from the others and merging them with the base body's bones... but when using MA, you can use the method of using the bone names as they are without changing them. This is because MA has a feature that automatically renames and merges bone names used in many avatars. For example, even if the base body side is named UpperArm_R and the clothing side is named RightUpperArm, it will automatically handle it correctly just by setting up the outfit in Unity.
The list of automatically renamed bone names is in the link below for reference, but for now, I think you can generally get by with just putting it into Unity and changing the bone names if it doesn't work well.
However, if you are going to manually adjust the weights thoroughly, you will end up merging the base body bones with the clothing's swaying bones. This depends on the type of clothing and its compatibility with the base body.

6. Weight Adjustment

This is the most troublesome part of Blender modification. Since repainting weights is a hassle, I want to avoid it as much as possible. From experience, the areas where weight transfer works better (or rather, where it usually fails if you don't) are the chest (if it sways), around the hip joints (Hips, UpperLeg), and the feet (Foot, Toe). Otherwise, I usually look at the weights, and if they aren't too far off from the base body, I often just take them into Unity and think about it later.
A point of caution here is that in MA, the clothing's bones are merged into the avatar side, so you will be adjusting weights to match the avatar's bones, ignoring the clothing's bone positions. (Excluding bones for PhysBone)
When adjusting weights, I think you will adjust them while moving the bones, but since the bones referenced in Unity will be those on the base body side, you should check the weights by changing the target of the Armature Modifier to the base body's Armature.
However, since it is a hassle to change this every time, if you are going to check the weights that carefully, it is easier to match the bone names from the beginning. I have patterns where I do it either way. It depends on the clothing.
By the way, when you want to partially transfer weights, you can achieve this by duplicating the source base body mesh, creating a mesh that only keeps the vertex groups you want to transfer, and then transferring them.

7. Coordinate System Correction

Once weight adjustment is finished, to prevent rotation from remaining in Unity, I apply a +90° rotation on the x-axis to both the Armature and the Object. Once I unparent it from the armature, I rotate it -90 degrees in Object Mode by pressing R X -90. While it is still selected, I press Ctrl+A to apply the transform. Once I confirm that the transform has been applied and the rotation is 0, I complete the process by rotating it 90 degrees with R X 90.

8. Export FBX

I use an add-on called Bundle Exporter here. It is possible to export in bulk by collection name. I output directly into the Assets folder of the Unity project. The add-on called Asset Creation Toolset is also famous.

9. Adjustment in Unity

Back in Unity.
Configure the FBX import settings,

  • Materials

  • (Bounds)

  • PhysBone, Cloth

  • Other necessary components

are transferred from the purchased, pre-setup Prefab. Regarding Bounds, I will touch on this later, but it can now be easily set in bulk using Modular Avatar's features.
Specific methods for this work are described in detail in the following article.

By the way, this task is honestly quite tedious... While PB can be copied in bulk using CopyComponentByRegex, please let me know if there is a way to easily copy material assignments. By the way, if there are game objects for PhysBones/Cloth colliders, these also need to be moved.
The procedure is roughly like this:

  1. Unpack the original clothing Prefab

  2. Port the collider objects to the fbx side

  3. Bulk copy PhysBones using CopyComponentByRegex

When moving collider objects, since objects within a Prefab cannot be reordered, add them to the very end of that hierarchy.

After moving the colliders, bulk copy the PhysBone Components using CopyComponentByRegex. This should allow you to move them cleanly, including the collider settings. Please note that if you do not move the collider objects first, the collider settings will not work correctly.
Since bone positions and such have been changed, it is also necessary to correct the positions and angles of the PhysBone Collider Components. In the case of skirts, etc., it might work as-is if it's just a thigh collider, but conversely, inside-type colliders will likely require correction because the skirt will constantly expand due to the difference in bone positions.

10. Dressing with Modular Avatar

I have created an avatar Prefab consisting only of the base body with the clothes removed, so I first place that in the scene. Put the clothing Prefab directly under the avatar's root object, right-click, and select Setup Outfit. That's it.
This is all the procedure for dressing with Modular Avatar. Easy!

11. Clipping Check

Play the operation check animation and check for clipping. I usually use this one.

When you drag and drop an animation clip onto an avatar, a new Animation Controller is created and the animation plays.
I also move the bones myself to check. There is usually a problem somewhere, so I go back to Blender to fix it. This is where the greatness of MA is fully demonstrated. Since I haven't destroyed the Prefab (fbx) with the work up to this point, once I fix it in Blender, the changes are reflected just by overwriting and exporting to the fbx in the Asset folder. Over and over! You can fix it as much as you want!!
If there are no problems, it is complete up to the point of dressing for now. You can upload and use it in this state, but from here, we will perform optimizations.

12. Setting Bounds and Anchor Override

When modifying avatars, if the size of the Bounds used for mesh rendering judgment, etc., is not unified, problems such as accessories disappearing at the edge of the field of view or shoes not being displayed will occur. Also, since the Anchor is a reference point for calculating brightness, if this is not unified within the avatar, the brightness of the clothes and the base body may not match.
In the current version of Modular Avatar, when you perform Setup Outfit, MA Mesh Settings are automatically attached to the clothing's root object. By using this, you can set the bounds and Anchor Overrides for all meshes of that clothing in bulk. Let's set them to the same settings as the base body side.

Setting values on the base body side

13. Optimization: Automatic Optimization Trace And Optimize

AAO has a wonderful component called Trace And Optimize. It is a godsend. For now, just attach the Trace and Optimize component to the avatar root without thinking about it.
Trace And Optimize has several features.

The first is Automatically Freeze Blend Shape, which automatically removes shape keys (BlendShapes) that are not used in animations. It is said that shape keys impose a load proportional to the number of mesh vertices multiplied by the number of shape keys, so you can reduce the load by fixing the values of unnecessary shape keys and removing them.
If you merge meshes in a later step, the number of vertices in a single mesh will increase, which will increase the load per shape key. In that sense, it is important to fix shape keys that will not be moved after uploading. Although it is difficult to feel the difference because it does not currently affect the performance rank, it reliably reduces the load without any downsides.

The second is Remove unused Objects Automatically, which automatically removes unused GameObjects such as meshes and bones.
When you use only a part of an avatar or clothing for modification, the PhysBones corresponding to that part often remain even if you delete the mesh. Normally, you would need to find and delete them, but using this Trace & Optimize component will automatically remove unreferenced bones and objects. In some cases, this alone results in a massive reduction in weight (and with absolutely no negative impact on appearance or movement!).
Just like fixing BlendShapes, regardless of whether you are managing with Prefabs or using MA, just attach it without thinking, and everyone will be automatically optimized. Everyone, please do this.
(Some of the powerful automatic deletion features are enabled from AAO 1.5.0. If you want to use them right now, enable 'show prerelease' in VCC and install 1.5.0-rc.x.)

14. Optimization: Mesh Merging

From here on, we will perform manual optimizations using Avatar Optimizer. First, we will merge the clothing meshes. The general flow is as shown in this video. (The video is the same one I posted earlier during the AAO explanation.)

Create a new game object inside the clothing Prefab and attach MergeSkinnedMesh. Add the objects of the meshes you want to merge into MergeSkinnedMesh.
Here, I will create an object called M_Outfit_Shirt (the name doesn't matter) and merge two meshes: Outfit_Badge and Outfit_Shirt_small.
In this case, I am only merging the meshes of the clothes worn via MA, but you can of course combine the avatar base and the meshes of the clothes worn via MA into one.

By the way, as I mentioned earlier, there is a theory that the load increases when a mesh with shape keys has a large number of vertices. In other words, meshes with many shape keys that move after uploading should not be merged. In terms of performance rank, the fewer meshes, the better, but I think this is one example where the performance rank does not correctly reflect the actual load. The official VRChat team says the same thing.

The face is usually the one with the most. It should contain a large number of shape keys (BlendShapes) for facial expression control. Therefore, basically it is better not to merge face meshes.
Recent avatars often have many shape keys for body adjustment on the body side as well, but you don't need to worry about shape keys that won't be moved after uploading because they are automatically removed by AAO's Trace And Optimize.

When you attach MergeSkinnedMesh, the Skinned Mesh Renderer component is also automatically attached. Here, you need to configure the Skinned Mesh Renderer yourself. Basically, you just need to transfer the values from the mesh before merging, but the three specific things to touch are Bounds, Anchor Override, and Root Bone.

However, when used in conjunction with MA, you do not need to set this manually. As long as you use the MA Mesh Settings explained earlier, it will be automatically overwritten by the MA Mesh Settings values, so the settings for the merged mesh can remain as they are. If you are using AAO alone, please configure it appropriately.

15. Optimization: PhysBone Merging

Similarly, we will also merge PhysBones. PhysBones that perform the same movement (where the contents of the Phys Bone Component are the same, except for the Root Transform) can be merged into one. To be precise, if they perform the same movement, you can create a parent bone and attach the Phys Bone Component to that parent bone to achieve the same movement with a single component. For example, skirts often have a Phys Bone Component attached to each of many bones, but if they all have the same settings, one PB Component is enough for all of them. Normally, you would grow bones in Blender or destroy the Prefab to create a GameObject, but if you use AAO, you can do this process in Unity without destroying the Prefab.
Note that a disadvantage of merging PBs is that one PB Component can only be grabbed at one time. For example, if you implement a skirt with one component, you will not be able to grab the skirt with both hands. You can lift and fix one skirt bone, and then lift and fix another skirt bone. You cannot do it at the same time. Based on those specifications, if there are no problems, let's actively merge them to reduce the PB load.

As an example, there were 11 PB Components attached to the hem of this shirt, but looking at the settings, there were 5 types, ShirtA, B, C, D, and E, each with common values, so you can see that the number of PBs can be reduced from 11 to 5.

So, let's do it. First, create an empty game object and attach Merge PhysBone from Add Component.

Next, insert the PB (and its GameObject) you want to integrate into the Components section. In this case, I am attaching SkirtA1_L and SkirtA1_R. This is basically all you need to do. If there are multiple PBs you want to integrate (there are 4 in total this time), prepare a new GameObject for each one and configure them in the same way.
Up to this point, the contents of the clothing Prefab look like this.
The items with white text and a plus icon are the GameObjects I added.
The top two are the merged Skinned Meshes, and the bottom four are the merged PhysBones.

16. Optimization: Checking Textures

Now, the optimization procedure using Avatar Optimizer is complete, but we will check the textures as well. Since texture size directly affects VRAM consumption (Texture Memory), you want to reduce it as much as possible.
Here, we will use a tool called lilAvatarUtils, created by lil of lilToon. If you have installed lilToon via VCC (VPM), you should be able to install this tool from VCC as well.
Selecting Window > _lil > AvatarUtils will display the screen below.

As you can probably tell from the screen, this is a tool that allows you to list and change all the textures used in your avatar, along with their resolutions and import settings. By adjusting the resolution and compression quality of 4K textures or textures that are unnecessarily high-resolution here, you can save on VRAM consumption (Texture Memory). Please refer to this article by lil for guidance on what settings you should actually use.

By the way, this lilAvatarUtils also has features to list the PhysBones being used and to check how the avatar looks under various lighting environments. I will omit them here, but they are all very useful, so please try using them.

17. Checking Performance Rank

Once you have finished the settings, play the scene and check the performance rank in the Actual Performance Window.
If it looks good, the optimization using Avatar Optimizer and lilAvatarUtils is complete. This time, it successfully reached Medium.

18. Creating Animations

From here on, we will create the animations we want to attach to the clothing side. For example, toggling a jacket on/off or changing colors by switching materials.
I have recorded the entire process for this as well. I am implementing a menu to toggle only the jacket inside the clothing.

It is a good idea to check the MA manual for how to create animations and menus.

Since we are creating things like toggles for parts of the clothing, we will create an FX layer controller. What you need is:

  • Animation Clip

  • Animator Controller (FX)

  • VRC Expression Menu

These three. After creating these, add the following to the clothing Prefab:

  • MA Merge Animator

  • MA Menu Installer

  • MA Parameters

Attach and configure these three components.
There are two types of paths for creating animator controllers to be merged by MA: relative paths and absolute paths. As a rule of thumb, use relative paths for animations that only operate within that Prefab, and use absolute paths when you need to operate outside the Prefab, such as on the base avatar. If you want to use both, create them separately and integrate the two controllers.
A typical pattern for wanting to manipulate things outside the Prefab is when using shape keys to prevent clipping on the base body.

First, create an animation file. It is easier to create just the on or off state, then duplicate it and change only the values. For relative paths, you can record the animation by dragging and dropping the created animation clip onto the clothing Prefab.
Note here that if you are using AAO to merge PhysBones, the PB that should be toggled on/off along with the clothing mesh is the one on the merged GameObject.

Once the animation clip is ready, you will create the animation transitions. Here, we will use a tool called AnimEditUtility created by whiteflaresan. The link is here:

https://scrapbox.io/FlaresWorkspace/Unity%2FVRChat%E6%8A%80%E8%A1%93%E3%83%A1%E3%83%A2%E3%81%BE%E3%81%A8%E3%82%81

If you understand how animations work, this is a very convenient tool.
The VPM repository is here.

https://github.com/whiteflare/vpm-repos

Simply input the controller you want to add the animation to, the animation clip, the Expression Menu where you want to register the item, and the Expression Parameter, then press the button. It will handle everything at once: registering the parameter, creating the state transitions, creating the Expression Menu, and adding the Expression Parameter.

Once the animation is ready, attach and configure the MA components to the clothing Prefab. In Merge Animator, specify the animator controller you want to merge, and set the layer and path type. In Menu Installer, open Developer Options and specify the menu you want to install.
Parameters will automatically list the variables being used, so specify the variable type, whether it is saved, the initial value, etc.

Note that while I used VRChat menu files here, the object-type menus added to MA (MA Menu Group, MA Menu Item) are recommended because they offer more benefits.

19. Operation Check

Once you have done this, perform an operation check. Play the scene, operate the Expression Menu with Gesture Manager, and confirm that the animation works correctly. Gesture Manager is included in the VCC (VPM) Curated repository, so you can add it to your project from VCC without needing to add the repository yourself.

20. Creating a Prefab Variant

With this, the clothing setup is complete. Since the clothing GameObject is still the fbx file with the cardboard box icon, save this as the finished version. Drag and drop it anywhere in your Asset folder and select Prefab Variant. Be careful not to select Original Prefab here, as you will no longer be able to reflect updates to the fbx.

21. Upload

Upload it. That is all. I usually check for clipping in MMD worlds. If you find any areas that need fixing, go back to Blender and fix them. Since the Unity-side setup is already done, you should be able to reflect the fixes immediately by exporting the fbx and re-uploading it in Unity.

Supplementary Note

Uses for variants

Regarding how to utilize Prefab Variants, one example is creating color variations for clothing. By taking a variant set up using the previous steps and saving a version with only the materials changed as a new variant, you can easily create many color variations.

Turning accessories and gimmicks into prefabs

This time I only dressed the avatar, but you can also use MA to introduce things like unskinned accessories or heartbeats by using MA's Bone Proxy. If you save them as a Prefab with the Bone Proxy attached, you can easily reuse them later just by placing them directly under the avatar.

Creating your own modules

If you understand animation, you should be able to create MA-compatible modules for accessories and gimmicks that aren't natively supported. For example, I use a gimmick called Vsui Supporter that darkens the screen for V-sleeping, but if I turn that into a Prefab, I can introduce it easily at any time. Furthermore, if you include that Prefab in a unitypackage, you can introduce it to avatars in other projects with a single touch. It takes a little effort, but I think it's worth trying.
For turning existing gimmicks into MA-compatible Prefabs, this article by Mimii-san is a good reference.

To lower your performance rank

I have always been quite conscious of performance rank, but basically, I think in terms of one outfit per avatar, aiming for Medium. The reason for one outfit per avatar is the benefit of keeping the Expression Menu from becoming complex, as well as considerations for performance rank and Quest compatibility. Since having multiple outfits on one avatar isn't realistic for Quest, if you want to make each outfit Quest-compatible, they inevitably become separate avatars.
For PC, even Poor is currently considered sufficiently lightweight, but setting it to Medium changes the icon color from red to orange, which is nice because you can tell at a glance. It's just self-satisfaction, though. That said, if the clothes with the most PB counts or the avatar's hair are heavy, Medium is often difficult. However, frankly, the most difficult thing is overwhelmingly the polygon count. 70,000 is tough. (And Cloth. 200 vertices for Very Poor? Are you serious, VRChat???) Reducing polygons is quite a pain, so I'll just reduce them appropriately if it's around 80,000, but rich clothes that total over 100,000 are tough...
This is also related to my principle of not deleting the base body inside the clothes. If you delete the base body, the range of what you can handle might be quite wide. If you want to delete the base body, this can also be achieved non-destructively using AAO components like Remove Mesh In Box or Remove Mesh By BlendShape.
I know many people are aware from experience that polygon count isn't that much of a load, but it feels clearly stricter than other requirements. Moreover, once you exceed 70,000, you are skipped from Good all the way to Very Poor. Why...
However, actual load is more important than performance rank, so if you were to become Very Poor due to exceeding the polygon count, it is still very meaningful to lower the load by merging meshes, merging Physbones, or appropriately turning Physbones on and off with animations. Let's do it.

Summary

I've written at length, but I hope this has been helpful. As some of you may have noticed, it is a fact that the setup process increases slightly when aligning with Modular Avatar. If you don't care about non-destructive workflows, the previous methods will likely be faster. However, I feel there are greater benefits, such as flexibility for corrections and changes, better visibility of the entire project, and ease of reuse. Modular Avatar is great. Avatar Optimizer is great.

Reference links

The avatars and clothes used in this article are here.

同じカテゴリの記事

篠原 沙世

アニメとゲームの新作情報を担当。制作会社・配信元の公式告知と登壇情報を照合して記事化します。

おすすめの関連記事