Method for Switching Model Parts

There are different ways of switching clothes and poses for the model.
This is mainly done by changing the display options.
We are going to view each method of switching and how to do it.

We usually use the .moc file switching method to switch the clothes and the alpha value method to switch arm poses, but it is possible combine them.

If it is for avatar use, use the avatar method to switch clothes or face expressions.
To switch the posing of arms, you can combine the avatar method with the part alpha method.

.Moc File Switching Method

This is a simple method to switch the model data (Texture data) to change the models.
This method is usually used to change the model's clothing.

When Creating Model
If you intend to create a model to switch the clothes, each part of clothes has a lot of elements in common, and you can create it in one model data. In this case, you can share the Motion Parameters or each ID which makes the following procedure easier.
Export them separately by switching the display.

When Creating Motion
It is possible to share the animation of one model to another if you shared the same Motion Parameter when modeling.

When Using Model in Application
Reload the model data as well as the Texture data as needed when switching.

・The structure is simple.
・You can use the data only when needed, as the data is separated.

・There will be some load time when switching.
・If there are many models, it may be difficult to manage.

The Alpha Value Method (Controlled Through Code)

This is a method to change the model's clothes or arm pose by switching the display that is managed by ID.
It controls the fading in and out with the program.

This method is usually used to switch the model's arm poses.

The reference part is connected with other part to transform for reducing the operation when creating motions.
The model which consists of the reference part only is used when creating motions. Thus you can handle a small size model data when creating motions.
Set the key only for the display/hide of the reference part in the Animation tool.
When mounting it to the program, you only rewrite the setting file to transform not only the reference part but also other parts accordingly.

When Creating Model 
Create the part that you want to switch with a different ID.
To facilitate this procedure, it is suggested for these parts to follow some sort of naming convention. (i.e. two different sets of arms will be P.ARM1 and P.ARM2).
Remember that all the data will be included when exporting a model.
You must either export the file with all parts displayed or check "Export Hidden Part" under export settings when exporting.

When Creating Motion
You only set the key of which part is displayed for the first frame of the motion.

When Using Model in Application
Mount it using the L2DPose class which is included in the sample.
You need to load and update the setting file.
Other tasks are the same as when playing the motion.

・It seems natural when switching the parts.
・The data size is small, since you do not need the model with full data when setting an animation.
・All you need is to set the key for the reference part when setting an animation, so the operation will be easier when there are a lot of parts.

・It will be complicated if you have decided the settings for the reference part.  
・You need to know the structure of sample framework as well as Live2D library when mounting the program.
・The data size does not change, so it may not be suitable for the large size polygons.

The Motion Parameter Method

This is a method to change the transparency of the polygon by setting a key to the Motion Parameter.
It is easy to create, however it is difficult to use in an application.

This method is usually used for adding small details to the model in an application.

When Creating Model
It is basically the same as to set a Motion Parameter by deforming polygons.

Create a Motion Parameter and set keys for displaying and for hiding.
Change the value of opacity in "Color Settings" - make it 0% when hiding, and make it 100% when displaying.
Change the value of Motion Parameter and check if the display is switched over, the setting is complete.

When Creating Motion
It can be treated same as the normal Motion Parameter.

When Using Model in Application
You can mount it only by playing the normal motion (.mtn file).
Or you can change the code directly with "setParamFloat" same as the normal Motion Parameter.

・Setting is easy. All you need is to set the transparency when creating a model, and no operation is needed when creating an animation and mounting the program.

・The Motion Parameters by deforming polygons will be increased, so it may not be suitable for polygons which deform in a complicated way.
・The data size does not change, so it may not be suitable for the large size polygons.

The Texture Method

This is a method to switch the Textures only.
It is applicable if the structural arrangements like patterns or colors do not change, however it may be suitable for a complicated shape.

When Creating Model
It is not supported to change the Texture after mounting it on the tool.
It is used only for checking the placement.

When Using Model in Application
After loading the model data, switching the Textures by the order of Texture setting.

・It is easy to change the color.

・You can use it only for some purposes.

The Alpha Value Method (Controlled by Animator Tool)

This is a method to switch the clothes or arm posing by switching the part display which is managed by each ID, and you do not use the Motion Parameter.
You can reduce the load on the program by controlling of switching in the Live2D Animator tool.

Please be advised that there are restrictions when creating a motion.

When Creating Model
Same as of the part alpha method (control the program).

When Creating Motion
You can switch the display at any timing by setting a key like in the normal Motion Parameter.
Functions like fading in or out on the Motion Parameter does not exist in the library, so you need to set them in the Animator tool.
You can see the explanation about the automatic fading in or out in the section about the program control later.
If you repeat to switch the motion from folding arms to putting down arms, it will become unnatural.
So you need to acquire what is displayed exactly.

When Using Model in Application
You can play it same as of the motion by changing a little.

・You can make settings quite easily. (It does not mean that it looks natural.)

・You need to know what is displayed to switch the parts naturally.
・The data size does not change, so it may not be suitable for the large size polygons.

The Avatar Method (Standard)

A special license is needed for avatar use. Please contact Live2D directly for more details.

This is a method to display a model by combining parts dynamically.
It displays a model in the combination of not only normal model data (.moc) but also parts data (.bkparts) on the program.
You need to entrust Live2D Inc. with the rules of managing the data or the programming techniques that are important with this method.

When creating a model
Though it is not necessary for creating a part, there is a basic rule. You need to separate exporting a part and exporting a moc file.

When creating a motion
A part cannot be loaded in the Animator tool, so a model in a default condition is exported as a moc file.

When mounting
We are preparing a document now.

・The combinations of models will vary.
・You can use data in need only.

・It costs more to create a model or install than other methods.

The Avatar Method (Customized)

This is a method to display a model by combining parts dynamically.
This method is to decide the rules of operating data or about the program by the developer.
We can support you about creating data with the tool, and you are to decide how you use it.

If you are the beginner of Live2D avatar, it is recommended to choose the standard method.