Motion Capture animation guide for dummies (by a dummy)

Motion Capture animation guide for dummies (by a dummy)

I was asked about how to use motion capture (MOCAP from now on) to animate models, so ill expose it here for everyone interested to see.

Firstly, there are no mocap files for anything non human, so forget about anything non-bipedal (know of some good CC0 or CC-BY source? then please tell me), secondly, you need to have a good knowledge of Blender, i wont explain how to join skeleton to model or make a Nla track.

The best CC0 source of mocap files comes from Carnegie-Mellon, you must download the "Daz-friendly version" that has patched a lot of things, its over 1GB in 100MB long or so files

https://sites.google.com/a/cgspeed.com/cgspeed/motion-capture

Next download bvhacker, the tool needed to process them into usable:
http://davedub.co.uk/bvhacker/

What to do now? check "cmu-mocap-index-text" contained in all files to get an idea of what to find or find fast what you need, say you need a Walk animation, there are literally dozens of them, but after browsing trough them all, they all look the same, and could be categorized into a few types that repeat time and again, so get one walk animation you like and forget about the other walk animation. Overall i just created a few walks (big person, zombi, stiff person, woman, man... ) over 25 different ones with 2 or 3 in each group.
Special actions are more scarce, so you will only find a few files of swordmanship or gun firing.

So, you liked "120_03 - Mickey cast spell" mocap (being folder 120 one of the most cartoony and interesting), next is copying it somewhere else to preserve the originals, maybe now its a good time to create some new folders to categorize all the actions you need; i created "walk, run, attack, death, emotions, dance and idle" to fill as you process the files.
Going back to 120-03, install Bvhacker, its old and not maintaned anymore but has almost all needed options; open mocap file and it will show something like this:

Steps:
- Prepare-> Set T position (if your models have a starting T position, if not, avoid)
- Hit "XYZ" button, or individually to clamp the mocap to the axis, "Y" clamping is a must or else the animation will fail later at Blender; Warning, Y clamping will mess up certain animations, you may need to use Y slider to fine tune those without clamping it. This will made the animation dummy be half buried into the ground.

- Hit 1/2 Sample button until FPS counter is near 30.0 fps, the mocap has too much animation information, this will cut it to a good size; less than 30 will make the animation choppy and jumping.
- Hack-> straighten neck may be needed in some cases, it depends of your 3D model
- Now you can save it.
* Special cases: "the dummy is not looking towards me" hit rotation mode, use X Y sliders until it does (Warning! the programmer swapped them, X works over Y and vice-verse, that made me crazy for a bit); if that doesnt work, desist on that mocap file, the programmer never finished how to fix a certain kind of rotation, its useless, believe me.

Next: Blender
Here you have a decision to make, use the skeleton that will be imported or re-target to your own bones, i strongly recomend using the imported skeleton so i wont explain re-targeting which is more time consuming and complex.
First step:
File -> Import -> Motion capture (bvh)
Change Scale from 1.0 to 0.15 (left corner) or try until it is as close as possible to your model in size (this depends on how big your model is)
Choose the imported skeleton and hit Ctrl + A -> rotation, scale, position <- If you skip this step EACH TIME you import an animation you are screwed up later
Now, join the skeleton and your model, if you dont know how to do this forget about mocap for now and start learning more Blender. You can modify the skeleton lightly to fit your model, big modifications of the skeleton will mess the animation.

Now to the good part, how to properly use it, this will import the whole animation, most likely with useless parts, its possible to cut it in Bvhacker but blender gives far more finesse, look for a nice cicle, that is, where the model animation position ends were it started or very close, remember that full cicle starting and ending frames, turn it into a NLA track, NLAs are really useful, for example, you can make several attack animations by cutting down a long sworplay animation.

Now you got one animation in, want to know something good? as the skeleton is already joined to the 3d model, any other mocap you import following the explained process will instantly be applied to your model without any other change (erase the new imported skeleton and keep the one you modified, the new animation is saved regardless), you can switch imported animations easily, to do that, open "Dope sheet" mode into a blender window, in the combox, switch from "Dope sheet" to "Action editor", a new combox will appear, in there you can switch all imported mocap animations. Only used animations will be saved when you exit blender, the rest are lost. With this you can easily prepare all animations you need for a given game model or perhaps the whole uncut animation is what you needed; that is a matter of what you are using it for.

An example of a model i animated using this way:
https://www.youtube.com/watch?v=LQRmZQU2yW0

Room to improve: you can add more bones to the initial ones, since mocap doesnt include fingers, mouth or eyes animations, it depends on how detailed you want the final result, you may also want to smooth animations with the graph editor.

Final notes: in the library i told about , there are not any death animations, so i had to get creative and cut animations of people sitting or falling down. So if you dont find something on it straigh away you can look for a similar action. Also, if you have a kinect you can make your own captures!