Releases: Remi123/MotionMatching
v0.8.0-Alpha4
This is a smaller release intended to provide MMAnimationPlayer and PostProcess nodes to those seeking it.
Don't try to use anything in MMAnimationLibrary, or MotionFeatures. The readme provide help on what is stable or not.
The binaries a separated by OS, debug mode and precision. If you don't know what precision the editor use, then it's probably single. Prefer release mode over debug if you want to use this library.
v0.7.0-alpha3
This release is a complete overhaul on how we manage memory and the animation is now much more robust.
Here is the most importants notes on this release :
- The kdtree and all the data is now inside
MMAnimationLibrary. This make more senses since we can createMMAnimationLibrarywith purpose like "Locomotion" or "Attack" and query different information. It also allow reusing the same kdtree. MMAnimationPlayeris now always initializing. In case the current animation finish, the body will inertialize to the last frame of the animation, instead of clipping to it. This also allowed the creation ofrequest_pose(animname,timestamp)which move the body to the skeleton position at that time in the animation.MotionFeaturesnow have a series ofPackedFloat32Array serialize_XYZ(obj:Object)functions that let you obtain the information from the node that know the information. For exampleBonePositionVelocityMotionFeaturehasserialize_mmplayer(mmap:MMAnimationPlayer)and it retrieve the information correctly. Append all theMotionFeaturesresult into a single PackedFloat32Array and useMMAnimationLibrary::query_pose(accumulated_features_info), this will return a dictionary containing which animation and what time is the closest.
I still need to write the docs, but in a nutshell.
- Create a
MMAnimationLibrary, and add all animations inside it. - Select the
MMAnimationLibraryin the file explorer, then you will see a MotionMatching tab in the bottom editor and a few options in the Inspector. - There is a MotionFeatures array in the Inspector, fill it with a few
MotionFeatureresource, then fill the info. In the Bottom Panel, pressBake, wait a little and there you go. - At runtime, for each features in the motion features, call
serialize_XYZand append the result to an array. The order is VERY important. - Call
var pose := MMAnimationLibrary::query_pose(serialized_info)and pass the result to theMMAnimationPlayer::request_animation(pose.animation,pose.timestamp). - Repeat this process as much as you want.
There is some missing detail that the doc will go much further into, but this is the TLDR on how to use it.
v0.6.0-alpha
This release, still in alpha and WIP, fixes a few issues, rework how to query the database and store node information. But the biggest addition is the MMAnimationPlayer node, which introduce Inertialization to our transitions.
Still WIP, but MManimationPlayer was the missing feature. Inertialization make MotionMatching possible by giving transition a realistic feeling.
However, instead of play(...), you must call request_animation(AnimationName,TimeStamp) with AnimationName being the string of the animation and TimeStamp being the time at which you want to play the animation (usually 0.0, but in MM it can be anytime).
However, a few AnimationPlayer functions are now unavailable ( play, advance, seek, etc ...) but request_animation should cover most of the functions.
Alpha release. Fixed some issues
This is the initial alpha-release of the addon.
EDIT : Included various fixes.
It's a GDExtension to add to your addon folder. However it isn't explained yet so if you don't know how it work it is difficult to add to your project.
What it contains :
- MotionPlayer Node for motion matching that you add to your characterbody3d.
- Plugin for interacting with the MotionPlayer and see information.
- A set of MotionFeatures to add to the MotionPlayer
- CritDampSpring for help with the character controller movement.
- CircularBuffer to help with saving last X position or any Variant.
What it doesn't contain :
- Demo or any explanation on how to setup it up. ( Will be added soon ).
- Animations with root motion ( you have to provide them yourself.)
- Character.
- Inertialization or any method to blend the current animation to the result of the motionmatcher query.
Once everything is setup, it is possible to add motion matching to the character. However, it's still a WIP, so this release is for checking with potential user if thing doesn't crash once loaded.
Here is a preview on the result. There is some imperfection because the weights aren't properly adjusted yet, but it give interesting results