Commit Graph

308 Commits

Author SHA1 Message Date
Aaron Cox
695a69e8b7 Animation Locomotion Library: Common techniques for driving locomotion based character animation.
Included features in this changelist:
 * Capture a snapshot of common movement properties (velocity, speed, etc) that are used to drive animation
 * Character movement component for stop/pivot location
 * Library of anim node functions for Distance Matching
 * Template anim node that can advance by distance traveled rather than by time
 * Template anim node that's driven by distance to a target rather than by time
 * Animation modifier that generates distance curves based on root motion
 * Turn in place functionality for keeping the capsule from spinning the pose when it rotates by applying an offset, includes functionality for turn on spot animations to compenstate for the offset

#preflight 61446e46599fd80001c250e2
#review-17532442 @Koray.Hagen, @Thomas.Sarkanen, @Fernando.Coello
#fyi Laurent.Delayen

[CL 17551436 by Aaron Cox in ue5-main branch]
2021-09-17 09:42:58 -04:00
koray hagen
972c9dcdb9 #preflight 6143ef4681695600011c49a8
#rb braeden.shosa, aaron.cox, cesar.castro
#jira none

Motion Trajectory Component for Motion Matching:

Motion Trajectory Component notes:
1) Abstract component/interface implemented with prediction and history API.
2) Implemented uniform, frame-rate independent history sampling algorithm for retaining trajectory sample coherence.
3) Implemented concrete Character Movement Trajectory Component for encapsulating ground locomotion prediction algorithm and API.
4) Motion Trajectory blueprint library containing:
5) FlattenTrajectory2D algorithm for isolating and removing Z axis direction contribution from tracjectory.
6) ClampTrajectoryDirection for projecting trajectory samples into a discrete, allowed set of directions (such as cardinal).

Engine changes:
1) Implemented shared TrajectorySample, Range, and Domain structures for common usage among Motion Trajectory, Pose Search, and Blueprint.
2) Expanded Sequence Player blueprint library functionality for Scripted Motion Matching content example.

Pose Search changes:
1) Match Pose renamed to Pose History with minor configuration parameters.
2) Complete removal of approximated past trajectory sampling. This has now been pushed to the Motion Trajectory Component.
3) Motion Matching interface changes: Goal has been replaced with Trajectory and Dynamic Play Rate Adjustment has been encapsulated to an experimental code module and blueprint library. New defaults, and encapsulating settings.
4) Motion Matching changes: New Pose Search blueprint library which encapsulates core Motion Matching algorithm.
5) Unified Trajectory to Pose Feature Vector transformation algorithms.
6) Removal of temporary Pose Search Prediction blueprint library (now Dynamic Play Rate).
7) End-to-end implementation support for Past/Future Time and Distance domain schemas.

AnimInput changes:
1) Removal of AnimInput_CapsulePrediction (replaced with Motion Trajectory Component).

Gameplay Anim Gym changes:
1) Pose search database is now fully distance-based (history and future).
2) Character blueprint includes Character Movement Trajectory Component with distance-based domain setup.
3) Scripted Motion Matching anim node function prototype with Engine content example.
#preflight 6143ef4681695600011c49a8

[CL 17547347 by koray hagen in ue5-main branch]
2021-09-16 22:34:04 -04:00
aurel cordonnier
e3f7878676 Merge from Release-Engine-Test @ 17462327 to UE5/Main
This represents UE4/Main @17430120 and Dev-PerfTest @17437669

[CL 17463546 by aurel cordonnier in ue5-main branch]
2021-09-08 16:42:26 -04:00
Thomas Sarkanen
d27540628c Skeletal control BP function library
Also fixes type conversions (first time I have tried to convert to a base class and found that my IsChildOf check was the wrong way around).
Plus some extra accessors added for exec/update contexts.
Found the need for these when doing show & tell prep.

#rb Jurre.deBaare

[CL 17367354 by Thomas Sarkanen in ue5-main branch]
2021-08-31 09:30:01 -04:00
Max Whitehead
4bcac16e28 Fix FRigidBodyNodeSimulationTask not using TrackSubsequents giving null a FGraphEventRef causing threading crashes.
#jira UE-121283
#rb chris.caulfield

[CL 17144535 by Max Whitehead in ue5-main branch]
2021-08-11 20:07:44 -04:00
Max Whitehead
e1c09a5b9d Convert FParallelAnimationEvaluationTask to use taskgraph completion event for rigid body animation node.
Fixes anim task blocking on RB sim task and doing 0 work, now taskgraph schedules work and doesn't lock up extra threads.
#jira UE-120634
#rb chris.caulfield

[CL 17083918 by Max Whitehead in ue5-main branch]
2021-08-06 11:55:58 -04:00
aurel cordonnier
dc856801cd Merge from Release-Engine-Test @ 17059716 to UE5/Main
This represents UE4/Main @ 17030256 and Dev-PerfTest @ 17029914

[CL 17060422 by aurel cordonnier in ue5-main branch]
2021-08-04 17:46:20 -04:00
david corral
b134619056 Added EvalFromRefPose
#preflight 6109b7d157382600017c7129


#ROBOMERGE-SOURCE: CL 17039752
#ROBOMERGE-BOT: (v848-17036448)

[CL 17042180 by david corral in ue5-main branch]
2021-08-03 19:52:50 -04:00
john vanderburg
aa9321ff79 Fix in the weight based blend profiles, making them compatible with UE4 again. Thanks to Jose Villarroel and Caleb Longmire for finding this issue and diving in more.
#preflight 60f5c32f8da1560001c4cdeb

[CL 16888051 by john vanderburg in ue5-main branch]
2021-07-19 16:00:25 -04:00
aurel cordonnier
d17d20ca36 Merge from Release-Engine-Test @ 16758890 to UE5/Main
This represents UE4/Main @ 16738161 and Dev-PerfTest @ 16737719 (and Release-17.00 @ 16658211)

[CL 16763350 by aurel cordonnier in ue5-main branch]
2021-06-23 17:51:32 -04:00
Thomas Sarkanen
68e1ae10c9 Added pure conversion functions for anim node references
#rb Jurre.deBaare

[CL 16757174 by Thomas Sarkanen in ue5-main branch]
2021-06-23 10:58:34 -04:00
RyanyiNF
2ddf3768e1 PR #8160: Fix error case NaN while delta time is 0 (Contributed by RyanyiNF)
Fixes a case in RBAN where mesh component initialisation may pass through a zero delta time which can be used to divide in the calculation of a velocity when the node is set to inherit bone velocities.

#rb Benn.Gallagher
#jira UE-118618

[CL 16755554 by RyanyiNF in ue5-main branch]
2021-06-23 07:16:08 -04:00
Thomas Sarkanen
e94f925f48 Added more library functions for sequence players/evaluators
Fixed execution context conversion & added BP-exposed conversion funcitons

#rb Jurre.deBaare

[CL 16739992 by Thomas Sarkanen in ue5-main branch]
2021-06-22 04:50:11 -04:00
Thomas Sarkanen
38caea3a8e Improvements to anim node function calls
Split 'node context' into an 'evaluation context' and a 'node reference' type and updated regular function signatures when creating node functions. This way we can seperate concerns (and potentially reference anim nodes standalone in the future).
Moved function caller code into function ref file to stop AnimNodeBase bloat.
Fixed functions not being called on root nodes.

#rb Jurre.deBaare

[CL 16727107 by Thomas Sarkanen in ue5-main branch]
2021-06-21 07:54:03 -04:00
Thomas Sarkanen
2b033d861e Anim blueprint encapsulation improvements
Adds 'template' anim BP concept. These anim BPs have no TargetSkeleton and as such cannot have direct references to animations placed inside of their anim graphs
Adds function call support from anim nodes. All anim graph nodes can now call functions when initialized, updated, evaluated or when they first become relevant.
Relevancy is established using a new FAnimSubsystemInstance_NodeRelevancy which tracks nodes in a local map, per UAnimInstance, if nodes require it.
Functions are displayed on the node if bound, and in the details panel.
Added a new override point to FAnimSubsystemInstance to allow for WT init.
Moved FMemberReference customization into a public header so it can be used on anim node functions.
Wrapped functions up into FAnimNodeFunctionRef structure so they can be re-used more effectively. Converted CallFunction node to use them.
Added a couple of simple BP function libraries to demonstrate the use of the new FAnimNodeContext (this is intended to be a generic way of exposing FAnimNode_Base types to script without the node types themselves having to be known to script directly).
Added the ability to set exposed properties as 'always dynamic' so they appear in mutable data rather than being merged into constants. This allows for the anim node data API to be changed to be less strict (and more script friendly). Now values can be set in mutable data (via GET_MUTABLE_ANIM_NODE_DATA_PTR) and attempted sets to constant data can be ignored and reported to client code.
A few minor crash fixes with edge cases (inc when trying to open an asset editor fails because of a missing skeleton/cancellation).
Also fixes an issue where literal linked anim graph/control rig/custom poroperty node inputs didnt get copied

#rb Jurre.deBaare,Aaron.Cox

[CL 16703644 by Thomas Sarkanen in ue5-main branch]
2021-06-17 08:58:34 -04:00
Jurre deBaare
099fda26ce Change moment of initialization of Animation Attribute system - previously had a race-condition triggered through parallel eval
#jira none
#rb Thomas.Sarkanen
#preflight 60c368d69a5910000144d18e

[CL 16641483 by Jurre deBaare in ue5-main branch]
2021-06-11 10:50:44 -04:00
aurel cordonnier
e0ad4e25df Merge from Release-Engine-Test @ 16624776 to UE5/Main
This represents UE4/Main @ 16579691 and Dev-PerfTest @ 16579576

[CL 16625248 by aurel cordonnier in ue5-main branch]
2021-06-10 13:13:24 -04:00
bojan brankov
7c5f8992a1 Added new functionality to ModifyCurve anim node that allows curve manipulation via a name-value map
#jira UE-117365
#rb thomas.sarkanen

[CL 16622472 by bojan brankov in ue5-main branch]
2021-06-10 09:35:31 -04:00
aurel cordonnier
43fa62fcd8 Merge from Release-Engine-Test @ 16487383 to UE5/Main
This represents UE4/Main @ 16445039 and Dev-PerfTest @ 16444526

[CL 16488106 by aurel cordonnier in ue5-main branch]
2021-05-27 13:40:37 -04:00
Thomas Sarkanen
6adfe86822 Fix crashes, inconsistencies and performance issues with layered blend per bone node
Introduces a serial number to FBoneContainer that allows easier refreshing of bone-relative data. Eventually the overall CacheBones path could be superseded with lazy-update systems based on this serial number.

#jira UE-116464 - Layered blend per bone crash
#rb Jurre.deBaare

[CL 16466917 by Thomas Sarkanen in ue5-main branch]
2021-05-26 07:55:41 -04:00
Thomas Sarkanen
3e92b56aa0 Animation: thread-safe execution and property access improvements
"Call function" anim node:
- Adds the ability to call functions at different points in the anim graph execution (and under different conditions, e.g. when a branch has started blending in). Only thread-safe functions are allowed to be called.
- Adds a thread-safe override point BlueprintThreadSafeUpdateAnimation, called on worker threads for the main instance and for linked instances when they are relevant in the graph (only one call per frame for linked layer instances).

Subsystems:
- Added new override points pre/post event graph(s) (moved override point for worker thread work to around the thread safe update function call).

Improves property access integration:
- Property access now shows (and allows the user to override) the call site of accesses. This is to allow users to see when their property access calls will be made, hopefully making its use less confusing for power users.
- Tweaked UX for property access nodes and dropdowns.
- Anim node pins now have property access bindings in-line on the pin.

Also adds the abilility for the anim graph to opt-in (via a config flag) to more stringent thread safety checks. Disabled by default for now as this requires content fixup.

#jira UE-115745 - Anim Blueprint Encapsulation
#rb Jurre.deBaare

[CL 16434092 by Thomas Sarkanen in ue5-main branch]
2021-05-24 04:47:52 -04:00
timothy daoust
99a22c9539 Added animation mirroring to sequencer
#jira UE-115623
#rb thomas.sarkanen, max.chen, mike.zyracki

[CL 16393391 by timothy daoust in ue5-main branch]
2021-05-19 17:50:40 -04:00
danny chapman
e54fad360e Analysis for BlendSpace. Also includes:
Tweaks to the rendering of blendspaces, including separating the graph from the buttons
Context menu changes for the sample details
Changes to AnimationBlueprintLibrary and AnimPose from Jurre to help get the poses during analysis

#jira UE-114512
#rb thomas.sarkanen

[CL 16356830 by danny chapman in ue5-main branch]
2021-05-17 15:03:56 -04:00
koray hagen
c1b4f07a7a Fix for blendsplace player root motion evaluation. This underwent changes during experiements with custom attribute root motion sampling and slipped under the rug.
#jira UE-115461
#rb aaron.cox, thomas.sarkanen

[CL 16355372 by koray hagen in ue5-main branch]
2021-05-17 13:38:32 -04:00
aurel cordonnier
8eebe8841f Merge UE5/RET @ 16305968 to UE5/Main
This represents UE4/Main @ 16261013 and Dev-PerfTest @ 16259937

[CL 16306996 by aurel cordonnier in ue5-main branch]
2021-05-12 18:10:03 -04:00