Unreal Products:Amplify Animation Pack/Manual

From Amplify Creations Wiki
Jump to: navigation, search

Manual - Animation Catalogue

What's in the Package

Amplify Animation Pack includes a varied collection of 280 animations for third-person projects, a starter Character Controller, and Blender source files. Entirely built with Blueprints, you can start using with just a few simple steps.


Demo Character and Rig

ap3.png

Character Mesh

Triangles - 19,180
Vertices - 57,480
ap2.png

Rig

Bones - 55

Animation Catalogue

Video Reference: Amplify Animation Pack Overview #1

Collection details available in its dedicated page: Animation List

Blender Source

This pack includes the Blender Source project used to create all animations; you may adjust and re-export them as necessary.

In addition to the project and editable animation content, it also includes a few scripts and the appropriate required rigs for Unreal use.

Demo Scene

A simple level with the core Actors already set up, it's the perfect playground to test the available animations.

Level.jpg

How to use

Quick Start Instructions

Before you add the Amplify Animation Package to your Unreal Project, consider if you're going to use the included Character Controller or just the provided Animations with your own characters. Using the starter Character Controller requires additional configuration steps in order to ensure that everything works as expected. You can skip this step if you just want to use the animations without our Character Controller, scroll down to the Retargeting Instructions for instructions on how to do so.

Project Configuration with Character Controler

1. On the Unreal Vault, Add the Amplify Animation Pack to your project.

2. Go to your project Content Folder, Amplify Animation Pack, and locate the file AmplifyConfig.Zip file, here you'll find the Input.ini and Collision.ini file.

3. Import the Input.ini file to your Project Settings’ “Engine - Input” window, this will change your Input settings to the ones required for the “Character_BP”.

This will add the following Action Mappings:
  • Jump
  • Interact
  • LightAttack
  • HeavyAttack
  • Dodge
  • LockOn
This will add the following Axis Mappings:
  • MoveForward
  • MoveRight
  • Turn
  • LookUp
  • Sprint
  • Crouch

bp_5.jpg

4. Import the Collision.ini file to your Project Settings’ “Engine - Collision” window. Attention: for these changes to take effect you have the Unreal editor.

This will set your Object Channels to the ones required for the collisions/overlaps/traces in the “Character_BP”. These are the following:
* Detector_Player - used for interactable actors to detect the player.
* Col_Hitbox - used for the combat, to represent hitboxes.
* Col_Hurtbox - used for the combat, to represent hurtboxes.
* Hang_WallPoint - used for the WallPointActor interactable actor.

bp_6.jpg

5. Drag and drop the “Character_BP” Blueprint class onto your level; alternatively, skip Step 7 and open de included DemoScene level to start playing immediately.

bp_7.jpg

6. When using a new scene, select the Character and scroll down to Pawn, you'll need to set the Auto Possess Player option to Player 0 or any other you may require. Instead of scrolling down, you can use the Search Box to quickly find parameter.

bp_9.jpg

7. Drag and drop any Contextual Actions you want using the rules specified in the contextual actions section. This refers specifically to the action you execute such as climbing or opening a door. Below is an example of the default climb actor.


bp_8.jpg

NOTE: If you're only using the animations with your own content, the Blueprints and additional content pertaining to the Character Controller is not required.

Input Mappings

The following table provides a list of all the actions and inputs available in the Character Controller.

Debug Keyboard Description
Debug Mode X Debug gizmos an other relevant info.
Slow Motion Tab Enables debug slow motion mode.
Playground P Teleports the player to the end section "Playground" area.
Action Keyboard and Mouse Gamepad
Movement W/A/S/D or Up/Down/Left/Right, Arrows Left Analog stick
Camera Rotation Mouse Rotation Right Analog stick
Sprint Left Shift Left Analog button (L3)
Crouch Left Ctrl Gamepad Face Button Right
Jump Spacebar Gamepad Face Button Bottom
Interact E Gamepad Face Button Left
Roll/Dodge Middle Mouse Button Gamepad Left Shoulder
Light Attack Left Mouse Button Gamepad Right Shoulder
Heavy Attack Right Mouse Button Gamepad Right Trigger
Lock-On Q Gamepad Left Trigger

Using the Animations on your own Characters (retargeting)

To use the included animations on your own characters you'll have to retarget the animations from the Amplify character.

Before you proceed, be sure to check the official Unreal Engine retargeting documentation if you're unfamiliar with the process.

Animation Retargeting UE Documentation
Retargeting UE Video Tutorial

1. Import the SK_Mannequin and double click the SK_Mannequin_Skeleton.

apu_1.png

2. You should see this window, click on the right apply to asset.

apu_3.png

3. Go to:

Select Rig - Select Humanoid Rig
Check if the names match; Root - root, pelvis - pelvis, etc.
For fingers and other advanced setups you need to click Show Advanced
apu_5.jpg apu_4.jpg

4. It's a good practice to ensure that rigs have matching poses. In our case we're using a T pose instead of an A pose; in this example we turn the bones visible and adjust our character bones to place him in T pose. With the character in T pose, go to Modify Pose - Use CurrentPose


apu_6.png apu_7.png

6. This character is ready so let's do the same for the other character we're going to use for the retargeting process. (don't forget to hit save)

apu_8.jpg

7. Repeat the same process with the new character.

apu_10.png apu_9.jpg
apu_12.png apu_7.png

2. Select the animations you want to exchange between rigs.

apu_13.png

3. Hit Retarget to conclude the process. A new animation asset will be created with the retarget animation. Retargeting is a great way to share animations between rigs, keep in mind that both rigs should have a similar pose for a successful retarget.

Character Controller

The Character Controller is a plug-and-play implementation of a character to be use on third-person projects. This implementation includes nearly all the animation provided in the pack and features a wide range of locomotion mechanics, actions and interactions. Do not that although the Swiming animation set is included, it's not currently implemented on this starter character system.

In this section you'll find a thorough explanation on how the Character Controller works and all of its technical details. This will include:

  • The Character’s Actions.
  • Character Controller blueprint architecture.
  • Rules and specifications for setting up contextual actions.

Character Controller Actions

Movement

In its default “GroundedState”, the character can move in all the major directions relative to the camera. In regards to rotation, the character will rotate according to the camera direction and the movement axis desired by the player. When locked-on, the character adopts a movement relative to its target; the Character is only able to strafe during this phase.
The character movement can be restricted to a single axis in states such as Cover; partially relative to the camera when Crawling or, as an example, not possible at all when in the air or in the AttackState.
Note that all of these movement types are governed by Root Motion. This means that the speed at which the character moves is dictated by the speed of the current movement animation and its Rate Scale(double click the corresponding Animation and go to the Rate Scale variable on the Asset Details panel).

Camera Rotation

The rotation of the camera follows its assigned Axis input. This can be inverted with the “isYInverted” variable of the “Character_BP” which, as we all know, is the superior way to play.

Sprint

The sprint mode is activated by holding the corresponding button while moving forward. This only works in situations where the character can actually move forward. As with basic movement, this is governed by Root Motion, meaning that the speed will change along with the Rate Scale value of the corresponding animation.
It should also be noted that the Sprint button is used in other states to trigger specific actions. One example of this is the Sideways Roll, executed by pressing the Sprint button while Crawling.

Crouch

The character can also go into a crouching pose when grounded. The capsule component height is reduced during this state but the same rules from the general movement still apply.
Like the Sprint, when in other states this action button can also produce different actions relative to the state active state of the character. Consider the barHang state, Crouching while hanging will make the character turn 180°.

Jump

As the name implies, the Jump action allows the character to jump. This can be done only from the “GroundedState” and will take into account the character’s velocity to calculate the jump trajectory. When activated in the crouching pose, this action will make the character enter the “CrawlingState” instead of jumping.
As the Sprint and Crouch actions, the Jump action will vary with the character’s current state. For example, when in the “CrawlingState” the Jump action will make the character go back to the default standing “GroundedState”.

Interact

The Interact action is a multi-purpose contextual action that triggers specific behaviors/states/actions depending on what object the character is interacting with. This is triggered by pressing the corresponding button near an interactable actor. The actor that the character interacts with is defined using a mix of colliders and linetraces/spheretraces and is represented by the objectToInteract variable in the “Character_BP” class.
As with the Sprint, Crouch and Jump actions, the Interact action will also trigger separate actions depending on the state that the character is in. One example of this would be exiting the BarHangState by letting go of the bar when pressing the Interact button.

Roll/Dodge

The Roll/Dodge action can only be executed when the character is on the default “GroundedState”. When executed, this action will take into account the character’s current movement direction to perform the action.
The difference between the Roll and Dodge comes to if the character is locked-on to a target when performing the action. The character will perform a Dodge when locked-on and a Roll when not locked-on to anything.

Light/Heavy Attack

The character can perform two types of Attacks, light and heavy. Each of these attack types has a dedicated button and can be performed when the character is in its default “GroundedState”. These attacks are performed in the direction that the character is facing. If the character has picked up a PickupActor beforehand, the Attack button will instead throw this same object.
One aspect that should be referenced when it comes to Attacks, is that you can execute combos. As such, and with two Light Attacks implemented, the character can execute a basic combo of Light Attack - Light Attack - Heavy Attack. The timing required for each attack can be found on the Animation Notifies of the animations themselves.
Although the basic attacks only work on the “GroundedState”, there are state specific attacks that the character performs when the button is pressed on other states. These attacks include the hang attacks when in the “HangState”, the plunge attack when in the “FallingState”, or throwing an object when in the “CoverState”.

Lock-On

Lock-On is an action that allows the character to always align itself to a specific target. This means that, once the lock-On is activated, the character's rotation will always be relative to its target.
As stated in the Movement action section, when this is activated the character will move by strafing around this target.
There are two extra aspects that should be noted regarding the Lock-On. The first one is that this action can only be activated from the “GroundedState”. The second is that, while in Lock-On, certain actions are not possible. This includes crouching, the free camera rotation and the contextual Interact action.

Character Controller Blueprint Architecture

The Character Controller is implemented fully using the Unreal Blueprints system. The BP class that defines the character is called Character_BP, a child class of UE’s Pawn class, and it encompasses the following aspects:

  • Class components.
  • Class customizable values and parameters.
  • How the class logic is implemented.

Character_BP Components

bp_1.jpg

  • CapsuleComponent: The character’s root component and the one that determines the world position of the character. It also handles all the basic character collisions such as bumping into walls or standing on the floor.
  • ArrowComponent: A basic component of the Pawn class, visible only in the class’s viewport.
  • Mesh: The Skeletal Mesh Component. It’s in this component Anim Class variable, found in the Animation section of the component Details panel, that the custom Animation Blueprint “Character_Anim_BP” can be found. This is what derives the animations workflow that govern the character.
The Mesh component contains the following child components
  • BarHang_CheckPos:An “empty” child Actor component used to check when the character goes into its BarHang state.
  • Cover_CheckPos:An “empty” child Actor component used to check when the character goes into its Cover state.
  • Hang_CheckPos:An “empty” child Actor component used to check when the character goes into its Hang state.
  • Bump_CheckPos:An “empty” child Actor component used to check when the character goes into its Bump state.
  • ArrowIndicator:An arrow that replicates the behavior of the ArrowComponent, but now visible in-game too.
  • CameraArm: The default SpringArm component that connects to the camera and enables its movement, lag and collision detection.
    • Camera: The camera that effectively renders the game.
  • Hitbox: A BoxCollision that’s used on the Combat system. Only generates Overlap Events and only affects objects/components of type Col_Hurtbox.
  • LockOnDetector: The Sphere Collision component used to detect when a certain object can be locked-on or not.
  • CharacterMovement: The Pawn component that enables UE’s character movement.

Character_BP Customizable Variables

bp_2.jpg

Variable Description
isYInverted Is the Camera Rotation inverted on its Y axis?
IdleRotationRate Rotation speed of the character when stationary
JogRotationRate Rotation speed of the character when running
SprintRotationRate Rotation speed of the character when sprinting
CrouchRotationRate Rotation speed of the character when crouching
CrawlRotationRate Rotation speed of the character when crawling
JumpVelocity Jump upwards velocity
JumpVelocitySecond Jump upwards velocity when doing a second jump (jump on ObstacleActor)
ClimbingTimeThreshold Time it gets for the character to stop climbing
GroundedAttackHitboxPosition Position of the hitbox when attacking on the ground
HangAttackHitboxPositionUp Position of the hitbox when attacking up while hanging
HangAttackHitboxPositionUpRight Position of the hitbox when attacking up-right while hanging
HangAttackHitboxPositionUpLeft Position of the hitbox when attacking up-left while hanging
HangAttackHitboxPositionRight Position of the hitbox when attacking right while hanging
HangAttackHitboxPositionLeft Position of the hitbox when attacking left while hanging
HangAttackHitboxPositionDown Position of the hitbox when attacking down while hanging
HangAttackHitboxPositionDownRight Position of the hitbox when attacking down-right while hanging
HangAttackHitboxPositionDownLeft Position of the hitbox when attacking down-left while hanging
ThrowForwardForce Forward force with which to throw objects
ThrowUpForce Upward force with which to throw objects
ThrowUpForceCover Upward force with which to throw objects while in cover
CameraDistanceDefault Default distance between the camera and the character
CameraDistanceSprint Distance between the camera and the character when sprinting
CameraDistanceCrouch Distance between the camera and the character when crouching
CameraDistanceCrawl Distance between the camera and the character when crawling
CameraLagSpeedDefault Default value for camera lag (delayed motion for additional smoothness)
CameraLagSpeedHeightFactor Value for camera lag when falling
CameraLagSpeedHang Value for camera lag when hanging
CameraPitchValueMin Minimum pitch value that the camera can be rotated to
CameraPitchValueMax Maximum pitch value that the camera can be rotated to
CameraHeightDefault Default height for the camera relative to the character
CameraHeightCrawl Height for the camera, relative to the character, when crawling
CameraHeightCrouch Height for the camera, relative to the character, when crouching

Character_BP Behavior

When it comes to the Character’s logic, the implementation starts on the “Character_BP” class itself.

You'll find the four main graphs here:
  • EventGraph: Main Character logic, including “BeginPlay”, “Tick”, and input processing events.
  • AdjustEvents: All the adjustment events such as the character position and rotation adjustments.
  • CollisionEvents: All the collision events are defined here.
  • DebugInputs: Auxiliary graph containing useful debugging inputs.

All graphs operate based on the character’s currentState variable. This variable refers to the custom CharacterStateBase class which, as its name implies, refers to the state that the character is in at any given time. This class is further detailed in the next section, CharacterStateBase class.

This blueprint is also home to all the Linetrace and Spheretrace functions related to the character, as well as several functions (mostly related to the camera) that are independent of the current state of the character.

CharacterStateBase Class

The CharacterStateBase is a class that represents any state that the character can be in. This class is of type Object, which means that it cannot be placed in a scene or have any visual/rendering components. With this, every state to be added to the system must inherit from this class.

This class has several functions related to specific events in the class:
  • EnterState: Triggered when the system enters this class.
  • ExitState: Triggered when the system exits this class.
  • UpdateState: Triggered every frame when the system is in this class.
  • UpdateStateAnimation: Triggered, in the Animation BP, every frame when the system is in this class.
This class also has functions triggered on every input action press/axis change:
  • Input_MoveForward
  • Input_MoveRight
  • Input_Sprint
  • Input_Crouch
  • Input_Interact
  • Input_LockOn
  • Input_Attack
  • Input_Jump
  • Input_Dodge

Additionally, this class also defines a charRef variable. This is a reference to the "Character_BP" that is assigned when the class is constructed, it's used to access everything related to the “Character_BP” that contains the state.

Contextual Actions

Actions that the player can execute are directly linked to interactable Blueprints created for the effect. The pack includes a varied collection of generic actors that serve as a starting point for your own game requirements.

bp_3.jpg

Action Actor
Bar Walk / Bar Hang BarActor
Climb / Short Climb ClimbActor
Cover CoverActor
Open / Close Door DoorActor
Push / Pull Lever FloorLever Actor / WallLeverActor
Vault ObstacleActor
Pickup Object PickupActor
Push Object PushableActor
Hang / Climb Down WallPointActor

All of these actors can be customized in their appearance, size and behavior. However, the colliders provided must be left untouched or, at the very least, replicated when it comes to their Object Channels and Responses. There are also some positioning rules to be followed in regards to certain actions of these contextual objects. This is required to better accommodate the animations provided.

State Actor to interact with Action Positioning Rule
BarHang BarActor Entering the BarHang state The BarActor must be 255,0 units above where the Player is standing
BarHang BarActor Jumping between bars The two BarActors must be 370 units apart
BarWalk BarActor Going from BarHang to BarWalk The BarActor width must be 0,3 units
Hang WallPointActor Jumping vertically or diagonally between WallPoints The two WallPointActors must be 193 units apart in terms of height (Z axis)
Hang WallPointActor Backwards jump WallPointActors must be 392 units between each other.

NOTE 1: When adding an actor to an existing level, keep in mind that you can add the required height values directly on the Actor Transform input box. Say that you add the Bar to your ground surface and now you want to increase its height, you simply need to add "+255" into its Z Axis and press Enter; this will ensure that the Actor is moved exactly 255 units up.

bp_4.jpg

NOTE 2: Modifying/replacing interactable meshes.

When checking for interactions, the character controller uses the provided classes (BP_ClimbActor, BP_ObstacleActor, etc.) to check for whether the object is interactable or not. From the screenshot, I've noticed that you're duplicating the class and changing the mesh there, and that is the issue here. Instead, there are three main ways to change the mesh of your interactables:

1. Change the mesh directly on the interactable class (for instance, on the BP_ClimbActor). This will make it so that the default mesh for this class is the new mesh that you assign here (WARNING: this may change the layout of the DemoScene level).

2. Change the mesh on the instance of the class. Here, you put the default class in your level and change the mesh on that actor instead. This is useful if you want to change your mesh on an actor-per-actor basis.

3. Create a new child class from our interactable. Instead of duplicating the BP class, you can instead create a child BP class from the interactables provided, and assign your own defaults this way. By doing this, you can have several classes that inherit our behaviour, and thus work with the current controller, while also having custom made looks, VFXs, components or aditional logic. This can be useful if you want to have several defaults of our classes (for instance, like a wall and a fence for the BP_ClimbActor with its own custom meshes and effects).

You can also "ignore" our meshes, and use a separate actor for the mesh, while using our actors for the collisions. While this may lead to a very messy scene in the long run, it can be quite useful when prototyping and using UE's BSP system, for example!

Blender Source

Overview

Source files are located under the Content folder, Amplify_AnimationPack.zip.

The Scene contains the control rig and the export rig (SK_Mannequin Collection)

Control rig contains the NLA animation data.
The SK_Mannequin is the required Unreal skeleton hierarchy and should be used to export your data.
Animations are stored in the NLA layers, you can access them via Nonlinear Animation.

bs_1.jpg

Here you'll find all the animations included in the pack, you can also search for them in the action editor.

bs_2.jpg

You can enter an animation by right clicking and Start Editing Stashed Action. The layer will turn green signifying that you can now edit it.

bs_3.jpg

Make sure you have the dope sheet open in Action Editor Mode.

bs_4.jpg

Press [N] to bring up the menu. You can use animation layer interpolation to work on existing motion.

bs_5.jpg

The control rig is based on Rigify so you'll have all the default properties and options.

bs_6.jpg bs_7.jpg

Scripts

The file contains 3 scripts.

bs_8.jpg

Action delete lets you delete actions by name, newer Blender versions already have this options. Since the rig was created in Blender 2.79 you have to load rig_ui.py, press run and select the rig_ui_fix.py, and press run to use IK snap and FK snap. If you don't do this step the IK to FK snap will throw an error

Export Settings

With the rig(root) and mesh(SK_Amplify_Character) selected, and the correct NLA strip active, Go to File - Export - FBX and use the following export settings. Make sure you only have one NLA toggled, also be sure to adjust the timeline to have the same time as the NLA; for example if the NLA has 30f and your timeline is at 50f, you should set it to 30f before exporting it to Unreal in order to avoid exporting the actual 50 frames.

bs_9.jpg

DISCLAIMER - Character Controller

The third-person system is meant to be used solely as a starting point for your own controller, it's a complement to the package but not a production ready option.