ALSV4_CPP Add your char - TwitchBlade/ALS-Wiki GitHub Wiki
Adding your character to the ALS Demo
If you have a custom character, I strongly suggest to add your character first to the ALS Demo before integrating ALS into your game. This will give you a quick way to test if the skeleton and all other animations are correct.
-
Import from Blender a humanoid compatible skeleton, better if generated/exported from the UE one. Ensure the top node is named "Armature" in blender, so that you get in UE a "root" node at top of the skeleton structure. Also on Export use "Only Deform" and DEselect "Add Leaf Bones"
-
Create the Virtual bones for your character BEFORE retargeting (doing it after will cause issues):
Source | Target | VB Name |
---|---|---|
hand_l | ik_hand_gun | LHS_ik_hand_gun |
LHS_ik_hand_gun | ik_hand_r | LHS_ik_hand_r |
hand_r | ik_hand_gun | RHS_ik_hand_gun |
RHS_ik_hand_gun | ik_hand_l | RHS_ik_hand_l |
ik_foot_l | foot_l | ik_foot_l_Offset |
ik_foot_l | calf_l | ik_knee_target_l |
ik_foot_r | foot_r | ik_foot_r_Offset |
ik_foot_r | calf_r | ik_knee_target_r |
ik_foot_root | foot_l | foot_target_l |
ik_foot_root | foot_r | foot_target_r |
root | root | Curves |
-
Open your skeleton, and click on Retarget Manager. The under "Current Skeleton" click "Add New" and select the mesh associated to your skeleton. Then under "Setup Rig", select "Humanoid".
-
Find the ALS_AnimBP under \plugins\ALSV4_CPP\Content\AdvancedLocomotionV4\CharacterAssets\MannequinSkeleton and Retarget ALS_AnimBP, this will bring with it all the animations and the blendspaces connected to AnimBP as well.
-
Open ALS_Mannequin_Skeleton, under "Retarget Manager" click on "Modify Pose" and "Use Current Pose", this sets the base pose to be the A-pose (arms at 45 degrees).
-
Retarget all the animation contained in the subdir /Actions which are not directly referenced by the AnimBP
-
Rename ALS_AnimBP generated by the retarget to ALS_AnimBPNew
-
Copy the ALS BP and add your skeletal mesh in it, using the renamed ALS_AnimBPNew
-
In your characterBP add variables LandRoll*, GetUp*, Mantle* . Copy all the values from ALSCharacter BP, use the retargeted animations instead of the ALS ones.
-
In your characterBP, override the functions: GetUpAnimation, GetMantleAsset, GetRollAnimation. Copy the graphs into these functions
-
In your characterBP , open "Class Default", check/copy all ALS values.
-
Change the character used by ALS you need change it in the Game Mode.
open this BP:
Plugins\ALSV4_CPP\Content\AdvancedLocomotionV4\Blueprints\GameModes\ALS_GameMode_SP
and change Default Pawn Class
-
If you encounter issues with hands or feet rotation go to "IK Foot" and "IK Hand" graphs, click on the nodes "Two Bones IK" and DEselect "Take Rotation from Effector Space"
-
If you encounter issues with the direction in which the knee or the elbow is pointing, then click again on the "Two Bones IK" and move the Effector in the 3d preview.