TransWikia.com

mesh gets twisted wildly when trying to use Unreal's mannequin's skeleton

Game Development Asked by Serhii on November 2, 2021

I have modelled a simple mannequine and made a skeleton for it in Blender. As far as I can judge, this skeleton copies the Unreal’s standard mannequine’s skeleton perfectly…

All the hierarchy and bone names are the same, and Unreal also does not complain when I import this mesh and use Unreal’s skeleton asset for it.

However, when I try to play a preview animation on my mesh, it gets twisted wildly.

This is a normal state:

enter image description here

… and this happens when I play an animation on this asset:

enter image description here

I thought it was due to different joint initial transforms, so I tried exporting from Blender with varying bone axes (x-axis along the bone, z-axis along the bone etc.) but it did not help. There is neither imporevement nor mere difference when I change that. Can you tell me possible reasons?

Please find the .fbx here:

https://drive.google.com/file/d/1v1X8t7l-6lwQragO8E0mtC1chdT2p1m4/view?usp=sharing

One Answer

Problem

So, there were actually four things going wrong about the mesh and the armature:

  1. incorrect scale - this has made the model look stretched
  2. incorrect bone transforms in the base pose - this has made the model look twisted
  3. poor weights
  4. different skeleton proportions

Solution

1: Incorrect scale

Regarding the incorrect scale - not sure what has caused it, but, as @DMGregory has explained, if the offset between a bone and a joint is measured in metres (say, 1.3) but the animation thinks it's in millimitres - this would be like offsetting by 1300 metres. Which I think what was happening in the case - so it was kinda wrapping a mesh around a skeleton that is 100 times larger.

How I fixed it: in Blender where I was using metric system, I have scaled both the mesh and armature x100 and applied all transforms - after that, the problem of stretching was solved.

2: Incorrect transforms in the rest pose

After you fix stretching, you will most probably notice (if you are retargeting like me and using another skeleton) that body parts are all rotated in random directions. This is because every joint in the mesh has its specific transform in the rest pose. If those transforms in the Unreal's skeleton are different from your armature, the offsets will be applied to incorrect initial transforms which would cause distortions:

enter image description here

To put it short (because I don't understand the low-level mechanics properly): because the joint is rotated differently in the rest pose, animation will not work properly.

How I was trying to fix it: a) in Blender 2.83, activate the following property as shown below to see bone local transforms:

enter image description here

b) import Unreal's skeleton or one of the animations available: in Unreal 4.22.3, you can do that by going to Animations, right-clicking a single animation and exporting as fbx. You can see how different those sekeltons look in regard of rotations:

enter image description here

You see that the bone translations/rotations are completely different for the unreal's skeleton on the left.

c) to fix it, you would have to rotate/move each bone manually in your 3d software. I never had patience to finish it (only did a couple of joints which has partly fixed the problem) but @MostHost LA on Unreal forms has brought it to its end, and it would look like this:

enter image description here

3: Poor Weights

As you can see, after fixing scale and joint transforms, this still look bad. The reason is that the weight paint isn't fine. I haven't done this part yet, but I guess you would import Unreal's animation, play on your character, stop at particular frames and fix the weight paint until it looks fine.

4: Different skeleton proportions

When you are done fixing weights, this will still look somewhat like the picture above. This is because the skeleton proportions are different. For example, my skeleton has narrower shoulders than the Unreal's skeleton. This means that my mesh would be stretched a bit in the area of shoulders to match Unreal's skeleton. I am pretty confident, there are retargeting tools in Unreal that can fix it automatically: check their YouTube channel if you ever need to go through the process.

Answered by Serhii on November 2, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP