Now let's have a look at how we you can export an animation so that we can you can use it in Atoms Crowd.
To export your animation correctly the 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. The joints need also to have the "bind pose attributes" set 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 directly the AtomsRobot.ma scene as it has all the attributes already set correctly.
Once you've loaded the file, we are going to import the atomsRobot_walk.fbx file from teh the data folder.At frame one your robot should look like in the picture
注意 |
---|
Please make sure:
|
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 worflow 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. Currently Atoms supports fbx and atomsclip. While FBX are more portable, atomsclip is more optimized to work with Atoms.
Then select a file path.
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 when they are touching the ground a value of 0 for the ground height is acceptable.
In our case unfortunately it is not. The robot feet are constantly moving below the XZ plane.
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, any frame between 22 and 34 will be fine (scene should be set to 30fps).
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. The value you're looking for is the Y axis translation of your locator/plane. In this case a value of -76 will be fine.
The "foot threshold" is the error approximation value for your ground height. In this case a value of 0.5 will be fine.
We 'll will come back to the "foot down Data from scene" later in this page.
Finally the "Images" section. You can export a thumbnail preview with you clip. This is extremely useful later on when setting up your animation clips. If you decide not to export a thumbnail preview just uncheck "Export images".
Please place the "source camera" in a way it can record the entire animation. You could even point constrain it to the "Hip" joint.
When "Export images" is on a tar file containing the the preview images will appear in the same folder of your clip file.
PLEASE NOTE: The exporter will use your time slider start and end frame as frame range. For this example you should set it to 0-12355.
Checking your clip
Now 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 thisin 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 robot animation, you'll see at frame 76 that the foot is not actually down.
Selecting the keyframe at frame 76 and set its value to 0.
The same attribute for the LeftToeBase joint has also a spike at frame 122. Fix that too.
Now we are ready to export once again. Open 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 between frame 60 and 80. In this case you can set the value for that key frame manually. Then reopen the Skeleton Animation Exporter and tick the "foot down data from scene" checkbox. Make sure all the values of the GUI are exactly the same you used for exporting your clip previously.
Now click export.
If you check your clip again, your feet should be fine.
PLEASE NOTE: it
注意 |
---|
Please don't export manually the FBX after editing the foot down curves. Some other values (cached at export time) are re-evaluated every time you export. Exporting the FBX manually could lead to unpredictable results. |
注意 |
---|
It is not currently possible to import an atomsclip file by importing it on your rig. You can do it in the Atoms UI. |