Llama Labs Interactive
  • Introduction
  • Asset Creation
    • The Crate Series
      • Blender Basics
        • The Base Model
        • Edit Elements
        • Blender Common Tools
        • Simple Materials
        • Useful Techniques
        • Exporting the Asset
        • Summary
      • Materials and UVs
      • Palette & Gradient Texturing
        • Palette Approach
        • Creating the Material
        • Unwrapping UVs
        • Finalizing the asset
      • Tileable Textures
        • Creating the Texture
        • Creating the Material
        • Unwrapping the UVs
        • Finalizing the Asset
      • Trim Sheets
        • Creating the Texture
        • Creating the Material
        • Unwrapping UVs
        • Finalising the Asset
      • Hand Painted Assets
      • High polygon Assets
    • VRM Avatars
      • Getting Started
      • VRM for Blender
        • Installation
        • Rigging the Avatar
        • Weight Painting
        • Blend Shapes
        • VRM Details
        • VRM Export
  • Hyperfy
    • Custom Avatar Animation
Powered by GitBook
On this page
  • Requirements
  • Process
  • A-Pose Characters
  1. Hyperfy

Custom Avatar Animation

This page goes over considerations for how to create custom character animations for use in the Hyperfy platform...

PreviousHyperfy

Last updated 16 days ago

The platform uses VRMs as avatars. This allows you to use standard VRM file in an experience.

Hyperfy uses a modified Mixamo rig to allow all the animations on the Mixamo platform to be used without issue. If you want to make your own custom animations however, you will need to consider the following in order to make your character animations compatible.

It is possible just to take the animation files and animate them with the default rig only, but usually you would use a character to animate for comparison. This tutorial covers how to use your own character for animations.

Requirements

  • A finished Character model

    • Preferably in T-Pose.

    • A-Pose is possible and covered below.

Process

The fastest approach is to use Mixamo to rig your character and make most (but not all) of the rig to use for custom animation in Hyperfy. That way you can get a head start on rigging and weight painting, as well as have a rigged character you can use to see your animations in action.

As a T-Pose is strongly recommended to reduce issues, you will need to do some extra steps for animations later on if your character is using an A-Pose. I will cover this below in A-Pose Characters.

Creating the Rig

  • Export your model as an FBX from Blender.

    • Select your desired assets and use 'Limit to : Selected Objects' if you have more assets in the scene.

  • Open and Sign up / Sign in.

  • Import your character mesh.

    • Select 'Upload Character' at the top right.

    • Drag and drop or add the mesh file manually.

  • Go through the rigging process.

    • Confirm the character is oriented correctly. Select Next.

    • Place the Markers on the left of the pop up onto your avatar. Select Next.

      • Make sure the Skeleton LOD includes the number of finger bones you require.

    • Let Mixamo automagically rig your character.

    • Select Next once you are happy with the results.

  • Download the rigged avatar.

    • Select 'Download' at the top right.

    • Select 'FBX Binary(.fbx)'.

    • Select 'Original Pose (.fbx)'.

      • See below if your character is in an A-Pose.

    • Select Download and save to your desired location.

Importing and Checking the Rig

  • Import your .fbx file into blender.

    • If you have the 'VRM for Blender' add on installed, you could export the imported avatar as a VRM at this point (if the Mixamo rigging is high enough quality).

      • Before export, add the Metadata under 'VRM 0.x Meta' panel.

      • Confirm all the bones are connected under the 'VRM 0.x Humanoid' panel, Mixamo rigs are usually filled out automatically.

      • Do not add the 'Root' bone (described below) before export as a VRM as this will not work correctly.

  • Make sure that your rig has a T-Pose in the Rest Position.

    • Select the Rig, and go to the 'Data' Properties panel.

    • Select the 'Rest Position' button, the default is 'Pose Position'.

    • If your character changes from a T-Pose with the 'Rest Position' button, you will need to convert it to a T-Pose. This is covered below in the A-Pose Characters section.

  • Check the weight painting of the rig.

    • Select the rig and go into 'Pose Mode'.

    • Move the bones to see if Mixamo's weights are accurate.

  • Use Weight Painting if you want to clean up the weights.

    • If you are focusing on Animation the weights of the rig don't matter.

Customizing the Rig for Hyperfy

  • Select the Rig and go to Edit Mode.

  • Duplicate the 'mixamoorig:hips' bone.

    • Select the 'mixamoorig:hips' Bone.

    • Duplicate the bone using Shift + D.

    • Move the 'mixamoorig:hips.001' bone down to 0,0,0 position.

    • Left click to confirm.

  • Rename the 'mixamoorig:hips.001' to 'root'.

  • Parent the 'mixamoorig:hips' to the root bone.

    • Select the 'mixamoorig:hips' bone first, then shift + click the 'root' bone.

    • Right click and select 'Parent > Make' and 'Keep Offset'.

    • A dotted line should then join the 'mixamoorig:hips' and 'root' bone.

    • Do not link the hips to the root bone, as you can use the Hips bone for animation if it is separate.

Animating the Rig

  • Animate the character in 'Pose' Mode as you see fit.

    • Use the Auto Keying button at the bottom to set keys automatically if desired.

    • Use 'Right Click > Insert Keyframe' or the 'I' hotkey to set keyframes manually.

Exporting the Animation

  • Make sure you are in Object Mode and select the rig only.

  • Go to 'File > Export > GLTF (.glb / .gltf)'.

    • VRM or FBX files are not used for animations.

  • In the options to the right, make sure you select the following :

    • Include > Selected Objects.

    • Animation Mode > Scene.

      • You can also use Actions or NLA tracks if you are using those.

    • Adjust Sampling Animations rate in order to optimise the file size.

Checking your animations

It is a good idea to do a quick check on your process using your own or local build in order to make sure it works as expected, otherwise you may need to update your entire animation or pipeline to reduce issues.

The hip position of the animation is based on the distance between the 'root' bone and the 'mixamoorig:hips' bone. If you find your avatar is not placed on the ground correctly using your animations, this is most likely the reason.

You can usually fix this by repositioning the 'root' bone lower and keeping the hip bone where it is in order to still use the floor in Blender as reference.

Make sure to test your animation within your Hyperfy experience to make sure it works with your own VRMs as well as other ones.

With the files exported you can use these in your Hyperfy Experience by overriding the animations in the source.

  • The files are found in the Source under 'hyperfy / world / assets'.

  • The default animations include :

    • emote-fall.glb

    • emote-flip.glb

    • emote-float.glb

    • emote-idle.glb

    • emote-jump.glb

    • emote-run.glb

    • emote-talk.glb

    • emote-walk.glb

A-Pose Characters

As Hyperfy uses T-Pose assets by default, you will have to make sure your animations use the same for the animations to work correctly. Most common issue is the rotation of limbs will look incorrect.

It is possible to export the VRM from an A-Pose to a T-Pose using VRM for Blender, however this approach will not work with custom animation files. We will need to update the Rest Pose in Blender to be in a T-Pose to make sure that all rotations work correctly with all VRMs.

If you used Mixamo to rig the character, and exported it in a T-Pose, this is not the Rest Pose as a T-Pose.

Updating the Rest Pose

There are two approaches to setting the Rest Pose as a T-Pose if your original mesh is an A-Pose. The Blender approach below stays within Blender but is a little more complicated whereas using Mixamo is easier but uses both Blender and Mixamo.

  • Make sure there are no animation keyframes on your rig.

  • Select the Character mesh in Object Mode, duplicate the 'Armature' Modifier on the mesh.

  • Apply the original 'Armature' Modifier (the top modifier) to the mesh.

    • Your mesh may look broken, but that's fine for now.

  • Select the Rig, go into 'Pose Mode' and set the pose into a T-Pose.

  • Select the Armature in Pose Mode, and select 'Pose > Apply > Apply Pose as Rest Pose'

    • Your character mesh should be fixed.

  • Follow the process described above using a T-Pose character.

  • Export the Mixamo Rigged character in a T-Pose within the Mixamo download settings.

  • Import the .fbx into Blender.

  • Apply the 'Armature' modifier to your character mesh.

  • Select the character mesh, right click and select 'Parent > Clear and Keep transformation'.

    • This will set your base character mesh to a T-Pose.

    • Note if you just use 'Clear Parent' the mesh may scale or move incorrectly.

  • Export the new T-Pose mesh as an .fbx and rerig the character using Mixamo as a T-Pose.

  • Follow the process described above using a T-Pose character.

With your Rest Pose set in a T-Pose, you should be able to animate your character as you like, and any VRM should be able to work with your animations as long as the 'root' and 'mixamoorig:hips' bone is the correct distance apart.

Note how the root bone is at the origin point, but as the character is shorter proportionally than the default the animation appears in the ground.

Here the 'root' bone is lowered under the origin in Blender, and therefore the position of the character looks correct.

Hyperfy
Mixamo
Select 'Selected Objects' if needed.
Upload your fbx to Mixamo...
Rig the character using Mixamo...
Save your character as Original (or T-Pose if in an A-Pose)...
Import the Rigged Character (and export as VRM if desired)...
Confirm the Character 'Rest Position' is a T-Pose...
Update the rig with a 'root' bone...
Animate your character...
Save your animation as a .GLB...