FBX IO: Speed up animation simplification using NumPy #104904

Merged
Thomas Barlow merged 17 commits from Mysteryem/blender-addons:fbx_anim_export_numpy_simplify into blender-v4.0-release 2023-10-06 17:53:02 +02:00
Member

This patch re-writes animation curve simplification on export to use
NumPy where possible for performance.

An export of a 1523 frame animation of a 65 bone armature animating 47
of the bones (almost entirely rotation animation) goes from a 2.9s
export to a 2.2s export for me with this patch (using the default
Simplify value of 1.0).

There are no expected changes to the contents of exported files with
this patch.

This patch re-writes animation curve simplification on export to use NumPy where possible for performance. An export of a 1523 frame animation of a 65 bone armature animating 47 of the bones (almost entirely rotation animation) goes from a 2.9s export to a 2.2s export for me with this patch (using the default Simplify value of 1.0). There are no expected changes to the contents of exported files with this patch.
Thomas Barlow added 12 commits 2023-09-21 05:33:16 +02:00
Thomas Barlow requested review from Bastien Montagne 2023-09-21 05:33:47 +02:00
Thomas Barlow added 1 commit 2023-10-01 17:15:37 +02:00
Thomas Barlow changed title from FBX IO: Speed up animation simplification using NumPy to FBX IO: Speed up animation simplification using NumPy 2023-10-01 17:15:46 +02:00
Thomas Barlow changed target branch from main to blender-v4.0-release 2023-10-01 17:15:48 +02:00
Bastien Montagne approved these changes 2023-10-04 17:44:30 +02:00
Bastien Montagne left a comment
Owner

Numpy code is somewhat harder to follow, but change LGTM, and gives another nice speedup!

Numpy code is somewhat harder to follow, but change LGTM, and gives another nice speedup!
Thomas Barlow added 1 commit 2023-10-05 18:55:52 +02:00
Author
Member

Numpy code is somewhat harder to follow

I've added a bunch of extra comments and renamed many variables. The main change to renaming is that there is no longer any mixing of "write mask" vs "keyed" (they were the same thing). The variables and comments now only refer to the values being "enabled" or "disabled" for writing.

> Numpy code is somewhat harder to follow I've added a bunch of extra comments and renamed many variables. The main change to renaming is that there is no longer any mixing of "write mask" vs "keyed" (they were the same thing). The variables and comments now only refer to the values being "enabled" or "disabled" for writing.
Bastien Montagne approved these changes 2023-10-06 10:58:32 +02:00
Thomas Barlow added 3 commits 2023-10-06 17:42:13 +02:00
Thomas Barlow merged commit 461e0c3e1e into blender-v4.0-release 2023-10-06 17:53:02 +02:00
Thomas Barlow deleted branch fbx_anim_export_numpy_simplify 2023-10-06 17:53:03 +02:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#104904
No description provided.