Lyra ABP_Mannequin_Base

Lyra development goals

ABP_Mannequin_Base / Event Graph

AnimBP Tour #1 (also see ABP_ItemAnimLayersBase) This AnimBP does not run any logic in its Event Graph. Logic in the Event Graph is processed on the Game Thread. Every tick, the Event Graph for each AnimBP must be run one after the other in sequence, which can be a performance bottleneck. For this project, we've instead used the new BlueprintThreadsafeUpdateAnimation function (found in the My Blueprint tab). Logic in BlueprintThreadsafeUpdateAnimation can be run in parallel for multiple AnimBP's simultaneously, removing the overhead on the Game Thread.

ABP_Mannequin_Base / BlueprintThreadSafeUpdateAnimation

AnimBP Tour #2 This function is primarily responsible for gathering game data and processing it into useful information for selecting and driving animations. A caveat with Threadsafe functions is that we can't directly access data from game objects like we can in the Event Graph. This is because other threads could be running at the same time and they could be changing that data. Instead, we use the Property Access system to access data. The Property Access system will copy the data automatically when it's safe. Here's an example where we access the Pawn owner's location (search for "Property Access" from the context menu).

ABP_Mannequin_Base / AnimGraph

AnimBP Tour #3 This Anim Graph does not reference any animations directly. It instead provides entry points for Montages and Linked Animation Layers to play poses at certain points in the graph. This graph's main purpose is to blend those entry points together (e.g. blending upper and lower body poses together). This approach allows us to only load animations when they're needed. For example, a weapon will hold references to the required Montages and Linked Animation Layers, so that data will only be loaded when the weapon is loaded. E.g. B_WeaponInstance_Shotgun holds references to Montages and Linked Animation Layers. That data will only be loaded when B_WeaponInstance_Shotgun is loaded. B_WeaponInstance_Base is responsible for linking animation layers for weapons.

ABP_Mannequin_Base / AnimGraph / LocomotionSM

AnimBP Tour #4 This state machine handles the transitions between high level character states. The behavior of each state is mostly handled by the layers in ABP_ItemAnimLayersBase.

ABP_ItemAnimLayersBase / Event Graph

AnimBP Tour #5 As with AnimBP_Mannequin_Base, this animbp performs its logic in BlueprintThreadSafeUpdateAnimation. Also, this animbp can access data from AnimBP_Mannequin_Base using Property Access and the GetMainAnimBPThreadSafe function. An example is below.

ABP_ItemAnimLayersBase / Event Graph

AnimBP Tour #6 This animbp was authored to handle the logic for common weapon types, like Rifles and Pistols. If custom logic is needed (e.g. for a weapon like a bow), a different animbp could be authored that implements the ALI_ItemAnimLayers interface. Rather than referencing animation assets directly, this animbp has a set of variables that can be overriden by Child Animation Blueprints. These variables can be found in the "Anim Set - X" categories in the My Blueprint tab. This allows us to reuse the same logic for multiple weapons without referencing (and thus loading) the animation content for each weapon in one animbp. See ABP_RifleAnimLayers for an example of a Child Animation Blueprint that provides values for each "Anim Set" variable.