For those who are interested in exploring the use of Motion Capture files in their animations this bit of information could be invaluable. I literally spent days researching how to import a motion capture FBX file into Maya 2011 and found absolutely nothing that didn't involve importing the FBX into Motion Builder and then exporting it out and back into Maya or using a plug in or mel script. None of these are necessary for Maya 2010, 2011 or 2012 as these versions of Maya come with an FBX import tool. If you want the latest version of the import tool you can get it from the link below. For those of you on older versions of Maya, I am unsure if this tutorial will work for you. So for you 2010, 2011 and 2012 users there is a very easy way to make this work without getting other programs, plug-ins or scripts involved.
This tutorial requires knowledge of character rigging, skin binding, and skin painting in Maya.
First I'd like to point out that Autodesk has developed a really cool free program to handle FBX files called FBX Converter. It runs seperately from Maya but it is a necessary tool for those who want to use a MoCap library to save time. It is available here: https://usa.autodesk.com/adsk/servlet/pc/index?id=6837478&siteID=123112. To give some insight about the FBX converter, it is a stand along free application...did I say free?...that allows the user to drag and drop fbx files into the queue and view the animation, provide import and exporting into Motionbuilder or Maya. It also allows some really cool exporting options for Human IK and Vector Displacement from Motion Builder into Maya. But this tutorial is about importing an external FBX Motion Capture file into Maya and getting it to work with an existing model.
So enough of the introductions....on with the tutorial.
First I searched the internet for some free motion capture files in FBX format. These are abundantly available on the internet so I am not going to go into where to find them. In particular I was searching for a Salsa dance sequence for my Day of the Dead characters that will be featured in a local commercial. I found a few files but had no way of previewing what the animations looked like. That's where the FBX converter tool comes into play. I dragged the FBX files onto the Converter tool and watched the animations with the built in viewer and selected a couple FBX files that I thought were best for my characters. Now some of you are thinking "I hate text tutorials"...but believe me, it is seriously as easy as I am describing it. The program is straight forward and user intuitive.
So once I chose my favorite FBX files I simply hit the Conversion button at the bottom of the screen and specified an output directory and new file name. The FBX converter writes a new FBX file that is compatible with Maya.
Import your converted FBX file into your Maya scene containing your model. You must remember to scroll through the import file type options and select FBX as the import type. Keep in mind that many of these FBX files are extremely large in scale and once you bring it into your scene you will realize that it is GIGANTIC in relation to your model or smaller. If anyone is wondering what the FBX file looks like once it is in your scene, it is simply a character rig or skeleton like the picture at the top of this step. So if your FBX rig comes in too big or too small you need to adjust the import scale of your FBX file. Delete it and try again. If you look closely at the options when you are importing you will notice that the scales start with Millimeters then Centimeters, then Decimeters, etc. You need to get the scale as close as possible from the start as scaling your motion capture fbx skeleton may result in some un-desireable movements. If your character is too big, change the scale to the next size up. So for example if you selected Centimeters and the character is too large, select Decimeters. I know it sounds backwards.
Once your Motion Capture FBX rig is in your scene you will notice that there are red tick marks along the timeline. Obviously that is the animation information. Test it by hitting the play button at the timeline. The FBX rig should start to animate just like it did in the converter viewer. What you will notice is that it may or may not be exactly where you want it on your grid and the animation may not be exactly as you want it and may need some fixing. This is easy enough to fix later. Maya usually places the rig dead center on the grid but sometimes your scene information may be Match Moved and have a specific scale and the placement and scale may not be exactly like you need it to be. Unfortunately you can not simply move it because the animation is tied to it's specific location along the x and y coordinates. The same issue applies to the scale. This information is programmed into the motion capture animation and should not be messed with. If you need to change the location or scale of your character slightly, it can be done by going to the attribute editor menu at the right side of the screen. Look at the coordinates of your FBX skeleton and mess with the X, Y and Z numbers until you character is more or less where you want it to be. Keep in mind that using this method to move your character to another place on the grid will lock your character to a range of motion that may not be desireable. The animation may become linear and smashed. I am not sure if there is an easier way to move the model in this situation. If anyone knows of one, let me know. Most people I know work around the mocap and add the scene information afterwards. So the only time I can see this option not working is when you are working with a Match Move camera and are stuck with what you get.
Next you will need to pose your FBX rig into a standard "T" pose. Simply select the first frame on the time line and re-pose the rig. Do Not move the time line or you will mess up your mocap animation.
Now you need to check the skeleton for proper joint names. Depending on where you get your mocap FBX file you may notice the joints are not named. Under the Animation menu, under the "Skeleton" pull down, there is a reveal or show joint names. Once you activate this you will notice that your FBX rig may or may not have proper joint names. This will affect the next step. If your joint names all say "none" you will need to name them using the name joints command under the same pull down. There is not an option to make up your own names, you will need to select what the joint is called from the list given to you. Once your joints are all properly named you can go to the next step.
Scale your model up to match the FBX rig as close as possible and move it on top of the rig. Your model should be in a standard "T" pose as well. Scale and move it really close to where it needs to be. You can tweek your FBX rig by selecting and moving the joints very slightly to match up with the locations on the model. Do not move them too much as your model will distort once you marry the model to the rig. Once you have your rig and model lined up it is time to apply the skin to your rig.
Select each joint on the FBX rig by holding the shift key. They will turn white as you select them. After all the joints are selected keep holding the shift key and select the model. Go to the top menu and select "Skin" bind skin, and select the little options box next to smooth bind. Make sure your options are selected as bind skin to selected joints and on the next tab down also by nearest (not by heirarchy). Hit apply and now your model is skinned to the FBK rig. If all went well you should be able hit play and watch your rigged model move with the mocap animation. If you are lucky you are done, however you may need to tweek the rigging by using the paint command for the skin weights and fix some of the strange movements.
If you need to fix any of the mocap animation, now is the time to do it. Simply find the offending frames and position your FBK rig to the revised location and key the frame.
That's all there is to it.
Author: Jeffrey Mettling
Submitted: 2011-04-12 15:20:29 UTC
Tags: motion capture, maya, animation, and fbx
Mobility Game Animation Pack for Maya
JPose and Animation Tool for Maya 1.2.2 (maya script)
Quadruped Path Animation System for Maya 1.1.4 (maya script)
Animation Manager for Maya 1.0.6 (maya script)
"Rapid Rig: Poser" for Maya for Maya 2.0.9 (maya script)
Animation Data Recovery 1.1.0 for Maya (maya script)
BitCake Exporter - a Game Animation plugin 1.1.0 for Maya (maya script)
SearchNPick Animation Picker 1.3.0 for Maya (maya script)
Fight Animation Pack