3
\$\begingroup\$

I wonder how skeletal animations in games work. I am writing my own graphics engine for fun, and I have come across several problems with animations.

Here is how I do it right now:

  1. Load the mesh with animations
  2. Simulate every animation with the CPU and then send it to my GPU via a texture that I make from the final transformation matrices.
  3. In my shader I multiply every vertex by the transformation matrices that are tied to that vertex.

This method works very good (until now). Now to the problem, if I have two animations that I want to use at the same time (running and shooting for example) then I have to do a "height check". It still works but I am getting serious doubts about it. If I want to render custom directions with this shoot animation (to where the camera is heading) I just don't know how I could fix this with my current method.

How can I accomplish this?

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Look up the term "animation blending." \$\endgroup\$ Jul 3, 2015 at 16:42

0