{"id":51681396,"url":"https://github.com/nekuzaky/kinema","last_synced_at":"2026-07-15T14:01:21.425Z","repository":{"id":371293795,"uuid":"1300163897","full_name":"Nekuzaky/Kinema","owner":"Nekuzaky","description":"Data-driven motion matching locomotion for Unity: offline mocap bake pipeline, Burst-compiled weighted search with gait phase, PlayableGraph runtime, and an integrated editor window with recording, ghost replay and a search benchmark.","archived":false,"fork":false,"pushed_at":"2026-07-15T13:41:26.000Z","size":1439,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-15T14:00:13.275Z","etag":null,"topics":["animation","burst","character-controller","csharp","game-development","gamedev-tools","gameplay","inverse-kinematics","locomotion","mocap","motion-matching","playables","procedural-animation","unity","upm-package"],"latest_commit_sha":null,"homepage":"https://nekuzaky.com/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nekuzaky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-07-14T07:35:34.000Z","updated_at":"2026-07-15T13:43:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Nekuzaky/Kinema","commit_stats":null,"previous_names":["nekuzaky/kinema"],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/Nekuzaky/Kinema","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nekuzaky%2FKinema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nekuzaky%2FKinema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nekuzaky%2FKinema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nekuzaky%2FKinema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nekuzaky","download_url":"https://codeload.github.com/Nekuzaky/Kinema/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nekuzaky%2FKinema/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35507793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-15T02:00:06.706Z","response_time":131,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animation","burst","character-controller","csharp","game-development","gamedev-tools","gameplay","inverse-kinematics","locomotion","mocap","motion-matching","playables","procedural-animation","unity","upm-package"],"created_at":"2026-07-15T14:00:31.353Z","updated_at":"2026-07-15T14:01:21.394Z","avatar_url":"https://github.com/Nekuzaky.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kinema Motion Matching\n\n[![Unity 6000.3+](https://img.shields.io/badge/Unity-6000.3%2B-black)](https://unity.com/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](Packages/com.nekuzaky.kinema/LICENSE.md)\n[![UPM](https://img.shields.io/badge/UPM-com.nekuzaky.kinema-informational)](Packages/com.nekuzaky.kinema)\n\nData-driven motion matching locomotion for Unity. An offline bake pipeline turns `AnimationClip`s\ninto a normalized feature database; a Burst-compiled runtime queries it every few frames and blends\nto the best pose through a `PlayableGraph`; an integrated editor window drives, records and debugs\nthe whole loop.\n\nThe toolkit is packaged as an installable UPM package (`com.nekuzaky.kinema`) and this repository is\nalso a Unity project you can open to try the demo directly.\n\n## Features\n\n**Matching core**\n- Weighted nearest-neighbour search over baked feature vectors: past+future trajectory, per-bone\n  pose and velocity, root velocity, gait phase - Burst-compiled parallel job with a KD-tree option\n  for very large databases.\n- Live pose query: the query's pose half is sampled off the rendered skeleton (after IK), not copied\n  from a database row, so the cost function judges what is actually on screen.\n- Foot-phase cost term keeps candidates on-cycle, so a jump cannot cut a stride mid-step.\n- Critically damped spring trajectory prediction (selectable), deviation-triggered search on top of\n  the timed interval, idle-duplicate pruning at bake time.\n- Inertialization transitions (Burst animation job) or two-slot crossfades, foot-lock + ground\n  adaptation IK, stride warping, semantic tags (64-bit masks, filtered in the search job), motion\n  events with root warping, mirrored variants, calibration profiles, multi-database switching,\n  Mecanim interop.\n\n**Editor window** (`Tools \u003e Kinema \u003e Motion Matching Window`, Ctrl+Shift+M)\n- Overview / Database / Bake / Tags / Director / Debug / Analysis / Settings.\n- Director tab: play any baked clip on the live character like a custom Animator (scrubbable\n  timeline with per-foot contact lanes), record intent + pose, spawn ghost NPCs that replay a\n  recording through their own matching, bake a performance to a real `AnimationClip`, swap the\n  character's rig in one click.\n- `Tools \u003e Kinema \u003e Benchmark Search`: measures the real search cost (mean/median/p99, order-checked\n  against Burst's async compile) and converts it into characters-per-frame at a given search rate.\n\n**Demo** (`Tools \u003e Kinema \u003e Demo Scene`)\n- One menu item resolves its own source - an installed mocap pack, otherwise a dropped-in FBX (using\n  its clips or generating a procedural set) - bakes it, and builds a scene with a traversal course\n  (vault walls, gapped platforms, rising steps), full keyboard + gamepad input, and camera orbit.\n\n## Installation\n\nUnity Package Manager, \"Add package from git URL\":\n\n```\nhttps://github.com/Nekuzaky/kinema.git?path=/Packages/com.nekuzaky.kinema\n```\n\nRequires Unity 6000.3+. The sample uses the Input System package; the runtime has no package\ndependencies.\n\n## Quick start\n\n1. Open the tool: `Tools \u003e Kinema \u003e Motion Matching Window` (Ctrl+Shift+M).\n2. Create a config and assign a rig plus locomotion clips.\n3. Bake the database (Bake tab).\n4. Add a `MotionMatchingController` to your character and assign the database.\n\nOr import the \"Locomotion Demo\" sample and run `Tools \u003e Kinema \u003e Demo Scene` for a fully wired scene\n- drop a Humanoid FBX in the sample's Character folder first if you have no mocap pack installed.\n\n## How it works\n\nEach frame is baked into one normalized feature vector:\n\n```\n[ TrajectoryPosition 2*T | TrajectoryDirection 2*T | BonePosition 3*B | BoneVelocity 3*B | RootVelocity 2 ]\n```\n\nplus a parallel gait-phase channel used as an extra cost term. Matching is a weighted squared\ndistance over these vectors, evaluated by the query's predicted future trajectory and its live pose\nsampled off the rendered skeleton. The controller only cuts to a new frame when it clearly beats\ncontinuing the current clip, then crossfades or inertializes. See\n[the documentation](Packages/com.nekuzaky.kinema/Documentation~/index.md) for detail.\n\n## Repository layout\n\n```\nPackages/com.nekuzaky.kinema/   The package (Runtime, Editor, Samples~, docs, license)\nAssets/                         Unity project shell and the imported demo\n```\n\n## Testing\n\n`Packages/com.nekuzaky.kinema/Tests/Editor` holds EditMode tests covering the feature schema layout,\n`CharacterSpace` round-trips, the trajectory history ring buffer, the database's\nnormalization/accessors, idle-duplicate pruning, and end-to-end matcher correctness (nearest-\nneighbour, tag filtering, ignore ranges, phase cost) against synthetic databases built directly\nthrough `SetBakedData` - no rig or bake pipeline required. Run them from Unity's Test Runner window\n(`Window \u003e General \u003e Test Runner`, EditMode tab) or headless:\n\n```\nUnity -batchmode -projectPath . -runTests -testPlatform EditMode -testResults results.xml\n```\n\n`Tools \u003e Kinema \u003e Benchmark Search` measures search performance directly (headless-runnable); see\n[TODO.md](TODO.md) for the gaps that remain (PlayMode/runtime feel automation, standalone builds).\n\n## Demo assets\n\nThe demo character is provided by [Adobe Mixamo](https://www.mixamo.com/) and remains subject to\nAdobe's Mixamo license. It is included only to make the demo runnable and is not covered by this\nproject's license. A richer demo path exists for the (separately licensed, not redistributed) Opsive\nOmniAnimation mocap pack - see [the documentation](Packages/com.nekuzaky.kinema/Documentation~/index.md).\n\n## License\n\nMIT. See [LICENSE](Packages/com.nekuzaky.kinema/LICENSE.md).\n\nAuthor: [Nekuzaky](https://github.com/Nekuzaky).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnekuzaky%2Fkinema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnekuzaky%2Fkinema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnekuzaky%2Fkinema/lists"}