Creating Rigged Character Using Blender (w/o Rigify)

If have created an animated character in Blender, using Rigify which creates a rig that you can use to manipulate the character skeleton. I created a very simple animation where I have rotated the inner arm bone by 90 degrees (so that the palms are facing me) and rotated the arm bone up and down so that the character is waving.

When loading into my three.js WegGPU program, I assumed that I could import this animation like any other animation using these commands within the loading routine:

let object = gltf.scene;
let mixer = new THREE.AnimationMixer(object);
	mixer.clipAction(gltf.animations[0]).setDuration(1).play();

On very rare occasions, this works okay. However, the most common result is that parts of the animated mesh are distorted: It appears that the distortion is coming from the finger meshes plus a little distortion by the right foot.

Any idea what I am doing wrong?

Or, to look at it the other way, why does it sometimes work perfectly?

1 Like

The answer turns out to be don’t use Rigify!.

What you need to do is simply create a “Rigged Mesh” without using Rigify, something I had not done before.

For anyone who does not want to watch hours of videos, here is what I did. I went back to a version that had the mesh and the metarig separated. Rigging the mesh was fairly simple.

  • Switch to object mode and unselect everything in the 3D viewport (Alt-A).
  • Go to the parts list and, while holding shift down, click first on the metarig in the parts list and then on the mesh. (In the parts list, metarig is now colored orange and the mesh is now red.).
  • Go back to the 3D viewport and right click on the mesh. This will display an Object Menu.
  • Select Parent “With Automatic Weights”.

BEGIN EDIT:
I have read that, in step 2, you should select the mesh first and the metarig second. However, that resulted in the mesh being the parent and did not work. On the other hand, when I tried to make another model, using step 2 above, the result also did not work. (But that could be because I messed up some geometries.)
END EDIT

This links the mesh to the metarig, creating a “Rigged Mesh”.

You can then create a normal animation, by hiding the mesh, selecting the metarig and going to Pose Mode. You can select which bone to rotate (using the 3D viewport views) by pressing r plus the desired change angle.

As a simpler alternative, you can use the models and animations in Mixamo, but the models can get pretty large when you start adding or combining animations - around 5k (the reason appears to be that the Mixamo animations are very detailed - sometimes over 3k), I just wanted to create mid-resolution characters with simple animations or without animations that could be posed (ideally around 1/2k per character).

1 Like

Love this project so much @phil_crowther

This game here: https://www.youtube.com/watch?v=Zr4B0kOdBXQ

Is one of the games that really got me into 3d programming.

1 Like

Followed by this sequel: https://www.youtube.com/watch?v=8u7qW2306_k

1 Like

The flight simulation that inspired me to start creating my own flight simulation was the SubLogic FS! Flight Simulator. After the Apple, I bought an Amiga, so I missed out on a lot of the earliest PC flight simulations. I rejoined the mainstream around 1990 when I bought a PC. I created a lot of airplanes, ships and scenery for various iterations of the Microsoft Flight Simulation and returned to my programming efforts about 10 years ago.

1 Like