ホーム 暮らし [VRChat] Avatar Modification with Unity Part 1: Preparation and Tips for Changing Outfits

[VRChat] Avatar Modification with Unity Part 1: Preparation and Tips for Changing Outfits

八木 麻衣 八木 麻衣 • 更新: • 公開: • 読了約 48 分
目次

Introduction

nf3d418e0792d

This is written as part of a series.
This time, the topic is changing avatar outfits, but you can find a lot of information about changing outfits by searching on the internet.

Therefore, I have decided to summarize the points I am careful about, rather than providing detailed instructions on the modification part of putting on an outfit.
If you want to know more about how to put on outfits, or how to add gimmicks or particles, please refer to articles by other people.

Also, the content is intended for those who have some experience with modifications.

Note that the version of Unity used in this article is
2022.3.22f1 (the latest version as of May 2024).
The language used is English.
The OS is Windows 11.

I hope this article is helpful to you, even if just a little.

Things I do before working in Unity

Unity is quite demanding on the PC (my PC is not very powerful...), and I have had experiences in the past where errors occurred when loading or uploading avatar data, possibly due to data in the Temp folder, and those errors were resolved after deleting and clearing them.

Since then, I have made it a habit to empty the trash and then restart the computer to clear out any unnecessary information remaining in memory or cache before starting work.
(
Revised 2024.05.30)

Project packages and tools I use

I use ALCOM.

The tool officially recommended by VRChat is VCC (VRChat Creator Companion), but anatawa12 has developed and distributed a tool called "ALCOM".
ALCOM (anatawa12.com)

It is an alternative tool to VCC, but it runs faster than VCC, allows for batch updates of packages, and is very convenient because it is displayed in Japanese.

However, it seems it won't work without VCC installed (as of May 2024), so you need to keep VCC installed (do not uninstall it).
In fact, it is better to install ALCOM after setting up an environment where you can work with VCC.
I will omit the installation method for VCC here.
How this will change in the future depends on information from the author.

Use VCC versions of tools whenever possible

Project packages and tools are sold or distributed on sites like Booth or GitHub, but if both a "unitypackage version" and a "VCC version" are available, you should apply the "VCC version".

By doing this, you can always use the latest version of that package.
It is also possible to downgrade, so if any issues arise with the latest version, you can revert to a previous version.
However, if you try to apply a version that is too old, you will get a warning that it only supports older versions of Unity.

If you use the unitypackage version, it is a bit troublesome because you have to manually check if the package or tool is the latest version and perform subsequent switching (upgrading/downgrading).
With the VCC version, you can select the version you want to apply from a dropdown menu on the package selection screen.

Also, some creators seem to prioritize updating the VCC version and only update the unitypackage version during major updates.
In that sense, I think it is better to apply the VCC version unless the creator specifically recommends the unitypackage version.

Packages and tools I commonly apply

I install packages and tools according to the modification content, but the following are the packages I currently have installed in common.
I add packages and tools to this depending on the modification content.
This includes packages that are not used in this series of articles.

Since they are all well-known, I will omit the installation methods.
You should be able to find them by searching for things like "modular avatar vcc".

  • Avatars 3.0 Manager

  • Gesture Manager

  • Modular Avatar

  • Non-Destructive Modular Framework

  • lilToon

  • lilAvatarUtils

  • AAO: AvatarOptimizer

  • anatawa12's gists pack

  • FaceEmo

  • LightLimitChanger

  • TexTransTool

  • Floor Adjuster

  • Module Creator

The above are VCC versions, but I also have the unityproject versions of the tools installed as well.
I will also include the Booth links for these.

  • MeshDeleterWithTexture
    MeshDeleterWithTexture beta - GatoChocola's Shop - BOOTH
    *This tool is getting a bit old, so you can do the same thing with "Remove Mesh by Mask" in AAO, which might be better to use instead.


  • NDMF conversion tool for Mantis LOD Editor
    [Free][Non-destructive polygon reduction] NDMF conversion tool for Mantis LOD Editor - Hitsubu's Warehouse - BOOTH
    *You need to install "Mantis LOD Editor" from the Unity Asset Store.

  • "ErrorChecker" - A collection of gymnastics animations perfect for checking
    [Free Motion] "ErrorChecker" - A collection of gymnastics animations perfect for checking [VRC/Modification/For Games] - V WORLD - BOOTH

  • VRC Avatar/World Scale
    https://booth.pm/ja/items/2638525

Introduction to the Unity workspace layout

Here, I'd like to introduce the window layout I usually use when working in Unity.
You are welcome to use any layout you prefer, so feel free to skip this.

The default is fine, but I have changed my layout as shown below to make it easier (in my opinion) to repeat the process of checking with the VRChat SDK and moving target outfits, etc., from [Hierarchy] to [Inspector] as I work.


I might change it again as I learn more, but this is how it looks for now.
(2024.05.30) Updated the window layout.

The features are:
 ・I wanted [Inspector] and [Hierarchy] to be next to each other
 ・I wanted to be able to see [Inspector], [Hierarchy], [VRChat SDK], and [Console] all at once
  (so I can operate while looking at them)
 ・I lined up the Scene and Game tabs (Updated 2024.05.30)
That's about it.
I have arranged them with the idea of having the left side of the screen for operation systems and the right side for parameter checking systems.

Avatar modification

The introduction was long, but I will finally start writing about modification.
As I mentioned at the beginning, I would like to write about some simple precautions and tips that I keep in mind when dressing an avatar.

The avatar I will use this time is this one.

The outfit is here

Points to note before dressing an avatar ~Prefab Variant~

It is said that you should not use the avatar's Prefab data as is, but rather do it using a created Prefab Variant.

If you create a new project every time, this might not be necessary, but if you are modifying a project you have already created, or if you are managing multiple avatars in one project, creating a Prefab Variant might reduce accidents.

I will omit the details, but the two main benefits I see in this method are preventing all your adjustments from being reset to default when you update the avatar version, and being able to see what you have changed by comparing it with the original Prefab.

You can find various materials on this by searching for "Avatar modification prefab variant" or "Avatar management prefab variant".

Creating a Prefab Variant of the base avatar

I create what I call a base project, and I modify copies of that.

A base project is a project I created after doing some preliminary work (such as hiding the default clothing, setting up gesture and expression links, etc.) so that I don't have to start from scratch every time I want to change the outfit of an avatar I'm modifying.

Instead of using the avatar data purchased from Booth as-is, I use the avatar data after it has been prepared as a Prefab Variant.

The process is very simple: after finishing the preparation, just drag and drop the avatar root into the Assets folder.
Then, if you back up the resulting Prefab Variant, you can import the prepared Prefab data into other projects.

Putting on an outfit

VRChat (or maybe VCC?) officially states that the principle is "one avatar per project".

For those who own multiple avatars, I think it's easier to understand if you separate avatars by project. However, if you save multiple modified avatars in one project, the project file size will become very large, which can make operations sluggish, take longer to upload, or in the worst case, cause Unity to crash due to errors.

Therefore, try to keep it to about three avatars per project at most. It would be nice if VCC supported folder hierarchies...

Now, it's finally time to put the outfit on the avatar. If the outfit is compatible with the avatar and supports MA, thanks to the god-tier tool Modular Avatar (MA), you can finish by just dragging and dropping the Prefab data onto the avatar root.
Lime-chan has a prefab for changing outfits prepared in advance, but for self-censorship reasons, I am using the one wearing clothes in the diagram.

Since you are in a state where you are wearing both the original outfit and the outfit you want to change into, you set the original outfit to hidden (disabled) and proceed with operation checks and so on.

I will write down two points for when you put on an outfit and some precautions when hiding (disabling) items.

Points for putting on an outfit ① ~About Unpacking~

There is one point I want you to keep in mind.
That is, "avoid Unpacking as much as possible".

As you can see in the diagram above, an avatar tree that has not been unpacked is written in blue text in its default state (unpacked avatar trees are displayed in white text).

Why is it better not to Unpack? Doesn't the name Prefab sound familiar? It's a term often heard with houses and apartments, but in short, it means "something where a single structure is packaged."

The biggest advantage of keeping it as a Prefab is its "reversibility"in other words, if you think "never mind" or "which one of these looks better?", you cannot revert it if you have already unpacked it.

Also, Unpacking is like untying the connections of a structure; in other words, it is like taking a state where things are tied together with rope (Prefab) and cutting those strings (Unpack).
If you want to revert this, you have to tie it up with rope again.
If it is a structure made of two pieces of wood, it is easy to re-tie, but if it were something like a log cabin, you would have to rebuild it from scratch to restore it, which is a lot of hard work.

To summarize briefly, the effects of Unpacking are:
・You can no longer revert to the original Prefab
・You won't know what you changed
・Updating the avatar becomes difficult
That is what it boils down to.

However, if you are using an outfit that requires Unpacking, or if you need to Unpack to do what you want to do, I think it is better to proceed as follows:
・Unpack at the very end
・Make it a Prefab after modification
*Prefab creation is introduced above
That is the feeling you should aim for.

Tips for putting on outfits ② ~How to put on non-MA compatible outfits~

As mentioned above, if it is an MA-compatible outfit, you are done with drag-and-drop, but I will write down the steps for non-MA compatible outfits.

The outfit this time is also a non-MA compatible one.
The procedure for putting this outfit on in Unity is as follows:
① Hide the original outfit or any outfit that will be completely covered
(There are some points to note, which I will describe later)
② Check if the clothes you want to put on are worn properly (check for clipping)
As for countermeasures, there are the following:
・Select the root of the outfit and adjust it in the Transform section
・Adjust the Body shape keys so that it can be worn cleanly
③ Select the root of the outfit, right-click, and select "Modular Avatar" → "Setup Outfit"
When you perform this operation, "MA Mesh Settings" will be added to the "Inspector" section.
④ Operation check

Some outfits may cause errors with MA's Setup Outfit. In that case, you will have to use a tool like "Kisetene" or Unpack it and try to put it on yourself.
After you have successfully put it on, make sure to turn it into a Prefab.

Notes on hiding

In the figure above, there is text that has become a slightly darker blue; this is the part that is hidden.
I will explain using the blouse as an example.

The point to note is thatsimply unchecking the parts you want to hide is not enoughThat is fine if you just want to check, but please perform these three tasks before hiding it and updating it to VRChat.
①
Uncheck the parts you want to hide (outfit parts) ②
Change the "Tag" below the checkbox from "Untagged" to "EditorOnly" ③
If there are items like "Skinned Mesh Renderer" or "VRC Phys Bone", click the three vertical dots on the right side of that item and select "Remove Component"
to do so

Please be especially careful with ②.
If you upload to VRChat and check, and find that the outfit you were supposed to have hidden remains, there are cases where setting it to "EditorOnly" in ② and re-uploading will fix it.

Conversely, if the outfit you want to wear is set to "EditorOnly" after considering turning the outfit ON/OFF, it will be in a state of not being worn when uploaded to VRChat, so please check if it is worn properly along with the operation check in ④ before uploading.

Regarding ③, it will be automatically disabled by the weight reduction work described later, but it won't hurt to do it anyway.

Matching the brightness of hair and face with the outfit ~Anchor Override settings~

I sometimes do this too, but there are times when the brightness of the hair, face, and outfit do not match.

There are various ways to do this, but for now, let's match the Anchor Override with the hair and face.

① First, select "Body (face)" from the "Hierarchy", and pay attention to the "Anchor Override" section in the "Skinned Mesh Renderer" field displayed in the "Inspector"
② Match the "Anchor Override" on the outfit side to the one set for the face confirmed in ①
③ Just to be safe, check areas visible to others, such as hair

Besides this method, there is also a way to adjust it using shaders (materials).
Some advanced Unity users even add this to their EX menu to adjust it within VRChat.

Alternatively, you can use LightLimitChanger to adjust it from the EX menu inside VRChat. Adjusting with LightLimitChanger will keep the brightness of the entire avatar consistent.

If your clothes disappear after taking a photo

It happens occasionally, but sometimes clothes disappear, such as items placed in a world or outfits belonging to other people.

This might be fixed by setting the "Render Queue" in the "Basic Settings" of the material.

To explain it simply with an image, it's like setting the display order based on a numerical value.
If you have experience using drawing apps (Illustrator, Clip Studio Paint, etc.) or photo editing apps (Photoshop, GIMP, etc.), it might be easier to think of it in terms of layers.

However, please be careful, as setting it to an unnecessarily large or small value can cause the outfit to display incorrectly or lead to unexpected accidents, such as making your friend's outfit disappear.

Since the values to set differ depending on the shader, if a problem occurs, please try searching for terms like "avatar render queue".

Operation Check

Select "Tools" from the Unity menu and click "Gesture Manager Emulator" to add it to the Hierarchy.

This is a package tool that allows you to check the EX menu and confirm facial expressions set to hand gestures while in Play Mode.

You can think of Play Mode as a mode that allows you to simulate how things will appear inside VRChat.

Next, to check for clipping or swaying when the avatar moves, we will add an animation for motion checking.
You can check manually if you prefer, but since it is free, let's use it gratefully (if you feel hesitant, consider the "Support Version").

As written above, we will use this one this time.

When you "Import Package" this, a folder named "V World" will be created in your Project, and you will use the animation files inside it.

With "GestureManager" selected in the Hierarchy, press the Play button.

Once you enter play mode, check the "Console" to see if there are any errors.
If the avatar is not displayed, adjust the camera or click on "Scene" to make the avatar appear.

I check movements in the "Scene" view, as I am used to it.
You can use either "Game" or "Scene," whichever you find easier to check.
(Updated 2024.05.30)
My screen layout has "Scene" and "Game" side-by-side, so I move the avatar in "Scene" and check things like hair and skirt swaying in "Game".

Let's check if the clothing is worn correctly, test the hand gestures, verify the Expression menu, and check the swaying when moving the avatar.

Once you have finished checking everything and there are no issues, select "Tools" from the menu under "Controlling Avatar:" in the "Gesture Manager (Script)" of the "Inspector".
Place the ErrorChecker animation file you imported earlier into the box under "You can preview ~" in "Tools".

Press "Play" next to the animation file, and the avatar will start moving (it will auto-repeat until you stop playback), so check for any issues while changing your viewpoint.

There are other animations available for purchase on Booth that can be used for testing, so use your favorite animation file (if you are skilled, you can even make your own!) to check the movement, clothing fit, and swaying.

This is an example of checking the movement from the front. For actual checks, I also move the viewpoint (camera) around to check from the back.

A useful tool for combining multiple outfits (outfit chimera) ~Module Creator~

When changing outfits, I would like to introduce a tool called "Module Creator" which is useful when you only want to use a specific part of an outfit.

The outfits we will combine this time are as follows:

ALICE's EverAfter as the base, and we will have her wear the shoes (+ socks) from silica gel's JK Uniform.

First, put on both outfits normally and check the state after combining them by toggling visibility on and off.

Select the shoe parts of the JK Uniform, right-click, and select "Module Creator" -> "Create Module".

Then, only the selected parts will be extracted, so drag and drop this into the avatar root.

Once it is integrated into the avatar, right-click the part and select "Modular Avatar" → "Setup Outfit" to put it on.

Since the extracted part is an independent Prefab data, set the original JK Uniform to hidden (inactive).

If the Hierarchy is hard to read, there is no problem with deleting the original outfit data from the Hierarchy (do not delete it from the Assets).

In this way, when you want to combine parts of multiple outfits, using Module Creator allows you to dress the avatar with the minimum necessary combination of Prefab data, keeping the Armature from becoming cluttered.
Also, since the names of the extracted parts can be changed, it is a good idea to rename them to something easier for you to understand.

Continued in [VRChat] Avatar Modification with Unity Part 2: Optimization


同じカテゴリの記事

八木 麻衣
トレンドリサーチャー 八木 麻衣
プロフィールを見る →

全記事の事実確認を担当。一次情報・公式発表・公開資料の三点を確認できない場合は公開を見送る判断をします。

おすすめの関連記事