top of page
  • LinkedIn
  • GitHub

Multithreaded CPU Skeletal Animation Interpolation with GPU Linear Blend Skinning (LBS).

Skeletal Animation

Bézier curve Keyframe interpolation

Overview

- Skeleton Model: The test Model contains 57 bones - 56 skinning and 1 root.

- Hierarchy Tranversal: Real-time update of bone transformation. 

- Code Profiling: I developed a simple stack-based profiler to identify bottlenecks in the code. 

- Simple Job Queue System: I implemented a basic job system to manage multiple animated characters efficiently.

- Naive animation Blending: I dynamically blended the last keyframe of one animation with the first keyframe of the next at runtime for testing purposes.

​

Challenges and Solution

- Parsing and Debugging Animation Data: I utilised Assimp to parse animation data. To validate and debug the retrieved data, I relied on Visual Studio's debugging tools (e.g., breakpoints and watchers), and printed matrices to the console. This approach significantly improved both my efficiency and understanding of the data.


- Optimising Instantaneous Pose Computation: Initially, the computation of an instantaneous pose took ~0.6ms to 0.8ms, due to suboptimal data structures and poor cache locality. By optimising both the data structures and algorithms, I reduced the computation time to around 0.2ms to 0.3ms.


- Managing Multiple Animated Characters: In Debug configuration, animating 30 characters took ~31ms. Optimisation in Release configuration reduced this to ~4ms to 5ms, with just 20% of the CPU usage. By implementing multithreading, I improved performance, bringing the time to ~0.6ms to 0.9ms, and increasing CPU usage to 80%.
 

Learnt Outcome
- Hands-on experience with skeleton animation systems.
- Improved debugging skills using breakpoints, watchers and in-depth analysis of complex low-level mathematical computations.
- Practical application of multithreading implementation to enhance performance.
- Improved proficiency in profiling and optimising code.

 

Future Considerations and Explorations
- Refining data structures and animation blending techniques with weights.
- Offloading interpolation to the GPU.
- Implementing Dual Quaternion Skinning for smoother deformations.
- Exploration of Inverse Kinematics for dynamic animations.
- Optimising the Job Queue system to reduce frequent memory allocation and deallocation.

​​

​

Source code available on request.

Jagunmolu Oke

© 2025 by Jagunmolu Oke. Powered and secured by Wix

bottom of page