= Mixamo Animation
:author: 
:revnumber: 
:revdate: 2017/05/25 13:04
:relfileprefix: ../../
:imagesdir: ../..
:experimental:
ifdef::env-github,env-browser[:outfilesuffix: .adoc]


[NOTE]
====
In the near future the Mixamo website will be undergoing some changes that will have some level of effect upon how you animate your character. The only real difference that Adobe says will happen, with respect to auto-rigging your characters, is you no longer can store the assets on the Mixamo website. See this link:http://blogs.adobe.com/adobecare/2017/05/23/download-assets-from-mixamo/[notice] for more info.
====

== Using Mixamo For Model Animation

With very little effort, you can use Adobes Mixamo to fully animate your Blender models. Once you understand the process that is. This guide uses link:https://www.blender.org/download/[Blender version 2.78c] with its default settings along with the Ogre exporter 0.6.0 found <<jme3/advanced/ogrecompatibility#,here>>. You are expected to have at minimum a modest amount of Blender knowledge. You will need to have FBX file Importing and Exporting initialized in Blender. 

== Prepare to Export

To properly animate your models there are a few rules you must follow.

*  Read the link:https://community.mixamo.com/hc/en-us/articles/210310918-Auto-Rigger-Troubleshooting[Auto-Rig Error Troubleshooting] guide before you do anything else.

*  Clean up your Blender file before exporting. This means you have a game ready model that will become the base for all your animations. The following checklist is provided for your convienence.
[%interactive]
- [ ] You have no Animations.
- [ ] You have no Actions stored in the Dope Sheet Action Editor btn:[Browse Action to be linked] buffer.
- [ ] You have UV Mapped your model.
- [ ] You have one Material named the same as your mesh.
- [ ] You have baked and packed your Texture (ie, your using a texture atlas).
- [ ] You have cleared the UV, Material and Texture buffers of unused images, materials and textures.
- [ ] You have applied the Location, Rotation, and Scale to your model.
- [ ] *MOST IMPORTANT OF ALL*, in the `menu:Properties Panel[Scene Tab > Unit Panel]` set the btn:[Unit of Measure] to Meters and the Length to Metric. Adobe uses centimeters for the FBX exporter and if this is not set the models scale will be unusual to say the least. Besides that, JME3 uses 1 WU = 1 Meter so this will keep things consistant. If you are doing this now, you may have to rescale your model before proceding.


== Blender Export


.  In the 3d viewport select your model, it will be high-lighted in orange.
.  In the `Info` header select `menu:File[Export > FBX]`.

.FBX Exporter
.  Enter a file path to export to, usually the same directory as your `.blend` file for simplicity.
.  Enter a file name.
.  In the `Export FBX` panel, located in the bottom left of the export dialog, under the `Main` tab, toggle on the checkbox `Selected Objects`.
.  Leave the `Scale` at 1 but click the button next to it to deselect btn:[Scale all data]. Failure to do so will destroy the scale of your model. If the button is selected, it will be dark in color.
.  Leave the `Forward` and `Up` axis at the default of `-Z Forward` and `Y Up`.
.  Under `Which kind of object to export` deselect everything but `Mesh`. 
.  Under the `Geometries` tab, select `Apply Modifiers`.
.  When you are done, click the btn:[Export FBX] button to export the file.

[TIP]
====
You can save these FBX export settings by clicking the btn:[+] button next to btn:[Operator Presets].
====


== Mixamo Import


.  Create an link:https://www.mixamo.com/[Mixamo] account and login.
.  Navigate to your `My Assets` directory.
.  Select `Upload`.
.  Navigate to the file to be uploaded or drag and drop it onto the file uploader.


== Auto-Rigger


If everything went well the `Auto-Rigger` will open and your model will be facing you.  If not, fix your model in Blender before proceeding. 

.  If the model is facing you click btn:[Next].
.  In this panel you will rig your model. Place the markers as shown in the Auto-Rigger dialog image. 
+
[NOTE]
====
Remember that the model is facing you so its right is on your left.
====

.  Select the LOD you are after. This is based off how many bones you want the hand of the model to have. Feel free to cycle through the options to see what each one does.
.  When you are through click the btn:[Next] button to rig your model.
+
[NOTE]
====
This may take some time and if the model does not appear within 2 minutes something has went wrong and you will have to restart the upload process over. This is trail blazing  so keep that in mind. 
====

When the model appears, click through to the end.


== Download


Navigate to `My Assets`. You should now see your model in a TPose position. This will be your base model for all animations. We will also use it as our newly rigged model for Blender.

.  Select the TPose model and then click the btn:[Queue Download] button.
.  In the `Download Settings` dialog the `Format` is FBX and `Pose` is TPose.
.  Click the btn:[Queue Download] button.

After the file is ready, it will be in your `Downloads` directory on Mixamo.

Click the btn:[Queue Download] button under `Status`, rename the file to TPose and save the it to your computer.  Preferably in the same directory as your blender file.


== Preparing Blender for Animations


Before you can import any animations from Mixamo, you should have a file that is separate from the model file you exported earlier. Although its not required, it's best to do so. Things can go wrong and you dont want to destroy your model file by accident so it's always best to keep things separate. Our plan of attack is we will create a `.blend` file for every animation and then use this seperate file to combine them into one.

.Blender
.  In the `Info` header at the top of the program, select `menu:File[New > Reload Startup]`.
. Select the default cube and delete it.
.  In the `Properties` panel, located at the bottom right, select the `Scene` tab. In the `Units` panel change the `Units of measure` to `Meters` and `Length` to `Metric`. You must *always* have these settings when importing from or exporting to Mixamo.

[TIP]
====
You should create and save a default startup file in Blender. `menu:File[Save Startup File]`. This way you will not have to constantly redo things. Setting your `Units of measure` is the least you should do. You can always restore the default startup file by selecting `menu:File[Load Factory Settings]` at any time.
====

.  In the `Info` header select `menu:File[Import > FBX]`.
.  Select the file TPose.fbx file you downloaded earlier.
.  In the `Import Fbx` file located at the bottom left of the import dialog, leave all settings at their defaults.

.Main
-  Scale = 1
- [x] Import Normals
- [x] Import Animations
- Armature offset = 1
- [x] Image Search
- Deacal offset = 0
- [x] Use pre/post rotation

.Armatures
- Nothing checked

When ready click btn:[Import FBX].

























