Animation export

This workflow is now optional. The setup can be done directly from the Atoms UI. You don't need to process the asset anymore. If you are using Atoms 3.6.0 or a newer version, please go to the Building an Animation Clip tutorial.

 

Now let's have a look at how you can export an animation so that you can use it in Atoms Crowd.
The animated skeleton joints will need to have all the tags we set up when we exported our Agent Type files to export your animation correctly.

For this reason, we are going to start this task by opening the scene you saved when exporting the Agent Type files. You can also open the man.ma scene as it has all the attributes already set correctly.
Once you've loaded the file, we are going to import the Walk.fbx file from the data/clips folder.

Please make sure:

  • the first frame of your time slider is 0.

  • the FPS of your scene matches the FPS used when the FBX was exported. In this case, it was 30 FPS. It is easy to notice as you will not have all the joint key frames on integer frames.



Scale compensating is not supported (as in Maya). If you scale a joint all its children will be scaled.





 


The Animation Exporter Tool

You can open the skeleton and animation exporter tool using the shelf button or the menu. You can also open it via the Atoms menu: Atoms > Export > Skeleton/Animation Exporter

The Skeleton Exporter GUI will pop up. Make sure to select the "Animation" tab at the top of the GUI.

The workflow here is pretty similar to exporting skeleton and mesh definitions.
You'll have to select your "Root Joint", the "Hip" joint.

Then select the file type for your animation.

Then select a file path.

Leave the ground method to "User Value".

Now the "ground height". Atoms needs to know when the feet of your clip are touching the ground. The "ground height" field tells the exporter what is the height of the virtual plane your clip is walking on.
If your clip has the feet travelling just above the XZ plane and a value of 0 for the ground height is acceptable.
We are going to find the right ground height for the RightToeBase joint. First we need to find a frame where the foot is down.
Then you can create a locator or a plane and move it from the front camera until it approximately matches the foot tip of your right leg, the RightToeBase joint. Click on the “Pick from selection“ button in the exporter.
The "foot threshold" is the error approximation value for your ground height. In this case a value of 0.5 will be fine.

Please don’t worry too much about these values as you will be able to edit the foot down state directly in the Atoms UI later.

 



 




Checking your clip

This section explains how to check your clips in Maya, this workflow is obsolete as you can directly change the foot lock down state directly in the Atoms UI later. Still it is important to understand how you can edit directly your animation in Maya.

Let's import the fbx we just exported on our scene, select our RightToeBase joint and open the graph editor.
By selecting the "Atoms Foot On Ground" attribute, you should see something like in the first picture.
This attribute holds the data that represents our "foot down" state for this foot. If you scrub the time slider while checking this animation curve and the man animation, you'll see the curve key frames reflect pretty well the down state for the foot.

In cases like in the second picture, you can see that there is a spike. In this case you can set the value for that key frame manually, then reopen the Skeleton Animation Exporter and tick the "data from scene" checkbox. After exporting with the GUI, if you check your clip again, the foot on ground attribute should be fine.




Add custom data

If you want add some custom data to some joints please check the Adding custom metadata section

Copyright © 2017, Toolchefs LTD.