Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample curves eagerly #41

Merged
merged 4 commits into from Mar 17, 2024
Merged

Sample curves eagerly #41

merged 4 commits into from Mar 17, 2024

Conversation

mbrea-c
Copy link
Owner

@mbrea-c mbrea-c commented Mar 16, 2024

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 (change Loop to Loop() and Chain to Chain()), 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

  • Update space conversion nodes

@mbrea-c mbrea-c marked this pull request as ready for review March 17, 2024 15:15
@mbrea-c mbrea-c merged commit 97c4302 into master Mar 17, 2024
3 checks passed
@mbrea-c mbrea-c deleted the eager_pose_sampling branch May 26, 2024 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant