Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since the start, I have been using lazy/delayed sampling for the animation graph. This means that the pose data passed around the graph was in the form of curve segments (
ValueFrame
types), and we sample them only when needed. While this allowed a couple of cool things (e.g. extremely flexible animation chaining), the complexity introduced in many parts of the codebase was getting out of hand.The industry standard way of doing this is to sample animations as early as possible, and only worked with pose values throughout the graph. This PR switches to that approach.
This is part of an effort to clean up technical debt from the codebase, and make development faster and more approachable.
Breaking changes
There are changes in how chaining and looping works that required a new parameter being introduced. Chain and loop nodes now have a
interpolation_period
f32 parameter that determines how long should be spent blending back to the starting pose (for looping) or blending to the second animation (for chaining). You should manually edit graphs files to change the Loop and Chain nodes to a struct (changeLoop
toLoop()
andChain
toChain()
), and when opening the editor the nodes should be loaded with default values. See the updated examples for how for how to do similar tasks in the new system.Follow-up work