Notifications
Motion Magic (MxM) Motion Matching Animation System for Unity (WIP)
Showcase
2.9 K
111
Motion Magic (MxM) is an work in progress animation system for Unity Engine that utilises the 'Motion Matching' technique of animation instead of traditional state based animation. Motion Matching does not require a complex state machine, there's no need to clean up mocap data and animation clips do not need to be cut. It's fast, simple and provides smooth and realistic animations.
Motion matching works on the simple concept that if an animation pose has a similar pose to the current pose and it's trajectory aligns with the desired trajectory of the character, then it is a good choice for an animation frame to jump to. MxM jumps all over the place through all animation data at any time in order to achieve the best possible result.
While there are other animation techniques that allow high quality animation, they are often very rigid with slow response to user input. Motion matching makes little compromise, providing high quality organic animation coupled together with a fast response to user input.
Motion Matching also has the added benefit of being extremely easy to add to a game because it does not require mocap data to be cleaned up and it does not require the building of a state machine. All the work is done for you with Motion Magic.

Kenneth Claassen
Self Employed - Programmer
4
Comments
Kenneth Claassen
a month ago
Self Employed - Programmer
I've completely refactored the MxMAnimator to works with Playables instead of the animator controller. It works like a charm. If you want access join the discord https://discord.gg/qfzXhGC
0
Kenneth Claassen
a month ago
Self Employed - Programmer
Thanks, I'll have a look some time. Though I would prefer to integrate animation control with playables directly into the MxM animator to reduce the number of scripts on the object. I don't like having too many Mono-behaviours and after trying it, I thought the Playable API was pretty easy to use on it's own without an additional script wrapper. I also try to keep things minimalistic. What I mean by that is I don't want to add code that MxM doesn't need and after briefly looking at those scripts there was a lot of stuff that MxM wouldn't need. Anyway, just my initial thoughts, I'll have a deeper look into it when I get back into this project more.
0
IF
Ibrahim Fayad
a month ago
@Kenneth Claassen they are part of Unity Standard, but they are made to support many things. The part that will be useful, the simple component animation, are a couple of C# scripts that make the animation playables API act as an animation component. So you can add animations and remove them on the fly; play whatever animation you want, at whichever time you want; in a sense it's just like the legacy animation system. However, it's way more flexible. For example we can have motion matching working on this system, switch to a regular animator controller to perform non-locomotion animations and then switch back. here's the link in case you wanna check it out: https://github.com/Unity-Technologies/SimpleAnimation/tree/master/Assets
0
Kenneth Claassen
a month ago
Self Employed - Programmer
Ibrahim FayadHello @Kenneth Claassen , yes I am referring to the playables API, specifically the simple animation component playable. it's an asset similar to the legacy animation component but for mecanim. It's available through Unity's Github, and I have modified version to include animation layers. I never mentioned it here, because I assumed that's what you were using to blend animations together; blending them through the Animator Controller must have been a pain.
I see yes. I thought playables was now part of Unity standard or are you referring to additional code from GitHub. I would have used playables from the start had I known about them but when I started the project they were experimental and I wasn't aware of them. Fortunately they are the perfect solution for MxM as it streamlines the whole thing, avoids garbage collection and improves my ability to blend. Blending layers through the animation controller was an absolute pain haha.
0
IF
Ibrahim Fayad
a month ago
Hello @Kenneth Claassen , yes I am referring to the playables API, specifically the simple animation component playable. it's an asset similar to the legacy animation component but for mecanim. It's available through Unity's Github, and I have modified version to include animation layers. I never mentioned it here, because I assumed that's what you were using to blend animations together; blending them through the Animator Controller must have been a pain.
0