ALS for UE5.4

From PSwiki
Revision as of 18:32, 2 December 2024 by Talad (talk | contribs)
Jump to navigation Jump to search

Test new ALS in separate project

  1. Create new 3rd person project with C++
  2. Download ALS Community plugin, copy under /Plugins (make dir if not present)
  3. Generate Project files, recompile, and test ALS.

Add PlaneShift character to ALS project

  1. Import Kran character torso (for skeleton)
  2. Import Kran modules using torso skeleton
  3. Create a new PreviewMeshCollection with other kran pieces
  4. Added the Virtual Bones on the kran skeleton as per table below
Source Target VB Name
hand_l ik_hand_gun VB LHS_ik_hand_gun
LHS_ik_hand_gun ik_hand_r VB LHS_ik_hand_r
hand_r ik_hand_gun VB RHS_ik_hand_gun
RHS_ik_hand_gun ik_hand_l VB RHS_ik_hand_l
ik_foot_l foot_l VB ik_foot_l_Offset
ik_foot_l calf_l VB ik_knee_target_l
ik_foot_r foot_r VB ik_foot_r_Offset
ik_foot_r calf_r VB ik_knee_target_r
ik_foot_root foot_l VB foot_target_l
ik_foot_root foot_r VB foot_target_r
root root VB Curves
  1. Create new IKRig, set Preview Mesh to the Kran torso
  2. Click on "Auto Create Retarget Chains", then clear up the IK Goals (hands, feet)
  3. Create new IKRig, set Preview Mesh to the AnimMan mesh (ALS)
  4. Click on "Auto Create Retarget Chains", then clear up the IK Goals (hands, feet)
  5. Create a new IKRetargeter
    1. Set source ALS IKRig, and target Kran IK Rig
    2. In the "Chain Mapping" panel click on the "Root" Target Chain and set "Translation Mode" to "Globally Scaled". Without this the root movement (red line) will not be present in the retargeted animations.
  6. Select ALS_AnimBP , and click on "Retarget Animations"
  7. Select AnimMan as source, and Kran_torso as target, select RTG_ALS_to_Kran as retargeter
  8. Select all assets and click on "Export Animations", this will create all blendspaces and animations referenced by it
  9. WARNING: seems that the retargeter is not copying over this setting: Animation Sequence -> Asset Details -> Additive Settings -> Additive anim type: Local Space, Selected animation frame, ALS_N_Pose, 0. This causes the preview of the model in the anim BP to look all warped, like bones scaled up wrongly.
  10. Due to the above I had to use the Property Editor to set them all, copying from the standard ALS ones. I've selected all "Animation Sequence" in content browser (after retarget) and using the property editor add these properties
  11. I had the left hand with very weird angle, like rotated 90 degrees (maybe because it's mirrored in blender?) and to get the proper preview in the ALS Anim BP, I had to remove the "Take Rotation from Effector Space" for the "Two Bone IK" hand_l
  12. Create a new Blueprint deriving from ALSCharacter class for the Kran model. Add the skeletal mesh to it, set ALS Animp BP as animation blueprint
  13. This new Blueprint is missing all the settings of ALSCharacterBP, which we have to change:
    1. in Class Defaults, search MovementModel, and set it to MovementModelTable, Normal
    2. in Class Defaults, copy all values from ALSCharacterBP for Roll Animations and GetUp Animations using the retargeted ones
    3. Add MantleComponent and DebugComponent
    4. Add all skeletal meshes for head, arms, hands, legs, feet, eyes
    5. In the construction script use "Set Leader Pose Component" node to connect all submeshes to the torso one
    6. In the 3d view, rotate the torso mesh -90 degrees on the Z axis to align to the direction blue arrow
    7. Override the functions GetGetUpAnimation and GetRollAnimation, copy the content from ALSCharacterBP. You will get a lot of errors for all variables not existing. Create all those variables, and set the content to the retargeted animations copying from ALSCharacterBP
    8. Copy the functions OnUpdateHeldObjectAnimations and OnUpdateHeldObject, content gets copied automatically
    9. In Character Movement Component -> Details, enable "Can Crouch"