Game animations: Share your workflows creating/managing/exporting your animations.

Hi all.

I’m having a bit of a rough time trying to come up with a good way of getting animations ready for games and i thought i’d see how other people generally handle it and see if i can learn some good habits. So please feel free to go into length about the ways you’ve streamlined the experience for yourselves :slight_smile:

This question is not very specific and thus hard to answer but I’ll give some UE4 perspectives. If you’ve got a specific engine in mind it might be better to just ask on that engine’s forum.

First basic stuff: 0.01 metric scene scale, export FBX without leaf bones with only the armature selected. You can choose whether to have all animations in one huge FBX file or split them into one animation per FBX file (lower filesizes). I choose the splitting method because I use cloud backups and having to reupload the FBX file with all animations (probably 100mb+) after making a single change is just too painful.

If you want to export a single action you choose it in the Action Editor, then export with All Actions and NLA stuff disabled.

For the rig it may be useful to use the default UE4 mannequinn skeleton but with some modifications so you can easily use animations that already exist in the engine with it. You would import the rig and add some IK stuff in blender for easier animating. If you import it and don’t add anything you will have a FK rig that will be pretty painful to use. Or you can use a rig of your own if you’re prepared to have worse results with retargeting (I use bepuIK for example). If you make all animations yourself it will be fine though.

For the animation itself it’s pretty straight forward. For games you use shorter loop style animations. Instead of making an animation that’s something like “run forward and turn” you would make a run forward animation, then a turn animation, and combine those two animations in the engine. This way (modular workflow) you’ll have flexibility with your animations.

Also something else specific to UE4, when you want to use root motion (animation locked movement, like Dark Souls or something) you can’t use the root bone in your rig itself but instead you must add the root movement to the armature object in object mode. An easy way to fix this is to first make the whole animation in pose mode, then add locrot keyframes to the armature object in object mode on the first frame of the animation, then cut the animation from the root bone in the rig and paste it to the armature object. You could probably write a script for this if it’s something you use a lot.

Lastly if you make changes in blender for an animation and then export the FBX to the same location you can click Reimport in UE4’s persona editor and it will reimport that file, this way iteration is pretty fast.

Probably the most important thing to keep in mind with animation in blender for games is that there are options in blender that don’t have an effect when exported, like disabling inherit scale for certain bones. In game engines if bones are connected with parent child relationships the child bones will scale along with the parent bones so you can’t use scale for “stretchy” rigs but you’ll have to use location transforms instead.

Stuff like this helps. I find that a lot of the export workflow carries through in different engines. But you’re right as well, I could go to the unity forums (my engine) for more effect help. I feel like they’d be mostly programmers and spread out generalists, but i could be wrong.

I did found out from you that I could export a character while just selecting the bind armature.

Actually i found a way to have stretchy rigs but the pay off is that you have stretchy bones parented to the root of the rig (unconnected). This would mean that in game transformations would break. Especially for things like Rag-doll physics and full body IK. I’m thinking that if there were a way to bake the disabling of inherent scale then it could be possible. Imagine an algorithm like: scale of child - scale of parent = correct scale, next bone etc…

Though, I’m no programmer, I don’t know how i’d implement it.

I think there are lots of animators in the unity forums. Maybe they use other software (and say stuff with weird names) but most techniques should work in blender too.

For the stretchy rig maybe you could try to use location transforms instead of scale transforms. That way further bones in the chain should not be affected.