1. Create VRM from Humanoid 3D Models
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
Base VRM ModelThe conditions for creating a VRM model can be found here
Import a FBX model into Unity
Here we use Alicia Solid as an example.
First, Drag and drop the FBX folder into the
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
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
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
Use External Materials (Legacy). Here we only focus on the former one.
The result should look like this:
Next, select all materials and set
Shade Color to white:
For more details about how to set up
MToon shader, refer to MToon settings.
Animation Type for FBX is
generic. Now we need to set it to
Humanoid and 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.
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
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.
Now click the model in the Hierarchy window and check its position, rotation and scale:
- 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 -> UniVRM-0.XX -> Export humanoid.
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.
Before exporting as VRM, validation checks on each component in the model will be conducted:
- The error messages (red) need to be resolved
- The warning messages (yellow) can be ignored if you want to export VRM straight away
For example, if ExportRoot is not valid, the error messages will be displayed on the dialog. See Conditions for Valid ExportRoot for more information.
If the model is not in T-Pose, click
Make T-Pose to make one.
Pose Freezeis for model normalization during export. The exporter will automatically check whether the export target needs to be normalized. For instance, in Hierarchy if a mesh’s rotation or scale is not Default (first VRM export), the model normalization needs to be performed.
Related sections about UniVRM export:
In the next section, we will introduce how to import and set up VRM file first time.