0
$\begingroup$

This happened after I had trouble importing such a character into the Unreal Engine 4.

The Unreal Engine 4 accused the following problem: Multiple roots are found in the bone hierarchy we only support single root bone

Following the answer to this question (https://answers.unrealengine.com/questions/109814/multiple-roots-are-found-in-the-bone-hierarchy-we.html), I was able to get the object imported correctly to Unreal Engine 4.

Transcript of the answer (I quoted the link)::

First, unparent your mesh to the skeleton (or this may cause crashing later when importing) alt+p, clear parent. Now, go and create a root bone if you do not already have one you want to use as root. Join all your bones together into one armature by selecting them all in object mode and pressing ctrl+j. Select the armature and go to (usually tab)edit mode, select all the bones that you ARE NOT your root bone, then finally select the root bone and press ctrl+p (make parent), and select keep offset, (assuming you dont want to move your other bones onto the root bone). Export the armature as fbx as you where and it should work now.

Returning to Blender:

enter image description here

Note that it not only separated the mesh from the armature, as you can see that the bones are showing two poses at the same time (in object mode):

enter image description here

I would like you to tell me the correct way to put the 2 together again, so that after that I can import into the Unreal Engine 4.

$\endgroup$
2

1 Answer 1

0
$\begingroup$

The answer you've found is misleading: start with a previous version of your file (the one which worked well in Blender but not in UE4).

Delete the two keyframes that are causing the sliding of the rig in object mode: it's better to have all your animation performed by bones only, not bones movements and object mode movements; expecially for exporting purposes.

enter image description here

Then set the dopesheet window as "action editor", press the "F" button to save the animation even if not used, and click the "X" button to disable the animation.

enter image description here

Select the mesh, delete the armature modifier and apply the multires modifier.

Now you should have both the mesh and the armature in the centre of the scene, in T pose; if not, move them manually to have their locations matching well in the center of the scene.

Select the mesh and use Ctrl A to apply loc, rot and scale of the character, then do the same for the rig.

In edit mode add a new bone, call it "root", set it in the center of the rig, under the feets, in any z and y location you want (it doesn't matter), uncheck its "deforming" property.

Here is the misleading part of the answer: you have to set child of the root bone every other bone which hasn't already a parent, probably you will want to set the two shoulders bones as child of the hip bone, and the hip and the two ankles child of the root bone.

Check in the outliner: the root bone should result parent of every other chain of bones.

enter image description here

Now add an armature modifier to the mesh, setting the armature in its "object" field; in the action editor select your animation: the character will "walk in place"; use the root bone to set two keyframes to have the walking mesh sliding.

Every animation maden with this setup should be imported by UE4 without problems (maybe you will have to unparent again the mesh from the rig, for avoiding crashes) so, if the old animation doesn't work you should redo it with this new rig.

$\endgroup$
5
  • $\begingroup$ What did you do in the reply, from the file I sent you? I did not create any backups of this project (it was supposed to be a test, so I did not bother), so I'd like to know if I can execute what you have in your answer, from the file I sent you. $\endgroup$ Apr 3, 2019 at 13:00
  • $\begingroup$ You can use the file you sent me, the only thing is that you will have to move the mesh and the armature manually and have them match together in the center of the scene. $\endgroup$ Apr 3, 2019 at 15:14
  • $\begingroup$ I had to clean up every parent-child relationship (alt + p), after that I did everything you said. But some bones seem disconnected, is that right? I did not associate the bones with the mesh because of it. drive.google.com/file/d/1in_gWPCFtNPcCHrttByD0tCXuFOMo_xM/… $\endgroup$ Apr 4, 2019 at 15:46
  • $\begingroup$ When you parented all bones to the root bone, this new relationship did overwrite the correct parenting. Now in edit mode you will have to reparent every connected bone (i.e. the hand child of the forearm, the forearm child of the upperarm, and so on ...). If the bones are connected choose "connected" option, if they are far away choose "keep offset". Every bone will be directly or indirectly parented to the hip bone, and the hip bone will be child of the root bone. $\endgroup$ Apr 4, 2019 at 15:56
  • $\begingroup$ I'm seriously thinking of deleting and getting a whole new object from the beginning. But first I would like to know how to make a rig so that the animation is passed together with object correctly for Unreal. $\endgroup$ Apr 5, 2019 at 13:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .