Character - Capi-Metaverse/Template GitHub Wiki
In the following points we’ll explain how to create and animate characters so that we can add it to our project. Right now there are two known methods for the character creation, using the UMA character creator or with Ready Player Me. In each case we are going to use a different method to animate the characters.
UMA = Unity Multipurpose Avatar
After downloading the package (UMA), scripts, models, prefabs are imported.
-
Models are characters and clothes. Characters can be HumanMale, HumanFemale…
-
Scripts and prefabs can generate avatar and morphing them.
In order to create an avatar in the application we have to follow some steps :
-
In a Unity Scene, drag "UMA_DCS" from the UMA’s Prefabs.
-
Create a UMA GameObject New Dynamic Character Avatar, it will already ahve the component script "UMAscript" which allows to modify our charcater’s dimensions, the script Dynamic Character Avatar to apply a model (HumanMaleDCS, Humane Female DCS…) to the character or to change/put on some clothes in the Customization part. An Animator also appears in the character Inspector, it will be necessary for the movement.
Following those two lines a character will appear.
All values link to the character’s dimension and clothes can be modify by codes which allow the creation of a character creator.
To add clothing to the character :
-
Click on Drag Wardrobe Recipes here or click to pick in the customization part of the character, a new window will appear with a set of clothes (already imported via UMA).
-
It’s possible to add new clothes with other assets in the Unity Asset Store.

Every time there’s a change, the character is updated. All values (dimension, clothes, race, colors) are store in a variable called a Recipe. This variable is important because it allows us to load the character after saving it and to not lose all of our changes.
Lexical :
All methods must be applied to the variable that defines the character (here it will be called "character").
-
avatar is a method useful to get the avatar of the character, it’s from this that we can modify the character.
-
GetDNA() is a method (after character.avatar) from the class DnaSetter which contains all the data (from UMAscript) to modify our character dimension after using the method. It’s a dictionnary.
-
Set(value) is a method that change the value of a given variable of the character.avatar’s DNA . (example : if we have set dna as the dictionnary which contains the data from the previous method then dna["height"].Set(value) will modify the given variable (here height) of the character)
-
SetSlot(string, variable) is a method (after character.avatar) that apply clothes/hair/beard to a character. (example : character.avatar.SetSlot("Shirt", FemaleShirt) will apply a FemaleShirt to the character, it can’t be applied to an other part of the body than "Shirt")
-
SetColor (string, variable of a color) is a method similar to the previous one but to apply the color of the Hair&Beard and Skin. the line of code must be followed by the UptadeColor(true) method (after character.avatar) to validate the changing of color.
-
ClearSlot(string) is a method (after character.avatar) that take for string the part of the body where we want to remove the object (Hair, clothes…). It must be used before a SetSlot method otherwise it will appear problems (several clothes to a same part of the body, we won’t see the changes)
-
Build Character() is a method (after character.avatar) that is necessary to uptade our characted and apply the changes that we made.
Before adding animations to the project, we need to download this fbx: Dude.fbx.
Once done, we’ll need to take the following steps:
-
Go to mixamo, upload the fbx and download the animation of your choice (without skin and fbx for Unity).
-
In Unity, import the mixamo fbx in your assets, and put it in to the Animation folder.
-
Then open the mixamo fbx in Inspector.
-
In the "Rig" tab, change:
-
Animation Type to "Humanoid"
-
Avatar definition to "copy from other avatar"
-
Source to "DudeAvatar" (path:Assets/UMA/Examples/Legacy Examples/Assets/Animation/Dude.fbx)
-
Apply
-

-
In the "Model" tab, change and Apply

-
In the "Animation" tab, change and Apply

-
Once modified the animation parameters, we upload the animations to the Animator and define its transitions.
Bibliography :
There are different ways to export files from blender to Unity. The first one is via a fbx file, with the following parameters :

The second one is to export it as a Blender file (.blend) with the button "Save as".
Then, to import it in Unity, we can drag our file to a folder we want.
In this same folder we need to create a UMA Material : Create → UMA → Core → Material In this UMA material we can add a Unity Material (for the color). We can also use an already existing Uma Material.
After this we can create our Slot, Overlay and Wardrobe thanks to the Slot Builder.
In Material : We put our UMA Material In Folder : The one we want In Slot Mesh : The .blend file or .fbx file that we have imported from Blender Don’t forget to tick "Create Overlay", "Create Wardrobe Recipe", "Add to Global Library" cases.
Issues :
-
with the .blend file : the Slot isn’t well build
-
with the .fbx file : the Slot isn’t well build, and the warning "The slot’s size is ver small".. but we can change it.
Even if we have problems Overlays, Slot and Wardrobe are still created. In the Wardrobe, we have to drag races that will be able to put the creating clothe on and in which part of the body. Here, we can see the slot problem. Compare to other wardrobe there is the Slot section while in ours there is not.
For the creation of Characters, we’ll use the ReadyPlayerMe website, which allows us to create gLTF avatars from pictures.
-
Sign in/up in the website.
-
Go to My Avatars and press "+" to start creating the Character.
-
Once created, we’ll download the file as gLTF and upload it to Unity. In this case it isn’t needed to pass through Blender.

For the obtaining of Animations, we’re going to use Mixamo, a platform created by Adobe.This website allows us to install Character Models and Animations, or to apply Animations to the characters we upload.
-
Import the gLTF model to Blender
-
Export it as fbx (with Armature>Add leaf bones deactivated)
-
Upload the fbx at the Mixamo website, select the animation we want and download it (without skin and fbx for Unity)
-
Upload animation to the Animation folder in Unity
-
Add Animator to the Player Model inside the Player Prefab in Resources and add the Animator Controller (This step is Optional, only required for new Player Prefabs)
-
Upload animations to the Animator and define transitions
