Vol2 - Importing in blender and godot
Importing into Blender and assigning animations. Importing into Godot
Need two addons for Blender:
The import panel can be called in 2 ways:
- File –> Import –> MakeHuman (.mhx2)
- N-панель –> Import MHX2
result is identical:
If you need facial animation, you can:
- to enable the “Face Shapes” option for emotions via shape keys;
- if you choose a rig with face bones, then the emotions can be realised by poses.
In Rigging turn on Add Rig and choose Rig Type [Exported].
The rig assigned to the MH will be imported.
Remove all the masks:
If the clothes will be the only one, it’s better to leave masks.
Assignment of animation
*A little note. For the game, the animation must be played without moving the character. Moving the character is done in the game engine by moving the object itself. As the animation in the example contains movement, you need to get rid of it (or take the animation already prepared). You can choose any convenient way for the character to stay in place. In my opinion, the easiest is to tie the Hips(root) bone to the position at rest. The way is not the best, but simple and fast. To do this, I make a copy of the skeleton at rest position. This is only necessary for binding.
To assign the animation use Retarget BVH plugin finalized by punkduck [MakeHuman Team] (for which he is very thankful).
[Load And Retarget] allows you to load animation and immediately apply to the character.
Select animation (02_01.bvh) and load it.
*Now bind the Hips animation bone to the rest pose bone for the character to walk in place.
Add the running animation (02_03.bvh).
Now the file is ready to be exported to Godot.
The documentation for the engine recommends that you triangulate the models.
But Blender does not allow you to triangulate an object that contains shape keys:
Modifier cannot be applied to a mesh with shape keys
The Blender Importer Addon for Godot allows you to open Blender files as Godot scenes.
This feature is built into Godot 4, but it doesn’t work correctly there.
Just save the .blend file in your project folder and it will be automatically imported into the engine.
In an open scene, you can remove the resting pose skeleton you don’t need anymore and separate clothes by scene for easy switching:
Face morphs will be transferred, but you must remember to set the same Shapes settings for different body parts.
The main part of the tutorial is finished.
Translated with http://www.DeepL.com/Translator (free version)