ruyo / VRM4U

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

[UE5] Animation Retargeter and Root Motion #370

Closed Lipuchich closed 1 month ago

Lipuchich commented 1 month ago

Hello! The solution in the following topic: https://github.com/ruyo/VRM4U/issues/164 almost worked for me as well, but i still have an issue left - my retargeted animation does not inherit the Z-axis height of the source. So when i play retargeted animation - it lifts my character up as if the Z axis height of the root bone does not change at all. Could you please suggest something to deal with it? Source skeleton and animations are mixamo.

Here are the screenshots, you can see the source is rolling on the ground and the target is lifted up. image image

Video:

https://github.com/ruyo/VRM4U/assets/127506513/4ede29b1-3be6-44d2-b174-1a159f50455d

Looking forward to hear from you! Best regards, Lipuchich

Lipuchich commented 1 month ago

Fixed by setting up the translation mode for pelvis to absolute as well as i did for root bone chain! But the new issue appeared - root motion direction is wrong. Any possible way to change import rotation of the mesh with vrm4u?

ruyo commented 1 month ago

Hi. When reporting, please indicate the UE version you are using. Please use the IKRig for VRM created by VRM4U.

From the screenshot it looks like what you have set up. The RetargetRoot bones appear to be wrong. Also the Chain named Pelvis is not needed.

Lipuchich commented 1 month ago

Sure, sorry, i used 5.2 and now moving to 5.3.

Yes, you were right! I set the hips for retarget root, removed pelvis bone chain and set the root bone translation mode - and that allowed me to set the retargeter correctly. The only issue left is the direction of the root motion baked into the animation and not changeable by animation import rotation. I found the solution by using the Root Motion Fix Tool plugin by Attaku Studio - it allowed me to change RM direction right inside the engine. Thats why i moved to 5.3 in conclusion.

Much thanks for your help!!!

Best wishes, Lipuchich