Presenting MonoSkelly: skeleton-based animation system for MonoGame (+ editor).

Hi all,
I just released the first version of MonoSkelly, a 3D skeleton-based animations library for MonoGame:

So what is it really?

MonoSkelly implements its own bone hierarchy system with animations. It also provides animation blending utility, so you can easily do stuff like this:

It doesn’t use a standard bones format, so it comes with its own editor, which is a bit bare boned at the moment (pun not intended), but will be extended later.

So what it looks like in code?

Loading the skeleton:

_playerSkeleton = new MonoSkelly.Core.Skeleton();
_playerSkeleton.LoadFrom("Content/tutorial/robot.ini");
_animation = _playerSkeleton.BeginAnimation("idle");

Loading your models:

_playerParts = new Dictionary<string, Model>();
_playerParts["head"] = Content.Load<Model>("tutorial/head");
_playerParts["body"] = Content.Load<Model>("tutorial/body");
_playerParts["arm_left"] = Content.Load<Model>("tutorial/arm");
_playerParts["arm_right"] = Content.Load<Model>("tutorial/arm");
_playerParts["leg_left"] = Content.Load<Model>("tutorial/leg");
_playerParts["leg_right"] = Content.Load<Model>("tutorial/leg");

And drawing / animating it:

_animation.Update((float)gameTime.ElapsedGameTime.TotalSeconds);

foreach (var part in _playerParts)
{
    var bone = _animation.GetBoneTransform(part.Key);
    part.Value.Draw(bone, View, Projection);
}

The project I’m using this for does not have vertices weight, it just moves around models similar to how they did old era 3d graphics. But writing shader that support weights shouldn’t be too hard, I hope :slight_smile:

Hope you guys find this useful, if you have any questions or suggestions feel free to ask :smiley:

11 Likes

Great work! This will be incredibly useful for many projects.

1 Like