UE 5 Hot Key:
Ctrl+Space: open window at bottom → click Dock in Layout button (keep the UE4 bottom window stay there)
Import Characters and Assets:
Create a folder name as Character → R click or Import button (in Content Browser)→ Import to (choose the fbx file) → Import All (Characters download from Mixamo is already rigged, if not, can rig in Mixamo)
Create a sub folder name Material in Character folder, put all texture and material assets in it)
To test if the rig works, drag the PhysicsAsset character in the scene and play, he should collapse like a rig doll
Animation for the Characters:
Download few common animations from Mixamo: Dwarf Walk,Run (both forward and backward) , Idle, Jump as FBX
Tick In Place box if some animations have such option (keep the movement in the frame)
Create a sub folder name as Animation in Character folder → Import all animations downloaded → Untick Import Mesh; choose the character in Skeleton; Import Rotation (sometimes need to adjust to 90 degree here) → Import all
Remark: Imported metal/roughness better let them free from color, coz 3D render shouldn’t color correct roughness or metal map:
Select the metal or roughness → R click →Asset Action → Bulk Edit Via Property Matrix → the box below pops up → Untick all sRGB
Double click on the character Body Material (depends on how the character asset is created, maybe different material composition) →
Open blueprint (here can use Ctrl+Space too to use the texture page, then just drag the materials into Base Color, Metallic, Specular, Roughness, Emissive Color, Normal, etc respectively) → Save
Repeat the same steps to allocate material on different part of the character (e.g. Hair, Eye, etc)
Replace the 3rd gamer Mannequin to the Hero character:
Click on the Mannequin capsule → Choose the hero in Skeletal Mesh in Mesh menu
If have to scale the size of character:
In Content Browser → ThirdpersonBP →Blueprints → Double click ThirdPersonCharacter (Box pop up) → Viewport → Mesh (CharacterMesh0)(Inherited) (in L menu)→ Replace character in Mesh (same step as above) → Scale character at Transform or in the Viewport screen
Animate the Character:
First, adjust the capsule (3rd person gamer) speed that react when playing the game:
In Hero Character folder → R click → Animation → Animation Blueprint → Choose the Downloaded hero character file → Ok (New Anime BP created, name as AnimBP_Hero)
R click again → Animation → Blend Space → Choose the Hero file again → Name the created file as BSP_Hero (BSP stand for Blend Space)
Double click BSP_Hero file → Axis Setting:
Horizontal Axis name: Direction, Minimum Axis Value: -180, Maximum Axis Value: 180;
Vertical Axis name : Speed. min speed value: 0, max speed value: 600
Drag 3 basic animations (idle, walk, run at bottom, middle and top in the graph)
Can test the blended animations by press Shift with the +sign within the graph
Second, coding on blueprint animation:
Open AnimBP_Hero: Add code (Press Tab) : New State Machine (rename Hero State Machine) → Connect to Output Pose Result →
Double click on State Machine → Add State → Name as Idle/Walk/Run
→
Double Click Idle/Walk/Run → Drag BSP_Hero (created eariler) from Asset Browser (bottom R corner) to the graph (Reset Filter if don’t see the BSP_Hero) → Plug in Output Animation Pose → Compile
Now if input value between 0-600 of speed in the BSP_Hero green box and press compile, the action shows instantly in preview box
Third, input code to let the capsule always update at every single moment in time, so animation gets update in real time:
In Event Graph: Type Cast to ThirdPersonCharacter, plug to Even Blueprint Update Animation box, and add Get Player Character to Object....Add the remained following blueprint:
→ Add from VectorLength and Calculate Direction : Promote to Variable (become SET box), name as Speed, and Direction respectively → Plug those 2 SET as 2nd graph below:
Go back to Idel/Walk/Run BP page → Drag Speed icon in the graph (in Variables at Bottom L corner) → Get Speed → plug to Speed of BSP_Hero; Repeat the steps for Direction tab:
Modify the expression of side movement, walk to run, etc in Play mode:
Back to main page, click on the 3rd person character →Anim Class (In Animation menu, between Transform & Mesh of bottom R menu) → Choose AnimBP_Hero → Press play
Remark: If having walk/run of left, right front and back animations, can assign them in the graph of those points as below (based on x-axis as direction, y-axis as speed):
To show his side walk obviously, set the 3rd person character value to make the camera always follow his face direction (L/R/F/B):
In Character Movement (Rotation Settings) → Tick Use Controller Desired Rotation; Untick Orient Rotation to Movement:
To show walk speed change to run:
ThirdPersonBP folder → Blueprints → Double click ThirdPersonCharacter → Even Graph (leave those default blueprints) →
In empty space, Add Right Mouse button → Set Max Walk Speed (untick Context Sensitive box if don’t see such command) → duplicate it, set each of their speed as 150 and 600, connect to Pressed and Released mouse→
Drag Character Movement (L side of Components menu), plug to SET targets
(Now if hold R mouse during play, it shows walk animation)
To show jump:
In Content → ThirdPersonBP → Character folder (what I named) → double click AnimBP_Hero → Event Graph → Cast To ThirdPersonCharacter, add Is Falling (Binary checkbox pop up, for true/false statement, here means if he is in the air or not) → Promote to variable (red box), name as Jumping?
→ Connect the Jumping? tab to any SET tab, or else it won’t work
In Hero State Machine blueprint → Drag Jump animation, name as Jump state → Connect Idel/Walk/Run with Jump state by drag the arrow and see Create a transition sign →
Double click Transition Rule icon → Drag Jumping? Variable in graph → Get Jumping? → Add Equal tab, tick the box (mean true, equal to jump state) , then connect them together
Now he can jump but won’t stop, to make him only jump once and back to walk again:
Back to Hero State Machine graph, Add Transition sign on reverse direction → double click it → repeat the steps, but this time untick the Equal tab (mean false, not jump)
Blend/combine 2 materials into 1 for base color node:
Type Node “Linear interpolation” (appear as LEP node), then combine them together