-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
RFC: Improve performance of AnimationPlayer. #6821
RFC: Improve performance of AnimationPlayer. #6821
Conversation
Please see #6785 as there is sizable overlap with this PR, as well as bevyengine/rfcs#51 for a pathway towards more complex FK controls. I'll give this a more thorough review soon. |
Quick cursory readthrough: if the intent is to cache the results of the |
Thanks for taking a look @james7132, yeah I was thinking about that - If this sort of change in general is desirable I want to explore adding new component I’d like to ideally move things that seem glfw specific into that loader, and focus on the Bevy side of things being format agnostic and flexible. |
@james7132 thanks for the link to the RFC too, I’ll have a proper read through later. Although I think the For example, you add a I need to think more about how an AnimationClip will work though, but I think it should be able to be resolved in the glfw loader. |
The original plan for the aforementioned RFC was to use a the following struct: #[derive(Component)]
struct BoneBinding {
animator: Entity,
bone_id: usize
} Which would be added in a similar way as you mentioned. However, maintaining that relationship is very hard and change detection on the hierarchy is non-trivial. If we can find a performant and correct way of doing this, that'd be ideal. |
@therealbnut The PR to parallelize forward kinematics has been merged, do you think you can rebase this PR? I'd love to see if it's still a performance win. |
@james7132 it'll take me a while to compare and see which bits can be transferred over, I'll probably have to start over rather than rebase. I'm not sure when I'll get to it, but I'll take a look when I get a chance. |
Backlog cleanup: closing due to inactivity, and the aforementioned #6785 did get merged in the end. |
Hi,
I've noticed there's a lot of repeated lookups in
AnimationPlayer
, and wanted to explore reducing those. This PR is just an RFC for whether I should proceed cleaning up and verifying these changes.CC @james7132 @superdump who are working on similar things.
On my computer this PR speeds up
many_foxes
by2.262011ms
, which increases the FPS by57%
.Objective
AnimationPlayer
.Solution
EntityPath
.Changelog
Migration Guide