Open Unity with a Spatial scene. It can be the Starter template from Spatial official documentation. Go to Assets → Create → Material and create as many materials as textures your avatar have.
Add the previously created texture PNG files to Unity Assets folder. Then, select one material and drag the corresponding texture file to the Surface Inputs → Base Map checkbox in the Inspector window.
In the Surface Inputs, set the Smoothness to 0. Attention, this may be only needed for VIPE Heroes avatars!
Repeat these steps for all the textures you have. Add the previously converted avatar FBX file to Unity Assets folder. Now, select the FBX, and on the “Rig” section in the Inspector window, select the Animation Type → Humanoid. Then click the Apply button.
Go to the Materials section and drag the corresponding materials previously created to each material input in Remapped Materials. When all the materials are setted, click on Apply button.
It's time to do a right-click on the FBX asset and go to Create → Prefab Variant.
Select the prefab variant you just created and in the Inspector window, click on Add component and search for the Spatial Avatar component. In the Spatial Avatar just added, set the Default Anim Set Type to Feminine/Masculine depending on your avatar.
Open the Spatial Portal window. You can do it by clicking on Spatial SDK → Account.
Be sure that you are logged in with your Spatial account. If not, follow the log in steps!
Go to the Config section in the Spatial Portal and in the Project Configuration, select Avatar in Create New option and click Create.
The new avatar package will show and you will be able to choose a distinctive name for it. Drag the avatar Variant previously created to the Prefab input and select Human in the Category option.
For the thumbnail you need to add a PNG image with transparency and 256x256 px.
Finally click on Publish and accept all prompts. The avatar package will be published into Spatial in about 15 minutes!
Testing your Avatar Before Publishing
You can try your avatar before publishing it in a default empty space just by clicking on the Test Active Package button. Let's see if everything works!
Attention! If Test Active Package button is missing, go to Spatial SDK → Visual Scripting → Regenerate Nodes.
Equipping Avatars in Spatial
Log in to Spatial and enter any space. Click on your profile icon on the right bottom corner of the screen, and then go to Edit Avatar. Your new VRM avatar will be there, just click on it, and then in the Save button!
Note: Avatar Scale Issue Fix
If you have this error when trying to publish the avatar package, here is a quick and easy solution!
Go back to the FBX file and in the Inspector window, go to the Model section, change the Scale Factor to 100 and click on Apply.
You need to create the Prefab Variant again and repeat the previous steps. Also, double click on the Variant to open it.
Go to the Hierarchy left window and select the Armature part. On the Inspector window, change X, Y and Z scale values to 1. Repeat for Camera, Light and VIPE_Base_Body. Set their scales to 1. Finally, repeat all the steps left and click again in Publish!
Now it's easier than ever to play with our custom VRM avatars in Spatial. Of course, sporting our VIPE Heroes around the metaverse should be mandatory.
Although at first glance it may seem like a tedious process, the steps to follow are actually quite simple. And well, if they weren't, here's our great guide. Now you have no excuse to use your digital identity in this metaverse.