News for hackers. Stuff that matters.
Re:Game Engine: How I Implemented Skeletal Animation by gfxgirl on Sunday April 04, 2021 @03:18AM (#26687538)
This is nice but ... the real "fun" of animation is handling all the variations of how to mix the data. It's easy to take a full set a bone animation data and apply it to matrices. The challenge, not sure challenge is the right word, maybe "the work" is in the all the tools and systems for using it. You can't just interpolate between frames, you need to be able to interpolate between multiple animations. You need some animations to apply to only parts of the skeleton (like allowing the character to run and shoot) which means you're some what back to sparser data ... though there are still ways to make it arrays.

https://docs.unrealengine.com/en-US/AnimatingObjects/Skeleta...

https://docs.unity3d.com/Manual/AnimationSection.html

In other words, getting a single animation to play will take a day. Getting an entire animation system ready for use in a modern 3d game can possibly take much much longer (exporters, animation editors, timelines, skeleton editors, state machine editors, etc... etc...)

Re:Game Engine: How I Implemented Skeletal Animation by flohofwoe on Sunday April 04, 2021 @07:30AM (#26688596)
But on the other hand, many games work just fine with simple linear interpolation and simple cross-blending between animations, and it's probably more important to compress and efficiently stream the animation data instead of working with a too granular set of small partial-animation snippets (for instance, not every game needs Assassin's-Creed-level dynamic climbing - but the "big engines" need to provide general solutions which enable this sort of thing).
Re:Game Engine: How I Implemented Skeletal Animation by Dzugaru on Sunday April 04, 2021 @06:11AM (#26688192)
You can also go down the rabbit hole of using ML in animation. It's really a gamechanger.

[0] https://montreal.ubisoft.com/en/introducing-learned-motion-m...

[1] https://cascadeur.com/help/autoposing

Re:Game Engine: How I Implemented Skeletal Animation by lasagnaphil on Sunday April 04, 2021 @07:47AM (#26688691)
Motion matching isn't really ML by the way, it just does simple pose searching from a motion database every frame with a heuristically designed cost function. And the problem is that it requires a good amount of raw motion capture data beforehand to exceed the quality of traditional hand-made state machines, and as a result is mostly viable for huge game companies with dedicated motion capture studios and professional actors. (For most indies, even just renting out a motion capture studio for their game is out of the picture.) In order to really get the benefits of it, you'll have to plan out something called a "dance card" for your actors (https://www.youtube.com/watch?v=_Bd2T7uP9VA), which are a sequence of actions designed to sufficiently capture enough range of the motions that the character can take. And you also need some manual labeling/tagging of those motions afterhand in order to really get good transitions. The resulting animations can be incredibly good (such as the one we see in games like For Honor and The Last of Us 2), but for most indies and small gamedev studios this isn't really economically viable, and a state machine will probably get you far enough.

And learned motion matching is when you simply approximate a motion matching controller using a neural network to save memory and computation time (if you've read the paper). But it requires you to already have a well-made motion matching controller beforehand, so I don't know if it's a technology that can be applied to the majority of gamedevs.

Re:Game Engine: How I Implemented Skeletal Animation by gfxgirl on Monday April 05, 2021 @10:50PM (#26707471)
> If you have an animation of walking and one for drinking, Motion Matching will not be able to produce a scene where the character is walking while drinking. Motion Matching will only play back the data you provide it.

ML in animation doesn't actually do anything useful according to friends in production at Ubisoft. As the paper says itself

> Naturally, searching a larger database means poorer runtime performance too. This is why we say Motion Matching scales poorly in terms of data.

It's a neat experiment but ATM AFAIK has not been used in a production title because of its limits.

Re:Game Engine: How I Implemented Skeletal Animation by vladharbuz on Sunday April 04, 2021 @05:19AM (#26688005)
Absolutely! If you have any more resources on this topic (e.g. interpolating between animations), I'd love to take a look at them.
Re:Game Engine: How I Implemented Skeletal Animation by DerDangDerDang on Sunday April 04, 2021 @07:49AM (#26688703)
I found the source of the Cal3d library quite readable, taught me a lot about basic blending and sparse key frames back in the day