Creating an Avatar

You can turn any humanoid mesh into an MSquared avatar with Blender and free rigging tools. Here is a full video run-through of the process:

Software you will need:

(These files are the Improbable Blender add-on for the geometry utilities from this private repo, the Game Rig Tools from https://toshicg.gumroad.com/l/game_rig_tools and the Surface Heat Skinning tool http://www.mesh-online.net/shd-blender-addon.zip from this repo)

Plugin installation in Blender

In Blender, go to Edit -> Preferences -> Add-ons and press the Install button

Install both of the .zip files and the .py file in turn. When each one has been installed, you must enable it by checking the box:

If the python file is updated you can re-download, replace it and it will be updated in Blender. For the other addons (zip files), you'll need to download the file, remove the old one from Blender and re-add the newest zip file. Game Rig Tools is in active development and it has updates in a regular basis.

Importing your character

First you will need a character model file. This can either be a character you've authored yourself, or one you have downloaded. There are many free character meshes available online, for example at https://sketchfab.com/.

For best results your mesh should be humanoid and in an A-pose or T-pose. Meshes with lots of accessories or sticking out parts don't tend to work well, as the auto-skinning step can get confused and attach parts of them to the wrong joints.

Once you've found a character mesh, you're ready to start converting it into a file that's compatible with the MSquared avatar system. For a detailed explanation see the video above, but here you will find a summary of the most important steps. If you're completely new to Blender you can also see a basic introduction to the controls.

  • Create a new empty scene in Blending. If there are default Camera, Cube and Light objects in the overview you can click them and press Delete to remove them.

  • Tip: If your character doesn't import nicely or looks wrong, you can try re-exporting it from a different tool. If your source file is a glTF/GLB file you can go to https://www.gltfeditor.com/ and import your avatar, and then Save again. Import this re-saved file into Blender instead and it make work better.

  • You need to remove any existing skeleton on the character, and for ease we can merge all meshes together. Press N to bring up the tools menu and select Improbable geometry process. Click Remove Armature, Remove Transform Groups and then Merge Vertices to perform all the clean-up steps. This will also erase any non-geometry elements in your scene and remove all parent transform groups.

  • Select the Game Rig Tool tool and press Initiate Mannequin to add the skeletons.

Setting up the skeleton

You can now fine tune the joint positions to match your character geometry.

  • In the Game Rig Tool isolate the Tweak skeleton by pressing the white circle next to it. Go into Pose mode to edit the joints.

  • Enable the Body Parts and/or Joint Tweak options, and move the joints into the right place to match you mesh. Select the wireframe squares (body parts) and circles (joints) and move them by pressing G and rotate by pressing R.

  • See the video for advanced methods of matching the fingers.

Now the joints are set up, the geometry needs skinning to the skeleton.

  • In the Game Rig Tool isolate the Deform skeleton by pressing the white circle next to it. Go into Object mode to use the skinning tool.

  • Click the Mesh Online tool and set the Influence Bones to 4.

  • Press the Surface Heat Diffuse Skinning button to calculate this skinning. This will take a few seconds.

  • Go back into Pose mode to test the skinning, by selecting joints and pressing R to rotate them. Press Esc to cancel each rotation after testing.

  • Go back into the Game Rig Tool and press Switch Parent Armature to apply the changes to the Unreal skeleton.

  • Isolate the Unreal skeleton in the Game Rig Tool with the circle button, where you can test the skinning again in Pose mode.

  • Finally press the Open Web Avatar Exporter button to open the web page where we carry out the final stage.

Fixing the rotations

We're now done in Blender, but we need to use the GLTF Avatar Exporter web tool to fix up the skeleton rotations.

  • Go to https://mml-io.github.io/avatar-tools/main/tools/gltf-avatar-exporter/ (this is where the Open Web Avatar Exporter button should take you).

  • Drag the GLB file you exported in the previous step into the top left window. If everything exported correctly you should see your character.

  • Assuming this all works, press the Export button at the top right to save your final GLB file!

Turning your GLB file into an MML character

You now have a compatible GLB avatar file. But to use it you need to create an MML avatar using the file.

From v21 of the platform, we also support DRACO compressed glTFs and GLBs

  • Go to https://mmleditor.com/projects and Create a Project

  • Upload the .glb file you previously exported by going to the Assets tab and dragging your file in.

  • Now drag the asset to the Code window, and rename the m-model tag to m-character at the start and end of the code. This is all you need in your MML file.

<m-character src="https://mmlstorage.com/[ASSET_CODE]"></m-character>
  • Now you need to permanently store the MML. Click the Static Versions button at the top right and press Publish. The click Copy to copy the URL of your MML avatar.

  • You can now use this in the pause menu of an event where available (note: if streaming you may have to allow the option to paste from clipboard in the Streaming Options). Your avatar should now work in the event!

Further demo

Here is another quick demo using a different character.

Generative AI Character Demo

You can also use generative AI to create your avatar. Here is another quick demo of this process.

Appendix: Basic Blender controls

If you're new to Blender it can be confusing to use. Here are some basic controls to get you started. The extra controls are covered in the tutorial video at the top of the page.

Camera controls:

  • Spin the camera by holding the middle mouse button.

  • Move the camera by holding Shift and the middle mouse button

  • Zoom with the mouse wheel, or by holding Ctrl and the middle mouse button

Change the 'edit mode' in the top left corner (the actual menu depends on what you have selected). In this tutorial you'll dealing with skeletons, and will need to use Object Mode (for selecting entire objects) and Pose Mode (for manipulating individual joints).

Press N to show the tools the you will be using, on the right hand side.

Click the axis letters to enter an orthographic view. This is useful for moving joints about in a single plane - for example click the X axis to move spine joints around without the risk of them moving off the centre line.

Some steps require multiple objects to be selected at once. In the top right tree view, you can select a second object by holding Ctrl and clicking. For example, some steps require you to use the white circle icon to select a specific skeleton, and then also select your mesh. You can hold Ctrl and click the mesh either in the main viewport, or in the tree view.

Last updated