Skip to content

4. Procedural Control Rig

Klian edited this page Jan 27, 2023 · 15 revisions

Control Rig

With the introduction of Unreal Engine 5, Epic released a new set of tools for animation. The Control Rig can be used to control your Skeletal Mesh in real time. Each bone can be manipulated and transformed using a set of real-time instructions.

With the new update 3.2 a new node for any Control Rig has been introduced!

image

How to use it

  1. Open the Control Rig you want to use for your character and add the node to the solver

image

  1. Add the Control Rig node to your animation pipeline (to your Post Process Anim Blueprint for example)

image

LYRA

Setup

  1. Open the Lyra project and enable the UEGoreSystem plugin

image

  1. Go to Plugins->ShooterCore->Game and open "B_Hero_ShooterMannequin"

image

  1. Add the UEGoreSystem component and initialize it

image

image

  1. Fill the Data Structure

image

4.1 Remember to create a new Global AnimInstance for the Lyra Skeleton Asset

image

  1. Go to Content->Characters->Heroes->Mannequin->Rig and open "ABP_Manny_PostProcess" then add a Control Rig node to the end of the execution line and select the "CR_Mannequin_ProceduralGore" Control Rig contained in the plugin

image

5.1 Do the same for "ABP_Quinn_PostProcess"

image

  1. Now go to Content and search for "GCNL_Character_DamageTaken", open it

image

  1. In the Main EventGraph add the "ApplyGoreDamage" event

image

  1. Hit play and check if everything is fine, you should notice some issues we're going to fix in the next few steps

image

Invisible limbs

The cosmetic system used in Lyra relies on a master mesh which is invisible. Since that's the same mesh the gore system is gathering information from, all the limbs will be invisible by default.

  1. Go to Plugins->ShooterCore->Game and open "B_Hero_ShooterMannequin"

  2. Search for "On Character Parts Changed" event

  3. Use the new function "SetVisualMeshComponent" to assign the cosmetic Skeletal Mesh Component to the GoreSystem each time a new one is created.

image

Stop the blood

By default, when you die during a match in Lyra, your character will "dissolve" but everything attached to it will remain, blood emitters included.

image

  1. Go to Plugins->ShooterCore->Game and open "B_Hero_ShooterMannequin"

  2. In the "Components" panel select "Health Component"

image

  1. In the Details panel locate the Events section and press + near "OnDeathStarted"

image

  1. Use the new function "DestroyAllAttachedGoreFXs"

image

  1. While disappearing, the skeletal mesh can still be hit by projectiles. If that happen, new blood emitters will be spawned. To avoid that, deactivate the plugin after you destroy all the emitters.

image

I keep losing my weapon

Yeah, it sucks. The only reasonable solution for me here is to exclude "upperarm_r", "lowerarm_r" and "hand_r" from the dismembrable bone list.

Video

Demonstration

Setup Process