ruyo / VRM4U

Runtime VRM loader for UnrealEngine4
Other
1.3k stars 170 forks source link

Bones not matching UE4 Mannequin #100

Open JamesScottCode opened 2 years ago

JamesScottCode commented 2 years ago

This is a test animation I made. It's very bad, but it shows what happens.

This happens with all arm animations, bought from UE4 marketplace. For the default UE4 Mannequin, the correct animation shows. For default, the hands touch. On the VRM, they cross. This happens with my unreal 4 marketplace animations too, for example, attacking, holding something, chopping animation.

For the imported VRM,VRM _humanoid, VRM_ue4mannequin, all animations have this arm crossing problem.

I'm not sure what's the problem, but perhaps it's the shoulders being in the incorrect position on VRM model?

I've tried setting humanoid, retargeting to different types, and maybe 20 hours trying to fix this problem.

Do you have any ideas? I think it's an import problem.

https://user-images.githubusercontent.com/51303704/136659880-3f428e43-d660-48b9-b7d1-3c0a46482922.mp4

ruyo commented 2 years ago

Hi. Each model has a different length of limbs. Retargeting only aligns the rotation, so the position will not match exactly.

Retarget pose has a big impact on accuracy. VRM sets A pose as the default pose, but this accuracy is not very good. If you are not satisfied with it, I recommend you to set it by yourself. If you want a more accurate match, I recommend using T pose. However, as mentioned above, even if you use T-Pose, the position of the hands, etc. will not match exactly.

_humanoid are just different names for the bones. It does not affect the result of retargeting. The purpose of matching the bone names to the UE4 mannequin is to make the logic common.

If you want to solve this problem on UE4, you can use ControlRig. However, this requires some familiarity with Rig operations. If you are familiar with a DCC tool or something similar, it is better to use that tool.

JamesScottCode commented 2 years ago

Thank you so much ruyo! I'll try a better T pose and try a control rig.

JamesScottCode commented 2 years ago

I seemed to fix the big issue with using a control rig to widen the shoulders and propagate to children. There are still wrist/finger issues, but maybe those can be fixed too :)