Ask Sawal

Discussion Forum
Notification Icon1
Write Answer Icon
Add Question Icon

How to open vrm in unity?

4 Answer(s) Available
Answer # 1 #

The standard implementation of 3D Avatar file format VRM for Unity.

VRM is an extension of glTF 2.0, so this library also support glTF 2.0 files.

UniVRM supports the VRM 1.0 specification and the glTF 2.0 specification.

UniVRM can import/export following supported file types at both runtime and editor.

The latest UniVRM supports Unity 2020.3 LTS or later.

UniVRM supports scripting backends both .NET and IL2CPP.

UniVRM supports the following building target platforms:

The other platforms maybe work but they are not tested.

Latest Release Version (supports Unity 2020.3 LTS or later)

You can install UniVRM using the UnityPackage or the UPM Package.

From the latest release, you can download the .unitypackage files.

From the latest release, you can find UPM package urls.

You can install these UPM packages via Package Manager -> + -> Add package from git URL... in UnityEditor.

[5]
Edit
Query
Report
Sabita Virkud
ASSEMBLY TECHNICIAN
Answer # 2 #

Hey and welcome!

Got a bit of an interesting one for you here today. I’ll be going about showing you how to import a model from VRoid into Unity and as a bonus I’ll also show you how to use animations from Mixamo with your 3D model.

There’s a lot that can go wrong here so I’ll try and keep this all concise, here’s a quick breakdown of the steps involved here:

[5]
Edit
Query
Report
Sajid Sharda
Scenographer
Answer # 3 #

We will convert FBX into VRM with Unity. If you would like to upload the file to STYLY, please open it with Unity version Unity 2019.4.x, 2019.3.x.Please check the STYLY Document page for the latest Unity versions that STYLY supports.

Begin by opening Unity, and import UniVRM to use VRM file in Unity.Download the latest .unitypackage from the following site.

https://github.com/vrm-c/UniVRM/releases

Open this URL. The screen shown below will appear. The one highlighted in the red box will do; basically, download the latest version.

After downloading it, open a new project with Unity.

Double-click the UniVRM’s unitypackage file downloaded earlier to bring up the following window on Unity’s screen. Press ‘All’ and then ‘Import’.

Now you can use VRM files in Unity!

Import the FBX model that you want to translate into VRM to Unity.

You can import the file by dragging it onto the Assets folder in the Project window.

Select the imported model and press the ‘Rig’ tab in the Inspector window. Then, set ‘Animation Type’ to Humanoid and click ‘Apply’.

The ‘Configure…’ button above it will be enabled. Click it to open another Scene.

In this Scene, we will check the bones. The problematic bones are shown in red, so if you don’t have any ‘red’ bones, go back to the original Scene by clicking ‘Done’ at the bottom.

If you have the red ones you need to correct them. Some errors could be caused by incorrect automatic identification when importing FBX.

In this bone-setting window, the essential bones are shown with the ‘solid’ circle that is highlighted in the red box below. The ‘dotted’ circle highlighted in the blue box means that the specified bone is non-essential.

These markers could be helpful when looking into the errors.

In the case shown here, ‘Spine1’ set as Spine seems to be problematic.

To fix it, we set the ‘Spine2’ bone as Spine, which was originally assigned to Chest that is not an essential bone. However, this kind of correction could cause a problem, for example, when uploading the model to VRoid Hub (in fact, we couldn’t upload the model without ‘Chest’, so we re-added it). Therefore we recommend adding a bone in another way (e.g. adding a new bone with Blender).

If you corrected something, click ‘Apply’ and then ‘Done’.

After completing the bones, place the object in the Scene temporarily.

Next, we will set up the shader for the material.

You cannot change the shader of the material that was set when importing the model, so we must create a new material and assign it. Right-click on the Project window and select ‘Create > Material’ to create a new material. You can assign the material by dragging it into the model in the Scene view.

You can set the texture in the box highlighted red in the following screenshot. Click it to open the Selection window. Alternatively, you can drag the texture into the box to set it.

Select the created material (①) and select a shader (④) under ‘VRM’ (③) from the drop-down on the Inspector (②).

For VRM, the developer recommends using the shaders under ‘VRM’ (③) or ‘Standard’ at the top.

In this example we have assigned ‘MToon’, but ‘UnlitTexture’ is also commonly used.

We recommend selecting all the materials and changing the shader simultaneously.

After setting up the materials, check the other details next.

The points to check are:

・ The position of the model > Is it at the origin (0,0,0)?

・ The scale of the model > Are the scale factors of X, Y and Z all set to 1.0?

・ The direction of the model > Is it facing in the Z-axis direction?

After checking them, we finally start converting the model.

After checking the above, select the object in the Hierarchy window (①) and select ‘VRM > UniVRM > Export humanoid’ in the menu (②).

This will bring up the window pictured below. Fill in ‘Author’ to enable the ‘Export’ button. Fill all the checkboxes and select ‘Export’.

When pressing ‘Export’, it brings up a window in which you select the name and the folder. As a lot of folders will be created when converting, we recommend creating a folder under ‘Assets’ to keep them tidy.

The snapshot below shows how it looks after the conversion. The folders created when converting the model are highlighted by the red box in the image below.

You can find the VRM prefab in it, so select it.

After selecting the prefab, the section to set the information for VRM (highlighted in the blue box) appears in the Inspector window. Fill them in.

Information required:

・Title

・Version

・Author

・Contact Information

・Reference (if any)

・Thumbnail

License required:

・A person who can perform with this avatar (Only Author / Explicitly Licensed Person / Everyone)

・Permission to perform violent acts with this avatar (Disallow / Allow)

・Permission to perform sexual acts with this avatar (Disallow / Allow)

・For commercial use (Disallow / Allow)

・Other License URL (if any)

・(Selections about redistribution / modification)

Please fill each field.

Once the set-ups are finished, delete the pre-conversion FBX object in the Hierarchy window and place the converted VRM prefab in the Scene.

With the VRM object in the Hierarchy selected, select ‘VRM > UniVRM > Export humanoid’ in the menu as before. But, this time, uncheck the highlighted in the red box in the screenshot below. Export the model in this state.

As this is the final export, you can export to a location other than Unity’s project file (e.g. your Desktop).

If you export it under the ‘Assets’ of the Unity project, a lot of folders will be created. However, if you export to the directory that is not the Unity’s project file (the Desktop etc.), only the .vrm file will be created, so you just need to handle one file.

We could say that all information is now packed into the .vrm file.

And that’s it! We have finished converting the model successfully!

You can use it as you like, uploading to VRoid Hub or VRC, etc.

The following is for people who want to upload the converted avatar to STYLY.

Install the STYLY’s Unity plugin from the following official STYLY site: https://styly.cc/ja/download/

Double-click the downloaded .unitypackage file to import it.

Once it’s imported, it brings up the following window. Type in the E-mail address and the API key.

Drag and drop the VRM object in the Hierarchy into ‘Assets’ in the Project window. It converts the object into the prefab.

After converting into the prefab, right-click the prefab in the Project window and select ‘STYLY > Upload Prefab or scene to STYLY’.

Once the ‘upload completed’ window pops up, let’s move on to STYLY.

In STYLY Editor, go to ‘Assets > 3D model > My Models’. Now, you can see the model uploaded.

That’s it for this tutorial!

[4]
Edit
Query
Report
Tosin Mecchi
Hiwi – A German Abbreviation For "Assistant Scientist"
Answer # 4 #
  • 1 Create an empty project in Unity. Or.
  • 2 Import UniVRM package into the created project. To replace UniVRM with a newer version, it is recommended to delete the existing VRM, UniGLTF, VRMShaders and MeshUtility folders (if any) before package import.
  • 3 Import VRM file into Unity.
[1]
Edit
Query
Report
Geekiyanage TaSi
SHEET METAL WORKER