[Released] Motion Matching for Unity - Advanced Character Animation

Check it out on the Asset Store
Download the Standalone Demo (MxM v1.7) (Note: does not currently demonstrate parkour features)
Worried about performance? Download the Stress Test Demo (MxM v2.1)

Motion Matching for Unity (MxM) is an alternative animation system to mecanim for characters. With motion matching you can achieve advanced, organic and fluid animation without the need for an animation state machine. You don’t have to define transitions or set up conditions. Provided you have decent animations with enough coverage you can create a fully working character in about 15 minutes with starts, stops, plants and turns. With a little more effort and coding ability, its not hard to make very complex animation such as parkour, fighting and sports.

How Does It Work?
Motion matching is a relatively new animation technique that is not constrained by the concept of animation clips, states, pre-defined blends or transitions. Motion Matching allows animation to flow freely through your entire animation set, jumping to any pose at any time. Animation poses are chosen based on both the current pose and the desired gameplay input*. Whatever matches the pose and your desired input the best gets chosen and is rapidly blended in. By balancing the pose and the desired input, motion maching is able to achieve high fidelity animation while still achieving good input response**.

Industry Use:
Motion matching as a technique was originally developed about 2 years ago by Ubisoft for the game ‘For Honor’. It has since been used in several EA and Ubisoft games and is even being used in ‘The Last of Us Part 2’ by Naughty dog. As you can see, the technique of motion matching is not novel and has significant AAA application. (I am not affiliated with any of the above mentioned companies or games)

Mocap Data Samurai Trailer

Trailer

Introduction & Overview

Standalone Demo

Performance:
Motion matching for Unity uses the cutting edge of Unity development to achieve solid performance while still being stable. It uses Unity’s Job system, SIMD mathematics library and burst compiler, to achieve lightning fast, multi-threaded performance.

This video, which is already out of date, shows a performance benchmark on an i5 4 core system running motion matched characters above 60fps without LOD or infrequent updates.

Features:
Motion matching for Unity is not just a locomotion machine. It supports a number of features that allow the user to create almost any kind of animation. Features include:

  • No animation state machine
  • Fluid and responsive animation output**
  • Support for cut clips as well as un-cut mocap
  • Powerful event system for dynamic actions (e.g. vaults, sword attacks, pacour)
  • Powerful tagging system to allow control over animations (e.g. stances etc.)
  • Motion timing editor (change animation timing to match gameplay)
  • Animation warping for event (precise environment contacts
  • Layer system
  • Use alongside mecanim (switch at any time)
  • Compatible with custom animation playable graphs
  • Compatible with IK systems

Useful Links
- Asset Store Page
- Unity Connect
- Project Roadmap
- Discord (for support)
- User Manual
- Quick Start Guide
- Animations Guide
- FAQ
- Tutorial Videos

*MxM needs gameplay code to tell it what to do. You have to write the gameplay code to do that. MxM is an animation system, not a gameplay system.

**responsiveness and fidelity of the resultant animation is dependent on the quality, responsiveness and coverage of your source animations. Watch this video for more detail.

5 Likes

Congratulations on the release!

2 Likes

congratz. since I’m working on another part of the project, i’ll wait for a while. in the meanwhile i look forward to others videos.

1 Like

Day one patch anyone?

Update v1.1b has been submitted to the asset store for approval. Available now for verified users on the Discord. If you have purchased the asset, you can become verified by joining the Discord and send me a PM with your invoice number.

Changes:

  • Multi-contact events
  • Improved event pre-processing for more accurate contacts
  • Post event trajectory handling
  • Several bug fixes
1 Like

Hi all,

I’ve written some custom movement controller scripts that can be used with MxM. These are based off controller - model decoupling used in For Honor to help reduce footsliding.

The scripts are available to all verified users on the Discord (<- click the link to join). If you have purchased MxM be sure to join the Discord server and send me your invoice number (after joining) and I will give you verified status.

You don’t wan’t to miss out on these as I will only be providing these snippets on the Discord (not included in package) and I will be making scripts for pacour, fighting and other things.

Peace.

2 Likes

I’ve been informed that the Discord invite link wasn’t working. Here is a new link for those that want to join: MxM Discord

I’ve updated the other links on this forum thread

New practical video tutorial available. This goes in depth on setting up character locomotion. This is the first of a series where I’ll progressively build on the characters animation and show you each step of the way.

Also MxM v1.2b will be coming out very soon with a slew of bug fixes and improvements including the Blend Space tech which incorporates blend spaces into motion matching. This is something that I don’t believe has been done in motion matching before so it’s very exciting.

Tutorial 1: Basic Locomotion Setup (Available)

Tutorial 2: Blend space integration

Tutorial 3: Improving Locomotion with Input Profiles & Trajectory Error Warping (Coming Soon)

Tutorial 4: Strafing

Tutorial 5: Stance Changes with Tags(TBD)

Tutorial 6: Expanding on melee Combat (TBD)

Tutorial 7: Event System Introduction (pre-requisite for parkour)

Tutorial 8: Parkour - Contact and multi-contact events (Parkour)

Tutorial 9: Parkour - Climbing (anim data switching) (TBD)

3 Likes

great idea and good start video. how long do you think you can finish them all?

1 Like

Some will happen quicker than others because I’ll have to code example gameplay to communitcate animation needs to MxM like pacour. I hope to get 2 more out by next week depending on how long they take.

1 Like

MxM v1.2b has been submitted for approval. It is available now on the discord to verified users so I recommend joining. As far as I know, this is the first motion matching system to incorporate blend spaces into regular matching. This significantly improves the viability of using cut clips with motion matching. Changes noted below:

UPDATE MXM v1.2b (05/06/2019)

  • New blendSpace tech (see section 5 of the user manual)
  • Improved trajectory curving on MxMSimpleController
  • Several bug fixes
  • Several quality of life fixes
  • Updated demo scene with slightly better pre-processor configuration
  • Updated documentation for multi-contact events and blend space tech

*Note: Please delete the ‘Motion Matching’ folder in your project before importing v1.2b

3 Likes

New tutorial video available. I decided to split up blend spaces and strafing so the videos weren’t too long.

1 Like

I made a new trailer for MxM. Huge makeover. The previous one was just a little dull.

Note: This demo scene not included with the asset

2 Likes

Could you share a playable build of the demo scene?

Hi, I am working towards having a playable demo scene with pacour. However, it’s not quite ready yet. That doesn’t mean MxM isn’t ready for it. MxM is a generic animation system and all the functionality of that animation system shown in the trailer is working as shown.

However,

As it is a generic animation system, it does not handle gameplay code. Things like wall running and vaults etc. require gameplay code to tell MxM where it wants the character to ‘contact’ the walls etc. For this demo scene I set up a bunch of tests to ensure the animation system is working as intended but the example gameplay code for that is not quite ready to ‘play’.

As MxM is in Beta my main focus has been on the animation system itself but I absolutely want to provide a playable demo so people can try before they buy. Totally understandable.

Note: The demo scene in the trailer is not the demo scene in the package because I don’t have the re-distribution rights to some of the assets. The code behind it all is absolutely in the asset of course. When MxM comes out of beta the demo scene will be more similar.

2 Likes

Sure, I understand. Still would love to see it in action in a playable build, before buying. Looks like a great asset though.

1 Like

MxM 1.3b has been submitted to the Unity Asset store and will be available soon.

It is also available for download on the MxM Discord channel for verified users. If you have purchased MxM and have not yet joined the Discord, simply PM me a copy of your invoice when you have joined and I will give you verified status.

Update 1.3b brings some significant improvements to the event and contacts system, making it easier to use and improving the existing system significantly. I will have the next tutorial available soon to help demonstrate these features.

New practical tutorial available. This time we get the primer on events. I didn’t make it to parkour in this video because it was getting too long. HOWEVER! all the stuff in this video is the foundation for doing parkour and combat which will be done in part 2.

1 Like

it ended before the best part :slight_smile:

1 Like

I like it very much so far. Also the tutorials are super helpful.
Here are some questions/suggestions:

  1. Is it possible to use Unity Animation Events (the one that call a method at the MonoBehaviours, not the MxM ind of events)? The reason is, that I would like to play sounds at certain times in the animation (footsteps, sword hits, …)

  2. Would it be possible to mark compound animations with a “mirror” flag that not only adds the original animation to MxM but als the X-axis mirrored animation; Would be useful to increase the amount of available motion data without adding additional memory for motion files.

  3. If 2 would be possible, an extension would be to add another option to only mirror the part from the hips downward.

  4. Another useful extension would be to mark certain time spans in the MxM timeline for certain perposes. For example mark the time where an IK system would override the MxM animation; to adjust a grab animation. This can also achieved if we get at least 1. May be the new “event warping” can solve this also? I eagerly await the 2nd part of the event tutorial.

1 Like

Hi, thanks. There will be more tutorials to come so stay tuned.

I’ve answered your questions below:

  1. MxM uses Unity’s playable system to play animations so AnimationClip events should be triggered just like any other animation. In addition, I am working on an in-built ‘event’ system of this kind which should be more flexible.

  2. This is on the roadmap to investigate in the future but my priority at the moment is to get the core of MxM to a point where I can say its no longer a beta.

  3. Will be investigated at the same time as No. 2.

  4. Generic tagging is coming very soon and it will enable you to do this. I already have the groundwork for generic tagging working for a specific case but I will also add functionality to add custom tags that can be queried or triggered.

Hope this helps answering your questions.