Swarm review [at] https://p4-swarm.epicgames.net/reviews/25771279https://horde.devtools.epicgames.com/job/6480c6078417d79259d7b71c
Added functionality to strip at ratios higher 1 out of every 2. testing shows good savings at stripping 2/3 frames on NX64 and in editor of around 8mb with no noticeable visual degradation.
Works through the VariableFrameStripping object that is a member of the AnimSequence.
Fixed issue with valkyrie
[CL 25857620 by nick baltis in ue5-main branch]
#rnx
[FYI] nick.baltis
Original CL Desc
-----------------------------------------------------------------
Variable Frame Stripping
Swarm review [at] https://p4-swarm.epicgames.net/reviews/25771279
Added functionality to strip at ratios higher 1 out of every 2. testing shows good savings at stripping 2/3 frames on NX64 and in editor of around 8mb with no noticeable visual degradation.
Works through the VariableFrameStripping object that is a member of the AnimSequence.
Fixed issue with valkyrie
[CL 25809604 by hilda cruz in ue5-main branch]
Swarm review [at] https://p4-swarm.epicgames.net/reviews/25771279
Added functionality to strip at ratios higher 1 out of every 2. testing shows good savings at stripping 2/3 frames on NX64 and in editor of around 8mb with no noticeable visual degradation.
Works through the VariableFrameStripping object that is a member of the AnimSequence.
Fixed issue with valkyrie
[CL 25804411 by nick baltis in ue5-main branch]
[FYI] nick.baltis
Original CL Desc
-----------------------------------------------------------------
Due to Backout files marked for add could not show latest revision forcing me to submit this change directly though p4v.
Swarm review [at] https://p4-swarm.epicgames.net/reviews/25450246
Added functionality to strip at ratios higher 1 out of every 2. testing shows good savings at stripping 2/3 frames on Nx64 and in editor of around 8mb with no noticeable visual degradation.
Origional Cvar ssytem replaced with VariableFrameStrippingSettings Oject which is a member of AnimSequence. It contains PerPlatform variables for enableing the system and its rate.
The move to a member object wrapping around these settings were two fold. First to better mas change anim sequences by platform while also allowing for varried settings for edge cases. Second becuase due to the fact this affects objects in the cook, gateing it behind a cvar provides no hot fix saftey while hurting useability.
[CL 25521647 by edwin maynard in ue5-main branch]
Swarm review [at] https://p4-swarm.epicgames.net/reviews/25450246
Added functionality to strip at ratios higher 1 out of every 2. testing shows good savings at stripping 2/3 frames on Nx64 and in editor of around 8mb with no noticeable visual degradation.
Origional Cvar ssytem replaced with VariableFrameStrippingSettings Oject which is a member of AnimSequence. It contains PerPlatform variables for enableing the system and its rate.
The move to a member object wrapping around these settings were two fold. First to better mas change anim sequences by platform while also allowing for varried settings for edge cases. Second becuase due to the fact this affects objects in the cook, gateing it behind a cvar provides no hot fix saftey while hurting useability.
[CL 25518666 by nick baltis in ue5-main branch]
Added functionality to strip at ratios higher 1 out of every 2. testing shows good savings at stripping 2/3 frames on switch and in editor of around 8mb with no noticeable visual degradation.
2 Cvars added "a.Compression.UseVaribleFrameStripping" & "a.Compression.VaribleFrameStrippingRatio" which enable and change the amount of variable stripping.
In addition added 3 variables to anim sequences bOverrideVariableFrameStripping, UseVariableFrameStripping& FrameStrippingRatio; which allow you to override any stripping options on a per asset basis. mainly for the purpose of the case that a particular animation is behaving badly under higher stripping you don’t have to lower the whole platforms stripping to accommodate.
#preflight 642305be803cb466e858b86e
#rb alex.nischwitz
[CL 25343990 by nick baltis in ue5-main branch]
Runtime notes:
- Removes 'smart name' usage across the animation systems.
- Changed curve blending from a uniform array (sized per skeleton) to a sparse array of sorted named values. Blends and other combiners are performed using a dual iteration 'tape merge'.
- Skeleton curves are no longer guaranteed to cover all curve names that can be found at runtime.
Editor notes:
- Curve metadata (flags, bone links etc.) is still present on the skeleton, but can also now exist on a skeletal mesh
- Curve metadata (for morph targets) is still populated on import
- Curves can now be used arbitrarily at runtime
New features:
- New Find/Replace dialog that allows for batch-replacing curves and notifies across all of a project's assets
- New curve debugger tab in various Persona editors that allows for viewing curve values live. This also now allows viewing curves for specific pose watches.
- Pose watches now output curve tracks to the Rewind Debugger
#rb Jurre.deBaare,Nicholas.Frechette,Sara.Schvartzman,Helge.Mathee,Kiaran.Ritchie,Jaime.Cifuentes,Martin.Wilson,Keith.Yerex,Andrean.Franc (and more!)
#jira UE-167776
#jira UE-173716
#jira UE-110407
#preflight 63fc98c81206d91a2bc3ab90
#preflight 63f3ad4f81646f1f24c240c2
[CL 24421496 by Thomas Sarkanen in ue5-main branch]
#jira UE-173258
#fix make sure we never try and sample time-code attributes on an animation sequence which has not been populated (DataModel is created but not initialised)
#rb trivial
#preflight 63b85249d862fdd3473197b4
[CL 23599277 by Jurre deBaare in ue5-main branch]
- Added new compression and 'compiling' API/path
* Relies on newer DDC API
* Only fetches compressible data when data is not found in DDC
* Fetching data happens off the GT now (including Additive animation)
- Deprecated and replace AnimSequence API around compression
** AnimStreamable still relies on old, synchronous, compression path **
IAnimationDataModel
- Removed bone track data being stored as FBoneAnimationTrack
- Bone animation can now only be referenced by Name (not track index anymore)
- Deprecated any API relying on FBoneAnimationTrack
- Added API to retrieve FTransform(s) for given frame(s) with provided bone name
- Added API to lock model against modifications during evaluation (required for non-racing off-GT evaluation)
Animation Sequence
- Frame-rate is now stored on a per-platform basis, allowing for future replacement of frame-stripping (editing property is disabled for now)
- Now allows for storing _transient_ per-platform compressed animation data (required for multi-platform cook)
PerPlatformProperties
- Added per-platform FFrameRate implementation
#preflight 63999f102540a78d2778adb7
#rb Thomas.Sarkanen, Nicholas.Frechette, Devin.Doucette
#fyi Zousar.Shaker
[CL 23510521 by Jurre deBaare in ue5-main branch]
**Animation Data Model load/cook time and memory optimizations**
- Added SetKeysOnly to FMovieSceneFloatChannel, allowing to only set value/frames values and skip allocating key handles
- Added EvaluateWithCache to TMovieSceneCurveChannelImpl, allowing to evaluate multiple curves using a caching data structure holding the frame-indices resulting from the FrameTime -> indexes calculationg
- UFKControlRig::GetControlName/GetControlTargetName, added thread_local mapping cache and optimized FName generation
- Made the sequencer bone curve keys 'sparse' again, if constant it just sets the default value for the curve otherwise it is still uniform
- Only resample keys when compressing, and clear them on any significant model changes and when save-during-cook has been completed
- Routed ::Presave for AnimSequencerDataModel directly through to UMovieSceneSignedObject to skip compiling cooked sequencer that that will/should never cooked and packaged
- Added some significant pass-by-reference changes to AnimSequencerModel APIs (passing large arrays by value previously) :doh:
- Optimized GenerateLegacyBoneData
Original CL description:
**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, Mike.Zyracki
#jira UE-131296
#preflight 631f6897a9331c69c3a34d1e
[CL 21980597 by Jurre deBaare in ue5-main branch]
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]
- 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]
Since the subframe component of FFrameTime is clamped to the range [0.0, 1.0),
it cannot accurately represent the use case where the timecode metadata represents
subframe values as whole numbered subframes instead of as a percentage of a frame
the way the engine does. The subframe component of the FQualifiedFrameTime returned
by EvaluateRootBoneTimecodeAttributesAtTime() may not reflect the authored subframe
metadata in that case.
This new function allows access to the subframe values that were actually authored in the
timecode metadata.
An additional explicit clamp was added to EvaluateRootBoneTimecodeAttributesAtTime()
to ensure that the subframe value read from the timecode metadata is in range *before*
we try to construct an FFrameTime from it, since the constructor has a checkSlow() that
will assert if the value is out of range.
#jira UE-141224
#rb max.chen
#preflight 620ffdcead11de9431ce8cc5
[CL 19060425 by matt johnson in ue5-main branch]
This extends the handling in EvaluateRootBoneTimecodeAttributesAtTime() to support reading
numerical values from string-typed custom attributes for any of the existing components of
FTimecode or a subframe value.
It also adds support for parsing a timecode rate string into the FFrameRate it represents,
and accounts for the use of drop frame timecode rates (with either "29.97df" for NTSC_30
or "59.94df" for NTSC_60 frame rates).
#rb max.chen
#preflight 61ef2029ca3de856bcdb2a42
#ROBOMERGE-AUTHOR: matt.johnson
#ROBOMERGE-SOURCE: CL 18715500 in //UE5/Release-5.0/... via CL 18715569 via CL 18715728
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)
[CL 18717033 by matt johnson in ue5-main branch]
In some workflows when authoring timecode metadata, the timecode rate may be
different from the animation or capture frame rate, for example when capturing
"high" frame rate data at 120 frames per second but recording SMPTE timecode
at 30 frames per second.
This adds a "TCRate" custom attribute setting that allows authoring metadata that
specifies a timecode rate that is different from the animation data frame rate.
With this initial introduction of the new setting, the custom attribute is expected to
be integer or float typed and should represent the timecode rate in frames per second.
Drop frame is not yet supported.
#rb max.chen, benoit.deschenes
#preflight 61d77760932a02483cd95c1a
#ROBOMERGE-AUTHOR: matt.johnson
#ROBOMERGE-SOURCE: CL 18551309 in //UE5/Release-5.0/... via CL 18551318
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)
[CL 18551341 by matt johnson in ue5-release-engine-test branch]
A specially designated set of attribute curves can be authored on a bone
to encode timecode metadata for an animation sequence. Each attribute
encodes a different component of a complete timecode and subframe value
("TCHour", "TCMinute", "TCSecond", "TCFrame", and "TCSubframe"). The
convention is to author these attribute curves on the root bone of the animation.
This adds a function for evaluating those attributes at a particular time, and the result
is returned as a qualified frame time. If the anim sequence has an import file frame rate
specified, then that rate is used for the returned qualified frame time to more closely
match the original source of the animation. Otherwise, the sampling frame rate of the
anim sequence is used. If the root bone does not have any timecode attributes or they
otherwise cannot be evaluated (for example, because they have no keys), the function
returns false, and the qualified frame time passed by reference is unmodified.
Finally, this new function is used for the frame time hint of skeletal animation tracks in
Sequencer. Anim sequences that have these attributes authored will show the authored
timecode/frame values in the frame time hint when they are selected. This enables more
easily correlating a point in time in the anim sequence with where it came from in an
external DCC.
#rb benoit.deschenes, max.chen
#preflight 619d6f48aa4521f9e7a4e183
#ROBOMERGE-AUTHOR: matt.johnson
#ROBOMERGE-SOURCE: CL 18316998 in //UE5/Release-5.0/... via CL 18317391
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
[CL 18317981 by matt johnson in ue5-release-engine-test branch]