Sword Swing Animation Generator

R6 Sword Animation Generator - ML-Powered Combat Animations

I’ve been working on a machine learning tool that generates procedural sword combat animations for R6 rigs. You input a slash pattern (like diagonal 1→9 or overhead 2→8), and it outputs keyframe data that you can import directly into Roblox.

What it does:

  • Generates unique sword swing animations based on start/end positions (1-9, numpad layout)
  • Trained on keyframe data
  • Outputs JSON that can be converted to Roblox KeyframeSequences
  • Includes GUI for easy use + CLI mode for scripting

Tech Stack:

  • PyTorch neural network (trained on extracted animation data)
  • Windows executable (no Python required for end users)
  • Lua importer script for Roblox Studio

Current Status:

This is an MVP release. Animation quality varies depending on the pattern, and it’s limited to R6 rigs with a sword tool in the right hand. Looking for feedback on:

  1. Animation quality/realism
  2. Ease of use
  3. Feature requests

Example Usage:

  1. Download the executable
  2. Enter pattern (e.g., 1→9 for top-left to bottom-right diagonal)
  3. Copy generated JSON
  4. Use AnimationImporter.lua module to load it in-game

GitHub: [Repo link]

Would love to hear thoughts from the community - especially if anyone has ideas for improving the training data or animation smoothness!

3 Likes

looks cool, can you provide a demo video?

1 Like

will do, some patterns are finicky though but with more data should look smoother

1 Like