Commit Graph

30 Commits

Author SHA1 Message Date
jurre debaare
daa0963086 Non-deterministic GUID generation from Animation Data
#fix Handle Attribute curve keys individually, as the key array entries themselves hold raw ptrs (not the actual value) causing indeterminism
#misc Extra logging when storing/fetching a animationsequencecompression to cache
#jira UE-177172
#preflight 63eb73d57d2ec3d2fdc2cb1c
#rb thomas.sarkanen

[CL 24251527 by jurre debaare in ue5-main branch]
2023-02-16 01:48:01 -05:00
Joe Kirchoff
5aac9f4e00 Fix remaining UnrealEditor Win64 private V3 issues
#rnx
#rb trivial
#preflight 63ec221cb96a6b27188d82c0

[CL 24223708 by Joe Kirchoff in ue5-main branch]
2023-02-14 19:12:26 -05:00
jurre debaare
931aa4d7f2 Ensure that the cached RawDataGUID is always cleared when PostLoading a UAnimSequencerDataModel instance. The goal of the GUID is to, when upgrading from the old data-structure to keep the GUID stable - as it can slightly vary from load-to-load without saving due to floating point differences accumulating during the upgrade path (transforms mult etc.). Once saved and thus hitting ::PostLoad we are free to clear it - and let compression run its course
#misc switch AnimSequencerController to cache the previous DataModel its GUID rather than the AnimSequence GUID - as they can get out-of-sync
#jira UE-175571
#preflight 63e654ffce1e17960b1697d3
#rb benoit.gadreau

[CL 24121446 by jurre debaare in ue5-main branch]
2023-02-10 11:56:47 -05:00
jurre debaare
427f38547e Static analysis fix - nullptr check
#rb trivial

[CL 24116691 by jurre debaare in ue5-main branch]
2023-02-10 05:39:49 -05:00
jurre debaare
63373d8ad6 //Fortnite/Dev-EngineMerge - Multiple Cook Client Steps - Ensure condition failed: false [File:D:\build\FN\Sync\Engine\Plugins\Animation\AnimationData\Source\AnimationData\Private\AnimSequencerDataModel.cpp]
#jira UE-176143
#fix When trying to copy bones between AnimDataModel implementations, ensure that the bone still exists on the skeleton (prevents warnings)
#fix When removing a bone control, check for existence of either the bone control, or transform curve
#fix When trying to iterate/generate bone keys, look for existence of the transform curve only
#rb Thomas.Sarkanen

[CL 24100362 by jurre debaare in ue5-main branch]
2023-02-09 12:14:35 -05:00
thomas sarkanen
664f06f512 Fix distorted meshes (and potential crashes) when assigning assets via skeleton compatibility
Incorrect skeleton was being used for the uncompressed retargeting path

#jira UE-173448
#rb Jurre.deBaare
#preflight 63e3abfe5c0ce8f11bfaff4c

[CL 24074840 by thomas sarkanen in ue5-main branch]
2023-02-08 12:14:03 -05:00
jurre debaare
a3c4dc6494 Assertion failed BracketCounter >= 0 after attempting to undo the importation of CesiumMan.gltf
#jira UE-174032
#fix ensure that controller changes are only transacted when reimporting an animation sequence
#preflight 63dbb7ab2c5e55a09477085d

[CL 24007376 by jurre debaare in ue5-main branch]
2023-02-03 22:53:23 -05:00
Jurre deBaare
e17612487a Ensure additive Transform Curves are still incorporated into animation data GUID, until they are incorporated into Sequencer Data itself
#jira none
#rb trivial
#preflight 63d7fae7ec3d1af44097a135

[CL 23910643 by Jurre deBaare in ue5-main branch]
2023-01-30 12:32:46 -05:00
Jurre deBaare
59d2db68cf Revert behaviour, ensuring that correct ReferenceSkeleton is used to retrieve Skeleton to Compact pose mapping
#jira none
#rb John.vanderBurg
#preflight 63c7eaae9f7505897ca8aecc

[CL 23754232 by Jurre deBaare in ue5-main branch]
2023-01-18 08:03:13 -05:00
Jurre deBaare
cce0bb7282 - Make sure we gracefully handle ::BeginDestroy for an AnimSequence with in-flight compression tasks
- Also make sure we handle ::BeginDestroy for a USkeleton, who might be targetted by in-flight AnimSequence compression tasks
- React to GC marking an AnimSequence, with in-flight compression, as unreachable
- Make BoneContainer accept Unreachable (but not yet destroyed) UObject references through WeakPtr access in WITH_EDITOR builds, this can happen when a Skeleton is marked Unreachable during GC - while async compression task is trying to sample raw animation data (poses)
#preflight 63c12f8c70575f89002012f3
#rb Thomas.Sarkanen

[CL 23675911 by Jurre deBaare in ue5-main branch]
2023-01-13 06:03:22 -05:00
Jurre deBaare
002623335f //UE5/Main - UE.EditorAutomation(RunTest=Editor) Linux vulkan - Curves - invalid number of keys
#jira UE-173755
#fix ensure we use the correct sanitized FName during curve (control) renaming
#rb Helge.Mathee
#preflight 63c01accbf54fa7b3668ccff

[CL 23662960 by Jurre deBaare in ue5-main branch]
2023-01-12 10:08:45 -05:00
Helge Mathee
82812910b0 AnimationData: Sanitize element names for Control Rig
#rb jurre.debaare
#jira UE-171202
#preflight https://horde.devtools.epicgames.com/job/63b83c7cd862fdd34725e33e

[CL 23610754 by Helge Mathee in ue5-main branch]
2023-01-09 06:17:53 -05:00
Jurre deBaare
c3721aadd8 Temporarily disable raw data GUID caching, as compressed anim data results from DDC for the generated keys are invalid
#jira none
#rb none
#preflight 639b72022960b732200a906a

[CL 23529688 by Jurre deBaare in ue5-main branch]
2022-12-15 14:20:22 -05:00
Jurre deBaare
31f1b097fd Animation Compression
- 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]
2022-12-14 05:56:08 -05:00
kiaran ritchie
47c8e3f418 Adding python API for creating/editing IK Rig assets
#rb halfdan.ingvarsson
#preflight 6386cc15170bc34a93fd61d7
#JIRA https://jira.it.epicgames.com/browse/UE-170067
#preflight 638e81907e0feab0b7121fb3

[CL 23401868 by kiaran ritchie in ue5-main branch]
2022-12-05 18:58:36 -05:00
henrik karlsson
e7631fdfd1 Fixed non-unity/pch errors
#rb none
#jira none
#preflight skipped

[CL 22982696 by henrik karlsson in ue5-main branch]
2022-11-04 02:47:49 -04:00
henrik karlsson
7704c0920f Compile fixes caused by removal of includes in robomerged changes
#rb none
#preflight skipped

[CL 22800020 by henrik karlsson in ue5-main branch]
2022-10-26 20:02:09 -04:00
Max Chen
f57db3e0fa Sequencer: Remove Master from Sequencer
- Remove all instances of Master from the UI - ie. Replace Create Master Sequence with Create Sequence with Shots
- Internally, remove Master - Master Tracks in the MovieScene can just be Tracks

Deprecations (Properties):
- UMovieScene:MasterTracks deprecated for Tracks
- UMovieSceneFolder:ChildMasterTracks deprecated for ChildTracks
- FLevelSequencePlayerSnapshot: MasterName, MasterTime for RootName, RootTime
- UMoviePipelineSetting_BlueprintBase: bIsValidOnMaster for bIsValidOnPrimary

Deprecations (Functions):
- UMovieScene: GetMasterTracks, FindMasterTracksByType, FindMasterTracksByExactType, AddMasterTrack, RemoveMasterTrack deprecated for GetTracks, FindTracksByType, FindTracksByExactType, AddTrack, RemoveTrack
- UMovieSceneFolder: GetChildMasterTracks, AddChildMasterTrack, RemoveChildMasterTrack deprecated for GetChildTracks, AddChildTracks, RemoveChildTrack
- FMovieSceneTrackEditor: FFindOrCreateMasterTrackResult, FindOrCreateMasterTrack deprecated for FindOrCreateRootTrackResult, FindOrCreateRootTrack
- ULevelSequenceDirector: GetMasterSequenceTime deprecated for ULevelSequenceDirector::GetRootSequenceTime
- UDaySequenceDirector: GetMasterSequenceTime deprecated for UDaySequenceDirector::GetRootSequenceTime
- UMoviePipelineSetting: IsValidOnMaster for IsValidOnPrimary
- UMoviePipelineBlueprintLibrary: GetMasterTimecode, GetMasterFrameNumber for GetRootTimecode, GetRootFrameNumber
- UMoviePipeline: GetPipelineMasterConfig for GetPipelinePrimaryConfig
- UMovieSceneAudioTrack: IsAMasterTrack

Classes Renamed:
- FAnimTypePreAnimatedStateMasterStorage for FAnimTypePreAnimatedStateRootStorage
- UMovieSceneMasterInstantiatorSystem for UMovieSceneRootInstantiatorSystem
- ULevelSequenceMasterSequenceSettings to ULevelSequenceSequenceWithShotsSetting

Note, the following instances of master still occur and a "KnownCase" has been added for them in CheckAcceptableWords.cs:
- Deprecated properties (MasterTracks -> Tracks) and functions (ie. GetMasterTracks -> GetTracks)
- masterclip in FCPXML since it's an industry standard term
- masteraudiosubmix in AudioCaptureProtocol
- mastersubmix in MoviePipelineAudioRendering
- masteertimecode, masterframenumber, masterconfig, validonmaster in MovieRenderPipeline
- mastersequencetime, mastertime, mastername in LevelSequence

#jira UE-158660
#preflight 634645e48a0a7b2adc5722e7
#rb matt.hoffman, andrew.rodham

[CL 22739302 by Max Chen in ue5-main branch]
2022-10-24 18:22:10 -04:00
Robb Surridge
610c467639 Update vendor links for built-in plugins to use secure protocol.
#jira UE-166823
#rb lauren.barnes
#preflight 6352b20b7261e565c476ec3b

[CL 22690089 by Robb Surridge in ue5-main branch]
2022-10-21 11:04:07 -04:00
Jurre deBaare
7c999509bc Fix for reimporting not clearing the cached DDC key GUID (used to limit need for recompression due to floating point differences after initial upgrade to DataModel)
#jira none
#rb Thomas.Sarkanen
#preflight 6351389b8176062ea735ce3d

[CL 22653962 by Jurre deBaare in ue5-main branch]
2022-10-20 09:14:58 -04:00
Nicholas Frechette
bfc9336639 Remove empty tracks to ensure track key count is consistent with data model
#jira UE-166011
#rb Jurre.deBaare
#preflight 635002042337adbf4269363e

[CL 22624172 by Nicholas Frechette in ue5-main branch]
2022-10-19 09:59:58 -04:00
Matt Peters
3b57fa2789 IncrementalCooking: Add DeclareConstructClasses for classes that need it. Fix some transient UObjects that assert they are never persistently serialized to support Serialize being called on their ClassDefaultObject to support DeclareCustomVersions.
#rb Zousar.Shaker
#rnx
#preflight 63497341f622f6c4bb1dd625

[CL 22529151 by Matt Peters in ue5-main branch]
2022-10-14 12:42:43 -04:00
Jurre deBaare
782976dbe4 Crash in UAnimSequence::GetBonePose after adding curve with UAnimationBlueprintLibrary::AddCurve with Anim Modifier
#jira UE-166435
#fix remove scope bracket around application of ANimationModifier, moving responsibility to the user

Curve keys added with Anim Modifiers have incorrect time
#jira UE-166436
#fix ensure that when adding a scalar curve, its tick rate is matched to the AnimModel's, and convert between tick-rate and model frame rate when setting keys

#rb Aaron.Cox
#preflight 6346de84663dafe4162d9485

[CL 22500269 by Jurre deBaare in ue5-main branch]
2022-10-13 05:54:31 -04:00
Jurre deBaare
4c2ec2f4d1 Manual integration/reimplementation of CL 22091342:
Preinfintiy and Postinfinity settings within the Curve Editor of an Animation can not be changed from Constant
#feature added API for setting curve attributes (pre/post extrapolation)
#misc added tests for new API
#jira UE-163181
#preflight 632b346cd747fe52c8df8811
#rb none

[CL 22133564 by Jurre deBaare in ue5-main branch]
2022-09-22 04:50:26 -04:00
Jurre deBaare
ff0db16d0b Reintroducing AnimationDataModel refactor with additional memory and cooktime optimizations.
**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]
2022-09-13 06:41:15 -04:00