Does anyone else need these AnimationClip editing tools I created?

I have the following animation utilities:

  • Animation Hierarchy Editor (Credit to SMK and the others on GitHub)

  • Allows you to move animations originally assigned on a child object up to the parent

  • Animation Extractor

  • Takes two animations: Mixed and Raw

  • Extracts all tracks from Mixed that are not being set in raw

  • Saves them into a new AnimationClip called Handcrafted

  • Animation Blender

  • Takes two animations: Raw and Handcrafted

  • Creates a new animation Mixed containing all of the tracks in Raw with Handcrafted tracks inserted

In case you are wondering why on earth you might want something like this:

I have “Raw” animations imported from an external program. I then manually tweak those animations to add things like gameplay hit boxes to them. Then my artist will want to change the original “Raw” animations.

If I had edited the Raw animations directly, all of my custom work would have been destroyed when I imported the new animations. By working with a 3rd set of temporary animations called “Mixed”, I can do whatever I want. Then before I import my artist’s new animations, I do the following:

Extract all new AnimationCurves out of “Mixed” and save them in a dummy animation called “Handcrafted”.
Import all of the new Raw animations into my scene.
Use AnimationBlender to remix my Raw and Handcrafted animations into my “Mixed” animations, which represent my current work inside of the game.

I have no idea if I’m crazy, but this seems to be the only way to use inheritance like structure for nested game objects who need to be synced.

Interesting!

I’m sure I will need a tool like this in a year or two and not know how to solve the problem.

Are you actually editing the animations by adding hit boxes Or was ‘editing’ just the word you used to define parenting hit boxes to specific bones in the hierarchy?

You are creating a fighting or brawler game?

The way it works is as follows:

I have a prefab that gets instantiated when a player is spawned.
Contained within is the following (all of them are individual game objects, but this calls out whats relevant):

 PlayerPrefab
      CapsuleCollider - HitBox for Player
      BoxCollider - Sword
      GameObject - PlayerSpriteRoot
          GameObject - Pelvis
               GameObject - Chest
      ...

The PlayerSpriteRoot object is actually a prefab of its own, generated by some other program an artist uses to generate the tree and animations.

Then when I go to work, I do the following:

The PlayerPrefab always points to an outdated version of PlayerSpriteRoot. I open the mixer tool I wrote. It imports the new prefab.

Then it uses two sets of animation clips. One animation clip is generated by the animation tool to control PlayerSpriteRoot and its children. The other animation clip controls the movement of the HitBox for Player and Sword. The tool remaps all of the animation tracks from “GameObject” to “PlayerPrefab/GameObject” - Side note: Unity doesn’t support nested prefab?! WHY? I scan through the animations and make sure the gameplay matches up to what I want to be represented by the animation.

If something is amiss, I re-animate that hit box, then click “Extract Handcrafted Animations” and it pulls out the unique tracks and saves them for the next time I blend everything together. The net result is that I can tweak any gameplay parameters I want on HitBox and Sword, and no matter what the animator does, they will never accidentally obliterate what I’ve setup for gameplay.

This setup minimizes catastrophic failures with proper encapsulation of gameplay and art. Worst case, I could go back one check-in and extract out the curves and blend it into my working set. (Usually its faster to just reanimate by hand atm tho)

A future iteration of this could totally anchor the hitboxes to the bones as a post-process step, but that would mean creating an additional Prefab to store the “HandcraftedAnchors” and parameters, which adds additional points of failure to the process.

1 Like

Oh - and I’m creating a hybrid of a couple genres. Fighting style frame based collision is one of the features of the combat system I’m trying out.

BTW, you should really update your blog, I bet your animation skills have gotten substantially better.

1 Like

:slight_smile: Animation skills are an ever evolving and improving process, a lot of which hinges upon gaining additional knowledge and skill regarding the technical side of the animation pipeline.
An update is in the works, but it’s not going to be just an animation reel update - it’s going to be a game. - along with an updated animation reel.
Thanks for the detailed explanation!