this post was submitted on 27 May 2024
33 points (100.0% liked)

Godot

6005 readers
11 users here now

Welcome to the programming.dev Godot community!

This is a place where you can discuss about anything relating to the Godot game engine. Feel free to ask questions, post tutorials, show off your godot game, etc.

Make sure to follow the Godot CoC while chatting

We have a matrix room that can be used for chatting with other members of the community here

Links

Other Communities

Rules

We have a four strike system in this community where you get warned the first time you break a rule, then given a week ban, then given a year ban, then a permanent ban. Certain actions may bypass this and go straight to permanent ban if severe enough and done with malicious intent

Wormhole

[email protected]

Credits

founded 2 years ago
MODERATORS
 

This is just a question.

In case you don't know, motion matching is the term for animating characters... basically in a way that smoothly blends minor and even major animations into each other, such that characters are animated much closer to life.

It is most notable in scenarios where a character rotates their axis of movement dramatically, or speeds up or stops suddenly. Instead of the more old school instant rotation or sudden transition from running to stationary, you get a dynamic and procedural animation. Perhaps most notably, feet and legs actually take steps, instead of gliding, during transitions.

It is not the same as inverse kinematics. That basically just matches feet and legs to the geometry they are standing on, for stairs or inclines. (You can use it with arms for things like adjusting arms during arm anims to better match individual weapons or other things, etc.)

Unity, Unreal and O3DE all have freely available motion matching plugins, and I know Unreal and O3DE have freely available prepackaged humanoid animation libraries. Unity probably does as well, though more expansive anim sets cost some money.

So... question is: Is motion matching even possible in Godot? Is there some plugin hidden in GitHub or somewhere that does this?

From what I've been able to figure out... the YMAA project... apparently? claimed to be working on this, but their repo has not been updated in months, their current release does not even have half the features they show off on their youtube channel, and they appear to now be making a machinima or something so who knows.

That is all I have really been able to find. A few other github devs and youtube channels have extremely rudimentary procedural animation in demos, but either they have not listed their code anywhere or its been abandoned for months or years, sometimes since before Godot 4.

So yeah, anyone know if there is a Godot Motion Matching plugin?

top 7 comments
sorted by: hot top controversial new old
[–] [email protected] 5 points 6 months ago (1 children)

I hadn’t heard of motion matching, but it sounds similar to animation transitions? Does this (granted, older) video demonstrate what you want?

https://m.youtube.com/watch?v=s1mW3tIm4ak

[–] [email protected] 6 points 6 months ago* (last edited 6 months ago)

Nah, this is far more simplistic, and really only works convincingly in 2d, with a... lets call it either minimalistic or simplistic art style.

Motion Matching is what makes a lot of Triple A games stand out for their extremely realistic animations.

Think Assassins Creed after I think 2017, or GTA 4, 5 and RDR2, though the rockstar games also include procedural animations reacting to physics. Basically, many high production value third person games use motion matching, though there are still many that dont.

MGS5 and I think Death Stranding do not use motion matching, its all a complex but ultimately static animation tree.

Motion matching starts with a library of anims that you set up in an anim tree, including transitions if you have them, but it procedurally generates transitions based on input, predicted character path, speed, etc.

Heres a vid showcasing motion matching... describing it in text does not really do it justice.

https://m.youtube.com/watch?v=m-Zwh6dpA6U&pp=ygUYbW90aW9uIG1hdGNoaW5nIHNob3djYXNl

The best way I can describe it in text was that the feet never glide. The feet, and thus legs, to the root pelvis, all actually take all the steps they'd need to say turn 5 degrees, 35 degrees, or 225 degrees.

This is done procedurally, instead of trying to make transition animations for all possible variants of all possible transitions.

Watching this vid and then comparing it to say Counter Strike, you can see that this means that many minor animations of short strides, pivots, sort of trotting to a stop, or turning... all of these things are basically semi procedurally generated so that a character moves much more realistically and far less... video gameily, lol.

If standard animations are a small or large trees of switching from one anim to another depending on input, or things that happen to the character, motion matching is taking that tree and procedurally generating transitions between those anim states.

Thats still oversimplified but Im trying here.

Motion matching works better with more anims in your tree. Theres also tons of very poorly done tutorials showing off motion matching implemented so poorly you can barely tell, but this upcoming korean game does it extremely well such that you can really see the difference.

PS:

I have actually found examples in Godot of bending elements of an animated character to react to physical objects... like being hit by a moving object causing a flinch specific to exactly where and what part of the character was struck.

But it is far more rudimentary than the totality of the Euphoria system.

[–] qtip 4 points 6 months ago (1 children)
[–] [email protected] 2 points 6 months ago* (last edited 6 months ago) (1 children)

Nope.

See my other comment for more detail.

Again, summarized, motion matching is a system that builds off of an animation tree with procedurally generated transitions and blends which create a far, far more realistic fidelity of animation quality then standard anim trees allow.

[–] [email protected] 2 points 6 months ago (1 children)

I think they’re right, you’re looking for the blend tree features of the animation tree

[–] [email protected] 2 points 6 months ago (1 children)

Yes, blend trees are the very first step of how one would implement motion matching.

Problem is that fine tuning the algorithms that govern all that is pretty darned complex and time consuming.

Also, afaik, blend trees alone are not sufficient to allow godot to do motion matching, as there are outstanding requests for it on godot's git.

[–] [email protected] 2 points 6 months ago

That would make sense, I’m sorry about the lacking features! They sound super useful