Page MenuHome

Armature Animation Baking: Important performance patch
Needs ReviewPublic

Authored by lucas veber (lucky3) on Fri, Sep 4, 7:21 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

As mentioned in https://developer.blender.org/D7762, inserting keyframe with pbone.keyframe_insert() is slow, while adding keyframe points then setting their coordinates allows impressive speed up.
A very similar implementation was made to improve animation baking (with bones). 4 times speed up here when baking 1000 frames of a full rigged character (35 sec with the patch - 145 sec without).

Diff Detail

Event Timeline

lucas veber (lucky3) requested review of this revision.Fri, Sep 4, 7:21 PM
lucas veber (lucky3) created this revision.
lucas veber (lucky3) edited the summary of this revision. (Show Details)Fri, Sep 4, 10:17 PM
lucas veber (lucky3) edited the summary of this revision. (Show Details)
lucas veber (lucky3) edited the summary of this revision. (Show Details)
lucas veber (lucky3) retitled this revision from Animation Baking: Important performance patch to Armature Animation Baking: Important performance patch.Sat, Sep 5, 8:50 PM
lucas veber (lucky3) planned changes to this revision.Sun, Sep 6, 1:08 PM

Not ready, this new method is not compatible with some baking options, such as frame range that doesn't start at frame 1, or when enabling the "Overwrite current action" option.
These cases have to be handled in a next revision.

lucas veber (lucky3) updated this revision to Diff 28577.EditedSun, Sep 6, 5:20 PM

Now supports again baking to the existing action ("Overwrite Current Action" option)
When baking to a new action, use the fast/batch mode
When baking to the existing action, use individual keyframe insertion (similar to the previous method). Slower. Unless a better way can be found?