# Stridecraft Epic's Game Animation Sample (motion matching locomotion and traversal) on your own character: its skeleton, its size, in multiplayer. Right click the character's Skeletal Mesh, pick **Convert Game Animation Sample to This Character**, and about an hour later there is a pawn that walks, runs, crouches, vaults, mantles and climbs with that character. - **Any biped skeleton.** The skeleton is read by its shape, not by bone names: the legs are the two long chains that reach the floor, the arms the two that come off the chest. Epic's mannequins, Mixamo rigs and Blender game rigs (Quaternius style, with the feet as IK controls outside the leg) all go through the same click. - **The rig is fixed before the retarget.** Feet that are IK controls are moved under the shin, a missing hand bone is added, a root that is rotated or off the origin is set straight. All on a copy: your mesh is not touched. - **Feet on the floor.** The legs are retargeted with IK, the goal height comes from the mannequin's foot times the size factor, and the offset is calibrated on the idle. On the test characters the planted foot sits 0.2 cm from the reference pose (median over 695 clips), none more than 2 cm off. - **Arms that keep their shape.** The hands follow the mannequin's hand height by IK, and the elbow is bent in the retarget pose to the mannequin's angle, so a rig modeled with straight arms does not get its elbows bent backwards. - **Traversal at the character's size.** The sample measures ledges in centimeters of the mannequin: the `attach` bone, the `Distance_From_Ledge` curve and the height ranges of the traversal chooser. All of them are scaled, so a 94 cm character ends a mantle on the edge (2 cm above the top, the same as the mannequin) and does not try a wall it could never reach. - **The pawn at the character's size.** Walk, run, sprint and crouch speeds, the capsule, the mesh under it and the step height are scaled with the character, so motion matching finds the clips it expects. - **Multiplayer guard.** With lag, the sample's traversal can leave a character flying for good: the server ends the montage before the owning client and keeps its flying movement mode. **Stridecraft Traversal Guard**, added to the converted pawn, puts it back on the ground. Tested with a listen server and two clients under lag: 6 traversals out of 6. - **Same clip on every screen.** **Stridecraft Pose Sync** sends the owner's clip and time, and the **Follow Owner** node plays them on the other players' screens. Under lag the other players saw the owner's clip 94% of the time, against 58% to 85% without it. ## Requirements - Unreal Engine 5.7 or 5.8, with the Game Animation Sample of the same engine version. The 5.6 sample keeps its traversal inside the pawn, and a converted character does not finish a mantle or a climb there yet, so 5.6 is not supported. - The **Game Animation Sample** in the project (Fab, free, by Epic Games). The conversion copies from it and never changes it. - **Python Editor Script Plugin**, **IK Rig**, **Pose Search** and **Blend Stack**: engine plugins, enabled by the plugin. - A biped Skeletal Mesh with two legs and two arms. Fingers, twist and corrective bones can be there or not. ## Start in 5 steps 1. Create a project from the **Game Animation Sample**, or add the sample to your project. 2. Copy `Stridecraft` into the project's `Plugins` folder and enable it. 3. Import your character as a Skeletal Mesh. 4. Right click the mesh in the Content Browser, **Convert Game Animation Sample to This Character**, and confirm. 5. When it says it is done, use `/Game/Stridecraft/<Name>/GASP/Blueprints/SandboxCharacter_CMC` as the default pawn, or as the parent of your own character. `<Name>` is the mesh's name without `SKM_` or `SK_` in front. ## What the conversion makes Everything goes into `/Game/Stridecraft/<Name>`: | Asset | What it is | |---|---| | `SKM_<Name>`, `SK_<Name>` | A copy of your mesh with its own skeleton, rig fixed (see above) | | `IK_<Name>` | The IK Rig: chains with the mannequin's names, one IK solver for the legs, one per arm | | `RTG_UEFN_to_<Name>` | The retargeter, calibrated on the idle | | `GASP/` | The sample's animation data copied and pointed at your character: 788 clips, pose search databases and schemas, choosers, blend spaces, the anim blueprint, the traversal montages and logic, and the pawn | It runs in steps (copy, retarget, remap, relink, feet, scale, traversal, index), each with a progress bar. **Cancel** stops between steps. Converting the same mesh again goes on from where it stopped and redoes only what changed: a clip is retargeted again only if the retargeter is newer than it. Time: about 5 seconds per clip, so 60 to 90 minutes for the 788 clips on one editor. ## Python The click runs the same code you can call yourself: ```python import stridecraft.convert stridecraft.convert.convert('/Game/MyCharacter/SKM_Hero', 'Hero', clip_limit=30) ``` `clip_limit=30` retargets only 30 clips, for a quick look before the full run. Running it again without it finishes the rest. When something stops the conversion it raises `RuntimeError` with the reason. `unreal.SDCEditorLibrary.convert_mesh(path, name, 0)` works too. Unreal's Python binding gives back `None` when it fails, without the reason, so the call above is the better one for scripts. ## Blueprint nodes | Node | What it does | |---|---| | **Convert Mesh** | The whole conversion of a mesh, by package path and character name (editor only) | | **Convert Skeletal Mesh** | The same for a mesh asset, named the way the right click names it (editor only) | | **Find Converted Character Class** | The pawn a conversion made for a character name, or None (editor only) | | **Get Character Name For Mesh** | The folder name a mesh converts to | | **Scale Character Blueprint** | Scales a character blueprint's speeds, capsule and step height (editor only) | | **Insert Follow Owner Nodes** | Puts the Follow Owner node after each Motion Matching node of an anim blueprint (editor only) | | **Set Sync Enabled** | Turns Pose Sync on or off for every machine (call it on the owner or the server) | | **Get Owner Pose** | The clip, time, mirror and play rate the owner last sent | ## Components **Stridecraft Traversal Guard** (`SDCTraversalGuardComponent`). On the server and on the owning client, it watches the movement mode and the root motion of a traversal. When the montage is over and the character is still in the traversal's movement mode, it waits **Grace Seconds** (0.25 by default) and sets the walking mode back. **On Movement Mode Restored** fires when it does, with how long the character was stuck. **Guard Enabled** turns it off for a character that is meant to fly outside traversal. **Stridecraft Pose Sync** (`SDCPoseSyncComponent`). The owner sends the clip, time and play rate its motion matching picked; the other machines keep the latest one for the Follow Owner node. **Sync Enabled** is replicated: change it at runtime with **Set Sync Enabled**, and the proxies go back to their own motion matching. Both are added to the converted pawn by the conversion. To use them on another pawn, add them to it. ## Limits - Bipeds only. Quadrupeds and characters with more than two legs are out. - Heights scale with the character. A character at 55% of the mannequin climbs walls up to 55% of the mannequin's highest, the same way the mannequin does not climb a 4.5 m wall. - The arms reach by IK for the hand only. Props in the hands follow the hand; a two-handed grip is not kept. - The sample's Mover pawn is not converted, only the Character Movement one (`SandboxCharacter_CMC`). - A conversion needs about 3 GB free on the project drive and Play In Editor stopped; it checks both before it starts. ## The demo `/Game/StridecraftDemo/DemoLevel`: the sample's level with five characters on keys 1 to 5. Manny is the sample as Epic ships it. The other four were converted by the plugin: Lis (Blender game rig, feet as IK controls), the Zombie (Quaternius, 94 cm), a Mixamo-style rig with Hips as the top bone and no root, and the same rig at 1.45 times its size. A small course next to the start has the sample's three obstacles at 55%, the size of the small characters. ## Credits - Game Animation Sample and the mannequin: Epic Games. - Lis and the Zombie (Zombie Apocalypse Kit) and the Universal Animation Library mannequin used in testing: Quaternius, CC0. ## Support E-mail in the Fab listing. Say the engine version, the mesh's source (Mixamo, Blender, another store) and paste the Output Log lines that start with `SDCCONVERT` and `STRIDECRAFT`.