tuatec / TTToolbox

TTToolbox provides useful helper scripts to automate your character integration workflows in Unreal Engine
MIT License
107 stars 29 forks source link

get metahumans working #11

Open AchimTuran opened 2 years ago

AchimTuran commented 2 years ago

Within this issue I will try to get a MetaHuman working for ALS with the help of TTToolbox v0.4. I will not create a detailed step by step guide here, only create some notes for myself. I'm planning to create a proper video for it soon.

We can tweak the hand locations slightly with offsets grafik grafik

And with a custom pose (scaled the preview a little bit to match the rotations better) grafik

AchimTuran commented 2 years ago
  1. Introduce unweighted bones make sure to set the correct preview mesh in the skeleton asset grafik add unweighted bones to the skeleton asset (otherwise the preview mesh might not have enabled ik bones) grafik

NOTE! Check that the output log does not show any error messages (scripts will force the recompression of all anim sequences to constraint virtual bones) grafik

AchimTuran commented 2 years ago
  1. Introduce sockets grafik
AchimTuran commented 2 years ago
  1. Introduce virtual bones grafik
AchimTuran commented 2 years ago

So we should see the sockets and virtual bones (hand vbs are not shown in the screenshot) after closing and reopening the skeleton asset of the MetaHuman grafik

AchimTuran commented 2 years ago
  1. ik rig creation It seems to be that the easiest way is to duplicate the existing ik rig from the metahuman grafik

Then we delete the *Metacarpal (otherwise we will see very weird finger distortions) bone chains. grafik

Again we set our correct preview meshm which makes it easier to see if everything works as expected. grafik

If some ik bone chains exist we delete them as well. We will use the constraint solver from TTToolbox to retarget them properly. grafik

Constraint bone chains are added to the solver settings. grafik

((ConstraintBone="root",ModifiedBone="ik_foot_root"),(ConstraintBone="foot_l",ModifiedBone="ik_foot_l"),(ConstraintBone="foot_r",ModifiedBone="ik_foot_r"),(ConstraintBone="root",ModifiedBone="ik_hand_root"),(ConstraintBone="hand_r",ModifiedBone="ik_hand_gun"),(ConstraintBone="hand_r",ModifiedBone="ik_hand_r"),(ConstraintBone="hand_l",ModifiedBone="ik_hand_l"),(ConstraintBone="ik_foot_l",ModifiedBone="VB ik_foot_l_Offset"),(ConstraintBone="ik_foot_r",ModifiedBone="VB ik_foot_r_Offset"),(ConstraintBone="ik_hand_gun",ModifiedBone="VB RHS_ik_hand_gun"),(ConstraintBone="ik_hand_gun",ModifiedBone="VB LHS_ik_hand_gun"),(ConstraintBone="Hand_L",ModifiedBone="VB RHS_ik_hand_l"),(ConstraintBone="hand_r",ModifiedBone="VB LHS_ik_hand_r"),(ConstraintBone="calf_l",ModifiedBone="VB ik_knee_target_l"),(ConstraintBone="calf_r",ModifiedBone="VB ik_knee_target_r"),(ConstraintBone="root",ModifiedBone="VB Curves"),(ConstraintBone="ik_foot_l",ModifiedBone="VB foot_target_l"),(ConstraintBone="ik_foot_r",ModifiedBone="VB foot_target_r"))

Then we should see white bone names, which shows us that the solver is correctly setup. grafik

In case the ik bones do not follow the ik goal. Reopen the ik rig. grafik

AchimTuran commented 2 years ago
  1. Skeleton Retargeting Options https://docs.metahuman.unrealengine.com/en-US/MetahumansUnrealEngine/MetaHumanRetargetAnimations/ Everything set to skeleton and unweighted bones + root + pelivs to animation grafik
AchimTuran commented 2 years ago
  1. ik retargeter setup Duplicate the RTG_UE4Manny_UE5Manny and set the IK_metahuman_legacy and the preview mesh. grafik grafik

Introduce a custom pose (scaled the preview a little bit to match the rotations better) grafik grafik

We can tweak the hand locations slightly with offsets grafik grafik

To use root motion we need to set Globally Scaled on the root bone grafik