Yadi Yasheng
4 min readOct 26, 2020

--

Dev Diary — Skeletal Animation and GPU Skinning

frustrating start, orgasmic result

I got bored of working on my toy renderer. So I decided to switch it up a bit and work on some other typical systems of a game engine. And then out of nowhere, skeletal animation hit my mind. “yeah… why not?! How hard can it be? You got a mesh and some bones. You accumulate bone transforms. You tick and interpolate the animation keyframes…” Before I knew it, I was 30 hours deep in the rabbit hole, about to pull my hair out staring at a deformed humanoid mesh flapping its leg around all over the place.

The Skeleton

The first couple nights of this adventure, I had some random TV shows playing in the background. Everything was still chill. Then I realize after days I still couldn’t even wrap my head around getting all the data I needed to set up the bone structure correctly. To be fair, the node graph and bone data relationship in Assimp is confusing as fuck. Anyways, here are the things we need:

  • Transform and Inverse Bind Pose(OffsetMatrix) of each bone (passed as uniform)
  • Bound bones (IDs/indices and weights) of each vertex (stored as vertex attribute)

--

--

Yadi Yasheng
Yadi Yasheng

Written by Yadi Yasheng

software engineer & game developer

Responses (2)