1 Create VRM from Humanoid 3D¶

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.

BaseModel

使用可能なベースモデルの詳細は、 BaseModel を参照してください。

required bones

Import a FBX model into Unity¶

Drag and drop the FBX folder into the Assets folder

../../_images/fbx_folder.jpg

unity

../../_images/assets_fbx.jpg

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

FBX’s Material Setup¶

../../_images/fbx_default.jpg

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.

Shader

VRM supports three types of shaders: MToon, Unlit and Standard

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.

../../_images/extract_materials1.jpg

extract_materials¶

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

../../_images/change_to_mtoon.jpg

change_to_mtoon¶

Change Shade Color to white:

../../_images/shade_color_to_white.jpg

shade_color_to_white¶

../../_images/alicia_preview.jpg

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.

../../_images/rig_generic.jpg

Change to Humanoid

../../_images/select_humanoid.jpg

and click Apply button:

humanoid

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.

../../_images/BoneMapping.png

BoneMapping¶

ボーンの割り当てを確認してください。

bone

  • 前髪に顎ボーンが割り当てられる

  • 目のハイライトに目ボーンが割り当てられる

などにご注意ください。

Put Prefab into the Scene¶

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

../../_images/DragImportedModel.png

fbx の blendshpae の法線が乱れていないか確認する¶

BlendShapeで変な影が出る場合の対策です。

BlendShape の法線を確認しよう

Export the model as VRM from menu¶

../../_images/vrm_menu.jpg

vrm_menu¶

VRM0 - Export UniVRM-0.XX を押してダイアログを表示します。

../../_images/UniVRMExportHumanoid.jpg

UniVRMExportHumanoid¶

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

../../_images/export058_empty.jpg

Export Root に prefab をシーンに展開した GameObject をドロップします。

Error

エクスポートダイアログで各種エラーチェックをしています。

  • The error messages (red) need to be resolved

  • The warning messages (yellow) can be ignored if you want to export VRM straight away

エクスポートダイアログ

../../_images/export_dialog_title_version_author.jpg

ライセンス情報を入力してください。赤いメッセージな無くなれば Export を押せます。 次の作業のため、Assets/models/vrm フォルダを作成してそこにエクスポートしました。

エクスポート先

エクスポート先には、Unity の Assets 内、外どちらでも選択できます。 Assets 内を選択すると、Export 直後に Import が発動します(Importの方が重い)。 Assets 内を選択する場合は、新規に専用のフォルダを作成すると分かりやすくなります。

Export Options¶

../../_images/export_options.jpg

Pose Freeze

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

Pose Freeze

Pose Freeze is for model normalization during export. The exporter will automatically check whether the export target needs to be normalized