1. Create VRM from Humanoid 3D Models

Base model (fbx) import, bone mapping, T-Pose, license setup
Created August 25, 2020 Last modified April 2, 2021 updated contents (218ff965)

After the UniVRM package is installed successfully, we can start converting the humanoid 3D model to VRM.

Prepare a 3D model that can be handled as “Humanoid” in Unity

First prepare a 3D model made by your own or allowed to be modified for use as VR avatar. As there are license settings embedded in VRM file, users need to set them up according to Author’s (yourself or others) permission usage.

Then, ensure the required bones are included so that the model can be recognized as Humanoid.

Import a FBX model into Unity

Here we use Alicia Solid as an example. First, Drag and drop the FBX folder into the Assets folder:


In the Project window, click blue icon (Alicia_Solid_Unity), which is fbx’s asset (prefab):

FBX’s Material Setup


As shown in the image above, by default FBX’s materials are set as Standard shader with default parameters. For the demonstration of VRM conversion under the minimum material setup, we set the material’s Shader to MToon and Color to white.

Create a folder (e.g. name the folder as Materials) in FBX folder (/Assets/FBX/Materials). In FBX’s Inspector window, click Materials -> Extract Materials and save extracted materials into Materials folder. If the reference for each material has been assigned in On Demand Remap section, skip this step. Another way to set up materials is by setting Location as Use External Materials (Legacy). Here we only focus on the former one.

extract_materials

The result should look like this:

material_folder

Next, select all materials and set Shader to VRM -> MToon:

change_to_mtoon

Change Shade Color to white:

shade_color_to_white

For more details about how to set up MToon shader, refer to MToon settings.

Humanoid Setup

Originally the Animation Type for FBX is generic. Now we need to set it to Humanoid.


Change to Humanoid and click Apply button:

humanoid_apply

Next, click Configure button to configure your model. A message box will pop up asking whether you want to save the current scene. Click Save to save it.

SetModelAsHumanoid

Now you will see the bone mapping details for this model. Unity will perform auto-mapping for each bone initially. You can check the model’s Body, Head, etc. if an assigned component fits, the leftmost icon will show as green, otherwise it will show as red. In this situation, click rightmost icon for a bone that has the failure bone mapping and select a component you think it fits this bone. To re-map the bones automatically, simply click Mapping in the lowerleft of the interface, click clear and then click Automap.

BoneMapping

BoneAssignment

However, in some cases the bone mapping results are not reasonable even all of them appear as green as shown in the figure below:


We can see the Jaw and Eyes are assigned by the wrong components. As mentioned above, we can fix them by assigning the right corresponding components manually (e.g. eye_light_L will be replaced with eye_L). If the bone mappings are all right, click Done button to proceed to the next step.

Put Prefab into the Scene

Drag the prefab from the Project window to the Hierarchy window.

DragImported3DModel

Now click the model in the Hierarchy window and check its position, rotation and scale:

initial_position_rotation
  • Model Position
    • The model should be placed at the origin
  • Model Pose
    • The model should face towards +Z(axis) direction
  • Model Scale
    • 1.0 = 1m

Check FBX’s BlendShape Normal

Check whether the imported fbx has the correct BlendShape normals. The details can be found here.

Export the model as VRM from menu

Select the model GameObject in Hierarchy window and export it from VRM0 -> Export UniVRM-0.XX.

vrm_menu

Previous versions: VRM -> UniVRM-0.XX -> Export humanoid.

UniVRMExportHumanoid

Export dialog:

export_dialog_title_version_author_en

Fill out required fields to resolve error messages displayed on the dialog. Also, don’t forget to enter license information about this model. If all red messages are gone, click Export button to export the model. To easily track this file, it is recommended to name the file like this: “Model_Name_Normalized.vrm”. The file can be saved inside/outside the Assets folder. If the file is saved inside the Assets folder, its prefab file will be automatically generated.

Export Options


If the model is not in T-Pose, click Make T-Pose to make one.

Related sections about UniVRM export:

In the next section, we will introduce how to import and set up VRM file first time.

Online Resources


VRM - humanoid 3d avatar format for VR