-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Parallelize forward kinematics animation systems (#6785)
# Objective Speed up animation by leveraging all threads in `ComputeTaskPool`. ## Solution This PR parallelizes animation sampling across all threads. To ensure that this is safely done, all animation is predicated with an ancestor query to ensure that there is no conflicting `AnimationPlayer` above each animated hierarchy that may cause this to alias. Unlike the RFC, this does not add support for reflect based "animate anything", but only extends the existing `AnimationPlayer` to support high numbers of animated characters on screen at once. ## Performance This cuts `many_foxes`'s frame time on my machine by a full millisecond, from 7.49ms to 6.5ms. (yellow is this PR, red is main). ![image](https://user-images.githubusercontent.com/3137680/204219698-ffe0136c-5e9b-436f-b8d9-b23f0b8d7d36.png) --- ## Changelog Changed: Animation sampling now runs fully multi-threaded using threads from `ComputeTaskPool`. Changed: `AnimationPlayer` that are on a child or descendant of another entity with another player will no longer be run.
- Loading branch information
Showing
1 changed file
with
189 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters