Commit Graph

446 Commits

Author SHA1 Message Date
Josie Yang
6b15506e58 Replace direct access to SkeletalMesh object from USkinnedMeshComponent with GetSkeletalMesh function
#rb kriss.gossart
#preflight 62aafc9ada0af39a4783930a

[CL 20686007 by Josie Yang in ue5-main branch]
2022-06-16 09:14:04 -04:00
Marc Audy
de2c3cb8e0 [Backout] - CL20593017, 20594056, 20625634, 20645670, 20649179, 20649223, 20649380, 20658535
Add new custom version to specify a certain window of AnimSequences are not loadable
#fyi Jurre.deBaare
#robomerge EngineMerge
Original CL Desc
-----------------------------------------------------------------
**New**
- Engine
	- IAnimationDataModel interface
- AnimationData plugin
	- AnimSequencerDataModel, sequencer based implementation of IAnimationDataModel
	- AnimSequencerDataController, controller for above (implementation of IAnimationDataController)
- Added FCompressedRichCurve::PopulateCurve, allowing users to convert back to a FRichCurve for validation/debugging
- Added DefaultFrameRate to AnimationSettings, this replaces the hardcoded 30FPS in code
- Added ::GetKeyIndicesFromTime which takes FFrameRate
- Added AnimSequenceBase::OnAnimModelLoaded, this is required for correct postloading behaviour of data model (specifically AnimSequencerDataModel, as it depends on data from its outer ? anim sequence)
- Added IAnimationDataModel ::Evaluate which now takes responsibility for evaluating raw animation bone, curve and attribute data. And moved all trackbased evaluation code into AnimDataModel.cpp
- Added a.ForceEvalRawData allowing to force evaluation of source data
- Added a.SkipDDC to force compressing animation data locally

**Changed**
- Reparent UAnimDataModel to IAnimationDataModel interface, and rejig behaviour
- AnimSequenceBase now reference AnimDataModel as IAnimationDataModel
- Upgrade path for legacy to IAnimationDataModel and existing UAnimDataModel to IAnimationDataModel through IAnimationDataController::PopulateWithExisting
- IAnimationDataModel data is now frame(number/rate/time) based rather than seconds/keyindices. This enforces frameborder aligned data from now on.
- Moved RichCurve evaluation code from RichCurve.cpp to separate file and consolidated all instances of copy-pasta behaviour
- Updated/removed deprecated EngineTests around AnimSequences
- Changed many instances to use a FFrameTime together with a known FFrameRate versus seconds and sequencelength in float involving frame \/ time calculations (including instances of FAnimKeyHelper)
- Switched anim sequence evaluation to use double in Extraction context for time value and patched up places with static\_cast\<double\>
- FRichCurve::Eval
	- Make sure we always evaluate keys when T >= Key0.Time and T <= KeyN.Time to deal with crazy userweighted tangents
- Fixed WeightedKeyDataAdapter::GetKeyInterpMode/GetKeyTangentWeightMode retrieving invalid values, as it was indexing according to KeyIndex rather than KeyIndex\*2. This made it so that values were misinterpreted.
- Fixed WeightedEvalForTwoKeys for compressed data retrieving GetKeyInterpMode and GetKeyTangentWeightMode using the wrong index value. As they are not indexed using KeyDataHandle type.
- Fixed issue where compression could crash when containing zero-key scale additivebase track (tries to retrieve)
- Replaced instances of NULL with nullptr
- Moved required decompression information into FAnimSequenceDecompressionContext and reimplemented decompression within UE::Anim::Decompression namespace and new file
- Deprecated ::GetRawDataGuid and replaced with GetDataModel()->GenerateGuid()
- Fixed UAnimStreamable evaluation/compression (previously broken with MVC refactor)
- Updated Animation exporting pipeline to be frame-based rather than seconds
- Deprecated RetargetPose, replaced with FRetargetingScope (used within AnimModel::Evaluate)
- Fixed BaseAdditiveAnimation array become invalid/incorrect when removing zero-additve tracks during compression
- Updated EngineTest animation sequence related tests to new APIs (while maintaining deprecated path testing as well for now)
- AnimDataController / Animation Sequence tests now generate a USkeleton for the transient animation sequence (used to perform the test on)

**Removed**
- Unused file/class AnimData/AnimDataNotifyCollector.h

#rb Thomas.Sarkanen, Martin.Wilson, Alexis.Matte, Mike.Zyracki
#jira UE-131296
#preflight 62a308a8b0150a87f9d6891b

[CL 20677979 by Marc Audy in ue5-main branch]
2022-06-15 18:24:46 -04:00
thomas sarkanen
aa58e3e999 Updated categories of animation nodes & functions
Reorganized and consolidated for easier navigation

#rb Jurre.deBaare,Lucas.Dower
#jira UE-156715
#preflight 62a9ac0f13004691f97cd9da

#ROBOMERGE-OWNER: thomas.sarkanen
#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 20667777 via CL 20668358 via CL 20668456 via CL 20668474
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v955-20579017)

[CL 20669758 by thomas sarkanen in ue5-main branch]
2022-06-15 10:37:36 -04:00
keith yerex
3b10e76a02 Fix for SequenceEvaluator nodes not showing up in blend weights view
#rb Thomas.Sarkanen
#preflight 62a79e8df017fed6d24e642e

#ROBOMERGE-AUTHOR: keith.yerex
#ROBOMERGE-SOURCE: CL 20642100 via CL 20642107 via CL 20642108
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v955-20579017)

[CL 20644372 by keith yerex in ue5-main branch]
2022-06-14 06:50:13 -04:00
Jurre deBaare
e13fdba72c **New**
- Engine
	- IAnimationDataModel interface
- AnimationData plugin
	- AnimSequencerDataModel, sequencer based implementation of IAnimationDataModel
	- AnimSequencerDataController, controller for above (implementation of IAnimationDataController)
- Added FCompressedRichCurve::PopulateCurve, allowing users to convert back to a FRichCurve for validation/debugging
- Added DefaultFrameRate to AnimationSettings, this replaces the hardcoded 30FPS in code
- Added ::GetKeyIndicesFromTime which takes FFrameRate
- Added AnimSequenceBase::OnAnimModelLoaded, this is required for correct postloading behaviour of data model (specifically AnimSequencerDataModel, as it depends on data from its outer ? anim sequence)
- Added IAnimationDataModel ::Evaluate which now takes responsibility for evaluating raw animation bone, curve and attribute data. And moved all trackbased evaluation code into AnimDataModel.cpp
- Added a.ForceEvalRawData allowing to force evaluation of source data
- Added a.SkipDDC to force compressing animation data locally

**Changed**
- Reparent UAnimDataModel to IAnimationDataModel interface, and rejig behaviour
- AnimSequenceBase now reference AnimDataModel as IAnimationDataModel
- Upgrade path for legacy to IAnimationDataModel and existing UAnimDataModel to IAnimationDataModel through IAnimationDataController::PopulateWithExisting
- IAnimationDataModel data is now frame(number/rate/time) based rather than seconds/keyindices. This enforces frameborder aligned data from now on.
- Moved RichCurve evaluation code from RichCurve.cpp to separate file and consolidated all instances of copy-pasta behaviour
- Updated/removed deprecated EngineTests around AnimSequences
- Changed many instances to use a FFrameTime together with a known FFrameRate versus seconds and sequencelength in float involving frame \/ time calculations (including instances of FAnimKeyHelper)
- Switched anim sequence evaluation to use double in Extraction context for time value and patched up places with static\_cast\<double\>
- FRichCurve::Eval
	- Make sure we always evaluate keys when T >= Key0.Time and T <= KeyN.Time to deal with crazy userweighted tangents
- Fixed WeightedKeyDataAdapter::GetKeyInterpMode/GetKeyTangentWeightMode retrieving invalid values, as it was indexing according to KeyIndex rather than KeyIndex\*2. This made it so that values were misinterpreted.
- Fixed WeightedEvalForTwoKeys for compressed data retrieving GetKeyInterpMode and GetKeyTangentWeightMode using the wrong index value. As they are not indexed using KeyDataHandle type.
- Fixed issue where compression could crash when containing zero-key scale additivebase track (tries to retrieve)
- Replaced instances of NULL with nullptr
- Moved required decompression information into FAnimSequenceDecompressionContext and reimplemented decompression within UE::Anim::Decompression namespace and new file
- Deprecated ::GetRawDataGuid and replaced with GetDataModel()->GenerateGuid()
- Fixed UAnimStreamable evaluation/compression (previously broken with MVC refactor)
- Updated Animation exporting pipeline to be frame-based rather than seconds
- Deprecated RetargetPose, replaced with FRetargetingScope (used within AnimModel::Evaluate)
- Fixed BaseAdditiveAnimation array become invalid/incorrect when removing zero-additve tracks during compression
- Updated EngineTest animation sequence related tests to new APIs (while maintaining deprecated path testing as well for now)
- AnimDataController / Animation Sequence tests now generate a USkeleton for the transient animation sequence (used to perform the test on)

**Removed**
- Unused file/class AnimData/AnimDataNotifyCollector.h

#rb Thomas.Sarkanen, Martin.Wilson, Alexis.Matte, Mike.Zyracki
#jira UE-131296
#preflight 62a308a8b0150a87f9d6891b

[CL 20593017 by Jurre deBaare in ue5-main branch]
2022-06-10 06:24:32 -04:00
jose villarroel
d81534ce45 Added looping flag to anim sequences and blend spaces. This is used to set the default loop value when creating asset player nodes
#review-20570757 @Aaron.Cox, @Braeden.Shosa, @Thomas.Sarkanen
#jira none
#preflight 62a246ceb17fd2cd5a9ed6da

[CL 20583427 by jose villarroel in ue5-main branch]
2022-06-09 15:43:57 -04:00
Keith Yerex
3f027d59aa Fix ExpectsAdditive in MakeDynamicAdditive Node
#rb Thomas.Sarkanen
#preflight 62a22fdf415407fc4cd627eb

[CL 20581863 by Keith Yerex in ue5-main branch]
2022-06-09 14:33:25 -04:00
Benn Gallagher
8757cb3641 Physics interface cleanup.
* Removed deprecated or dead code paths
* Simplified build system setup for physics support
* Deprecated build system flags and unsupported macros

#jira none
#rb Chris.Caulfield, Kriss.Gossart
#preflight 62963ec0fe779f23c8ea0c5e

[CL 20450744 by Benn Gallagher in ue5-main branch]
2022-06-01 06:59:18 -04:00
thomas sarkanen
58c99c971c Fixed various issues with the revised re-instancing code path for anim BPs
Fixed RBAN not re-initialzing correctly on re-instancing - added a special case to reinit the simulation.
Made reinstancing handler virtual so users can add their own fallbacks in the future.
Fixed dynamic AnimGraphLayers not (un)linking correctly after live-recompile, as it was trying to link against the old (replaced) animation instance

#rb Jurre.deBaare
#preflight 628cf1dec97e4beea3a2f541

#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 20349883 via CL 20349893 via CL 20349912
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v948-20297126)

[CL 20352477 by thomas sarkanen in ue5-main branch]
2022-05-24 14:26:39 -04:00
robert manuszewski
f8a812a32f Converting hardcoded short class/enum names to pathnames ahead of ANY_PACKAGE removal
#rb trivial
#jira UE-99463
#preflight 6288fd998828ea88c8aef3d0

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 20314896 via CL 20314897 via CL 20314903 via CL 20314904
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v948-20297126)

[CL 20315214 by robert manuszewski in ue5-main branch]
2022-05-22 10:30:02 -04:00
frederick lupien
cde944102b Add GetRelevantAnimTimeRemaining & GetRelevantAnimTimeRemainingFraction to FAnimNode_StateMachine API
Add GetRelevantAnimTimeRemaining & GetRelevantAnimTimeRemainingFraction to AnimationStateMachineLibrary

[REVIEW] [at]Thomas.Sarkanen, [at]Aaron.Cox

#ROBOMERGE-OWNER: frederick.lupien
#ROBOMERGE-AUTHOR: frederick.lupien
#ROBOMERGE-SOURCE: CL 20278729 via CL 20278746 via CL 20278801 via CL 20278827
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20279575 by frederick lupien in ue5-main branch]
2022-05-19 09:57:01 -04:00
Max Chen
e26088ad53 Sequencer: Swap Root Bone with Component Root, Actor Root to put the root motion on the skeletal mesh component or the actor's root component.
#jira UE-113072
#preflight 626f2adf42539d7264367825
#rb mike.zyracki

[CL 20010505 by Max Chen in ue5-main branch]
2022-05-02 12:35:36 -04:00
Max Chen
92505924c4 Anim: Remove stray PRAGMA_DISABLE_OPTIMIZATION
#preflight 626ef2dd332a0b0e0b0a026d
#rb none
#jira none

[CL 20010484 by Max Chen in ue5-main branch]
2022-05-02 12:34:58 -04:00
christopher waters
dbede8cc23 AnimInstanceProxy.h dependency cleanup.
The original target was its include of AnimBlueprintGeneratedClass.h but more opportunities presented themselves.
Moved FNodeVisit and FAttributeRecord out of FAnimBlueprintDebugData so they could be forward declared.

#jira none
#rb steve.robb, thomas.sarkanen
#preflight 6269b3bef97c319bebbb7ded

[CL 19948162 by christopher waters in ue5-main branch]
2022-04-27 17:54:49 -04:00
braeden shosa
a08224d20c PoseSearch: Don't reset asset time when switching blend spaces in motion matching
#preflight 62685d9d2f53f9169a867b0a
#rb daniel.holden

[CL 19929211 by braeden shosa in ue5-main branch]
2022-04-26 17:22:41 -04:00
Max Chen
513caaf507 Sequencer: Added a new option, "Swap Root Bone With Component Root", to put the root motion on the skeletal mesh component.
When this option is enabled, the root bone is evaluated as usual, cached and then set to 0. The cached root bone transform is then set on the skeletal mesh component in FAnimSequencerInstanceProxy::PostEvaluate. If there is an existing transform track on the skeletal mesh component, however, the cached root bone transform is applied additively to that. Without this, the skeletal mesh wouldn't be able to be globally transformed by Sequencer.

Deprecated UpdateAnimTrackWithRootMotion so that it now takes FAnimSequencerData instead of each individual parameter separately.

#jira UE-113072
#preflight 6261a7a67d162829ae87670e
#rb mike.zyracki

[CL 19872424 by Max Chen in ue5-main branch]
2022-04-22 16:32:06 -04:00
thomas sarkanen
572b5fc0cd Fixed crash compiling a template animation blueprint with a layered blend per bone node in it
#jira UE-146422
#preflight 625ecdca3e0f6f80adb39d51
#rb Jurre.deBaare

#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 19845750 in //UE5/Release-5.0/... via CL 19846121
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v940-19807014)

[CL 19846531 by thomas sarkanen in ue5-main branch]
2022-04-21 06:46:05 -04:00
samuele rigamonti
5c829b13df Fix for LayeredBoneBlend improper handling of invalid curve weight values
[REVIEW] [at]Jose Villarroel
#preflight 624df9c3334cad33ce031e73

#ROBOMERGE-AUTHOR: samuele.rigamonti
#ROBOMERGE-SOURCE: CL 19656522 via CL 19657139 via CL 19657278
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19665914 by samuele rigamonti in ue5-main branch]
2022-04-07 04:38:07 -04:00
nick brett
63417968d2 [UE][FEATURE] RBAN Access to cloth colliders
- Rigid Body Animation Nodes can now add kinematic objects at runtime to represent any Cloth Colliders defined in a parent skeleton. This can be used to improve the behavior of  RBAN alternatives to cloth simulation (often used at lower LODs).
- There is a new Checkbox (called Use External Cloth Collision) on the RBAN node preferences panel to enable this feature .

[REVIEW] [at]Chris.Caulfield, [at]Kriss.Gossart
[FYI] [at]Charles.Anderson
#preflight 62419a0e4271438b073c931a

#ROBOMERGE-AUTHOR: nick.brett
#ROBOMERGE-SOURCE: CL 19525550 via CL 19525561 via CL 19525566
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v937-19513599)

[CL 19532620 by nick brett in ue5-main branch]
2022-03-28 16:24:16 -04:00
evgenii babinets
ea2b43fcf0 Fixing CIS warning for AnimNode_RigidBody and initializing it to default.
#rb jordan.cristiano

#ROBOMERGE-AUTHOR: evgenii.babinets
#ROBOMERGE-SOURCE: CL 19483684 via CL 19484981 via CL 19486898 via CL 19496784 via CL 19497168
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v936-19480137)

[CL 19498484 by evgenii babinets in ue5-main branch]
2022-03-24 13:30:10 -04:00
evgenii babinets
45d1b35de8 Added a flag on RigidBody AnimNode to allow it to use synchronous physics simulation. Renamed the CVar to reflect that it's the project default, not an override.
#rb andrew.ladenberger
[FYI] randall.hess, dae.han, harry.boltz

#ROBOMERGE-AUTHOR: evgenii.babinets
#ROBOMERGE-SOURCE: CL 19482937 via CL 19484049 via CL 19486673 via CL 19496583 via CL 19497072
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v936-19480137)

[CL 19498475 by evgenii babinets in ue5-main branch]
2022-03-24 13:29:40 -04:00
daniel holden
20bcdbfe5f Added WithPureVirtual trait to FAnimNode_BlendSpacePlayerBase to fix compilation errors on NoPCH build configuration.
#rb thomas.sarkanen
#jira UE-146643
#preflight 6238c88b7b69b01ec1426452

[CL 19456288 by daniel holden in ue5-main branch]
2022-03-21 15:09:22 -04:00
daniel holden
e7a99d3aaf Blend space support for Motion Matching
#rb braeden.shosa, thomas.sarkanen, timothy.daoust, aaron.cox
#jira UE-133724
#preflight 62348d933f685c2b421e9c39

[CL 19435264 by daniel holden in ue5-main branch]
2022-03-18 10:45:08 -04:00
nick brett
7e1eab27e2 [UE][Feature] RBAN Better Debug Draw - 2nd attempt
- Added Debug Visualization of physics bodies and constraints for RBAN nodes in AnimBP editor
- Added checkboxes to filter debug Visualization to Phat skeleton tree
- Created a new PhysicsAssetRenderSettings class that incorporates the debug rendering and filtering settings from Phat
- Created a new PhysicsAssetRenderUtilities namespace that incorporates the debug rendering and filtering code from Phat
- Synchronize debug visualization of physics bodies and constraints between Phat and AnimBP editors

oringinaly submitted as cl-19242421 but failed on non-unity build so backed out

#rb [at]Chris.Caulfield, [at]Thomas.Sarkanen, [at]Cedric.Caillaud
#preflight 6221e57d335298c3145112d1

#ROBOMERGE-OWNER: nick.brett
#ROBOMERGE-AUTHOR: nick.brett
#ROBOMERGE-SOURCE: CL 19283727 via CL 19295417 via CL 19304854 via CL 19304870
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19347122 by nick brett in ue5-main branch]
2022-03-10 21:02:14 -05:00
lucas dower
e143a6672a Fix for incorrect behavior in Spline IK node
#jira UE-143518
#rb thomas.sarkanen
#preflight 621f48eb31454c90ccf5ecd2

[CL 19220561 by lucas dower in ue5-main branch]
2022-03-02 08:10:35 -05:00