Kinect MoCap Animator
Please note, the MoCap Animator works with body recordings only. These body recordings can be created with the help of “Azure Kinect Examples for Unity” or “Kinect-v2 with MS-SDK”-assets.
‘Kinect MoCap Animator’ is a sensor independent tool. It doesn’t work with live sensor data, but instead with body recordings only. These recordings can be created with the help of other Unity assets, like “Azure Kinect Examples for Unity” or “Kinect-v2 with MS-SDK” v2.20 or later. This package can be used on Windows platform with all versions of the Unity Editor – Free, Plus or Pro.
How to run the ‘Kinect Mocap Animator’:
1. Create a body recording with the recorder demo scene in the K4A-asset or K2-asset.
2. Import this package into a new Unity project.
3. Open ‘File / Build settings’ and switch to ‘PC, Mac & Linux Standalone’, Target platform: ‘Windows’.
4. Copy the previously created body recording file to the root folder of the ‘Kinect MoCap Animator’ project.
5. Open and run the KinectMocapAnimator-scene.
6. Change the name of the body recording file, or the user index, if needed.
7. Press ‘Start MoCap’ to start capturing the body motion of the selected user from the beginning.
8. After the MoCap Animator finishes, you can find the recorded animation in the ‘Recorded’-model under ‘KinectMocapFbx/Models’-folder.
For more information, see the Readme-file in the package, the online documentation here, or the online documentation as pdf.
How to retarget the recorded animation to other models:
You don’t need to replace the models in the Mocap Animator with your own, to utilize the recorded animation clips. Instead, you can utilize the retargeting capabilities of Unity’s animation system Mecanim. To do it, please follow these steps:
1. Copy the model with the recorded animation clip (by default this is: Assets/Models/Recorded.fbx) to the Unity project, where you plan to utilize the animation. Feel free to rename it, as you like.
2. Select the copied model in the Unity editor. Then switch to the Rig-tab of its Import settings, and make it Humanoid.
3. Go to the Animations-tab of the Import settings, to see the animations. Feel free to make changes, like setting the Start & End frames, Loop time, etc. Don’t forget to apply these changes.
4. Open the scene where your model should play the animation clip, and select it in Hierarchy. Make sure its Rig in its Import settings is Humanoid, as well.
5. Please also make sure the model has an Animator-component, and there is animator controller assigned to it. If there isn’t one, please create a new animator controller in the Assets-window, and assign it to the Controller-setting of the Animator-component.
6. Open the Animator-window (menu Window / Animation / Animator).
7. Drag the recorded animation clip (or the entire model) and drop it into the Animator window. The recorded animation will show up in the Animator’s state machine.
Download:
* The ‘Kinect Mocap Animator’-package can be purchased and downloaded in the Unity Asset store. All updates are and will be available to all customers, free of any charge.
Free for education:
The package is free for academic use. If you are a student, lecturer or university researcher, please e-mail me to get a free copy of the K4A-asset directly from me.
One request:
Please don’t share this package or its demo scenes in source form with others, or as part of public repositories, without my explicit consent.
Documentation:
* The online documentation of the ‘Kinect Mocap Animator’-package is available here or as a pdf-document.
Output File Formats:
To get the output file in the format you need, change the ‘Output file format’-setting of KinectFbxRecorder (component of the KinectController game object in the scene). Don’t forget to change the extension of the saved file in ‘Save file path’-setting, if needed. Keep in mind that in this case you may not see properly the results of the mo-cap in the scene. Here are the available output file formats:
- FBX binary – saves fbx-file in binary format;
- FBX ascii – saves fbx-file in text format;
- FBX 6.0 binary – saves fbx-file v6.0 in binary format. This is the by-default setting;
- FBX 6.0 ascii – saves fbx-file v6.0 in text format;
What’s new in version 2.0:
1. Updated the Mocap-animator to use only body recordings, created by the K4A- and K2-assets.
2. Updated the user interface of the KinectMocapAnimator-scene.
3. Cleaned up code. Upgraded to Kinect scripts to v1.15 and FBX wrapper to v2019.0.
4. Upgraded to Unity Editor v2019.1.0f2.
