Commit Graph

371 Commits

Author SHA1 Message Date
aurel cordonnier
a6e741e007 Merge from Release-Engine-Staging @ 17915896 to Release-Engine-Test
This represents UE4/Main @17911760, Release-5.0 @17915875 and Dev-PerfTest @17914035

[CL 17918595 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-25 20:05:28 -04:00
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04:00
aurel cordonnier
69fe095547 Merge from Release-Engine-Staging @ 17636544 to Release-Engine-Test
This represents UE4/Main @17638339 and Dev-PerfTest @17636504

[CL 17638842 by aurel cordonnier in ue5-release-engine-test branch]
2021-09-27 19:54:25 -04:00
braeden shosa
52f0ab0c20 PoseSearch: New weighted metric for pose similarity
Scoring weights can now be specified at several levels of abstraction.
  Channel: Pose weight vs trajectory weight.
  Horizon: History weight vs prediction weight.
  Type: Weights per feature types, such as positions and velocities.

Weights are normalized at each of these levels. So ultimately the weights that
make up all channels of a weights group will sum to 1 (or zero if entirely disabled).

Several new concepts were introduced for this system that aren't fully
formalized. Channels aren't a concrete data type, but I'm imagining we'll head
in that direction where a Schema is made up of Channels which themselves contain
sampling paramters like time/distance offsets and what to sample. The weights
system sets itself up in such a way to effectively pretend channels exist.

Similarly, horizons aren't an explicit data type either and the weights system
pretends they sort of are for presenting this high level concept of past vs future
weight to the user.

I have removed the previous weighting system including per sequence weights.
This feature will be replaced by a grouping system for databases in the future.
Groups will be collections of sequences and a set of weights for that group.
This is why the WeightsContext contains an array of 1 group of weights-- it's
setup that way to vector the implementation toward groups.

Speaking of the WeightsContext, the motion matching node holds onto one and
updates it every frame. This is in order to support changing weights at
runtime. There are a set of dynamic weight parameters that can be used to scale
the weights of all weight groups within a database. The WeightsContext tracks
the prior dynamic weight params and knows if the weights buffer needs to be
recomputed or not. So most of the time, updating the WeightsContext is a no-op.
In the future we'll need to add support for interpolating changes to dynamic
weights to avoid abrupt scoring changes.

#preflight 614452dd568b3a00013ee9cb
#rb cesar.castro
#jira none

#ROBOMERGE-AUTHOR: braeden.shosa
#ROBOMERGE-SOURCE: CL 17555406 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17555422 by braeden shosa in ue5-release-engine-test branch]
2021-09-17 14:12:00 -04:00
aaron cox
e3f123688b 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
[at]Koray.Hagen, [at]Thomas.Sarkanen, [at]Fernando.Coello
[FYI] Laurent.Delayen

#ROBOMERGE-AUTHOR: aaron.cox
#ROBOMERGE-SOURCE: CL 17551436 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17551464 by aaron cox in ue5-release-engine-test branch]
2021-09-17 09:44:41 -04:00
koray hagen
7952f73fdc #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

#ROBOMERGE-AUTHOR: koray.hagen
#ROBOMERGE-SOURCE: CL 17547347 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17547352 by koray hagen in ue5-release-engine-test branch]
2021-09-16 22:34:27 -04:00
aurel cordonnier
7f517562d5 Merge from Release-Engine-Staging @ 17438845 to Release-Engine-Test
This represents UE4/Main @17430120 and Dev-PerfTest @17437669

[CL 17439044 by aurel cordonnier in ue5-release-engine-test branch]
2021-09-06 12:23:53 -04:00
thomas sarkanen
8866bf02ae Fixed ensure/crash when using details panel to edit multi way blend weights
#jira UE-122147 - Ensure/Crash: Anim graph multi blend
#rb Jurre.deBaare

#ROBOMERGE-SOURCE: CL 17367747 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17367749 by thomas sarkanen in ue5-release-engine-test branch]
2021-08-31 09:57:33 -04:00
thomas sarkanen
4bed39e4c1 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

#ROBOMERGE-SOURCE: CL 17367354 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17367419 by thomas sarkanen in ue5-release-engine-test branch]
2021-08-31 09:33:17 -04:00
max whitehead
b42ad9e831 Fix FRigidBodyNodeSimulationTask not using TrackSubsequents giving null a FGraphEventRef causing threading crashes.
#jira UE-121283
#rb chris.caulfield

#ROBOMERGE-SOURCE: CL 17144535 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17144536 by max whitehead in ue5-release-engine-test branch]
2021-08-11 20:07:54 -04:00
max whitehead
d76a1dee6a 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

#ROBOMERGE-SOURCE: CL 17083918 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v853-17066230)

[CL 17083927 by max whitehead in ue5-release-engine-test branch]
2021-08-06 11:56:30 -04:00
david corral
2ca1c37171 Added EvalFromRefPose
#preflight 6109b7d157382600017c7129

#ROBOMERGE-SOURCE: CL 17039752 via CL 17042180
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v848-17036448)

[CL 17042442 by david corral in ue5-release-engine-test branch]
2021-08-03 19:58:21 -04:00
aurel cordonnier
dc4bf61540 Merge from Release-Engine-Staging @ 17030559 to Release-Engine-Test
This represents UE4/Main @ 17030256 and Dev-PerfTest @ 17030553

[CL 17031509 by aurel cordonnier in ue5-release-engine-test branch]
2021-08-03 11:56:47 -04:00
jurre debaare
3537267420 Undo 16922496 - issue was red-herring caused by content:
Crash using ControlRig in Sequencer
#info save/use cached pose nodes are not correctly invalidated/refreshed due to ControlRig edit mode invoking evaluation of the same anim instance multiple times per frame
#fix ensure that various counters used for synchronization/invalidation of cached data are used by ControlRigLayer proxy - and applied whenever update/evaluating the source "input" proxy

#ROBOMERGE-SOURCE: CL 16927983 via CL 16928005
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 16928022 by jurre debaare in ue5-release-engine-test branch]
2021-07-22 14:14:35 -04:00
jurre debaare
11edf1ea3e Crash using ControlRig in Sequencer
#info save/use cached pose nodes are not correctly invalidated/refreshed due to ControlRig edit mode invoking evaluation of the same anim instance multiple times per frame
#fix ensure that various counters used for synchronization/invalidation of cached data are used by ControlRigLayer proxy - and applied whenever update/evaluating the source "input" proxy
#rb Martin.Wilson
[FYI] Mike.Zyracki, Halfdan.Ingvarsson

#ROBOMERGE-SOURCE: CL 16922496 via CL 16926362
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16926740 by jurre debaare in ue5-release-engine-test branch]
2021-07-22 13:12:55 -04:00
john vanderburg
beef6dba03 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

#ROBOMERGE-SOURCE: CL 16888051 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16888104 by john vanderburg in ue5-release-engine-test branch]
2021-07-19 16:04:27 -04:00
thomas sarkanen
d27ce9ae95 Removing Initialize and Evaluate functions
For now, removing these as their semantics are due to change
Also converting Update and Become Relevant functions to use more-devived-typed update context (less casting required)

#rb Jurre.deBaare

#ROBOMERGE-SOURCE: CL 16771205 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16771237 by thomas sarkanen in ue5-release-engine-test branch]
2021-06-24 08:31:18 -04:00
thomas sarkanen
8dd75d3cc0 Added pure conversion functions for anim node references
#rb Jurre.deBaare

#ROBOMERGE-SOURCE: CL 16757174 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16757191 by thomas sarkanen in ue5-release-engine-test branch]
2021-06-23 10:59:16 -04:00
RyanyiNF
bceff98542 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

#ROBOMERGE-SOURCE: CL 16755554 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16755562 by RyanyiNF in ue5-release-engine-test branch]
2021-06-23 07:17:56 -04:00
jurre debaare
fab69e6d08 Ported project specific scriptability UFunctions to Engine:
- SetPreviewSkeletalMesh to UAnimationAsset and UAnimBlueprint
- Functionality to retrieve UAnimationGraphs and UAnimationGraphNodes of a specific class from UAnimBlueprint and UAnimationGraph respectively
- Functionality for pose driver/asset scripting

#jira UE-117797
#rb Thomas.Sarkanen
#preflight 60d075e32ab218000115936a
#preflight 60d1a3eaa819040001397a52

#ROBOMERGE-SOURCE: CL 16741838 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16741845 by jurre debaare in ue5-release-engine-test branch]
2021-06-22 08:26:20 -04:00
thomas sarkanen
376e9e0f35 Missed file
#rb none

#ROBOMERGE-SOURCE: CL 16740070 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16740200 by thomas sarkanen in ue5-release-engine-test branch]
2021-06-22 05:54:49 -04:00
thomas sarkanen
38a990e8d5 Added more library functions for sequence players/evaluators
Fixed execution context conversion & added BP-exposed conversion funcitons

#rb Jurre.deBaare

#ROBOMERGE-SOURCE: CL 16739992 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16739994 by thomas sarkanen in ue5-release-engine-test branch]
2021-06-22 04:50:29 -04:00
aurel cordonnier
02c0f425e8 Copy up from Release-Engine-Staging @ 16738359
This represents UE4/Main @ 16738161 and Dev-PerfTest @ 16737719

[CL 16738582 by aurel cordonnier in ue5-release-engine-test branch]
2021-06-22 00:27:54 -04:00
thomas sarkanen
da77f53ebc 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

#ROBOMERGE-SOURCE: CL 16727107 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16727111 by thomas sarkanen in ue5-release-engine-test branch]
2021-06-21 07:54:47 -04:00
thomas sarkanen
cecebd0cf8 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

#ROBOMERGE-SOURCE: CL 16703644 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16703653 by thomas sarkanen in ue5-release-engine-test branch]
2021-06-17 08:59:23 -04:00