Exporting using Crytek Shelf in Maya

Overview

This section describes the general overview of the export process from Maya into the CRYENGINE using the Crytools that are available.

Maya Object Export

The most important thing to keep in mind while preparing for export are naming conventions. If the described objects are not named correctly then the exporter will not work. Also, since the position of up-axis in Maya is different than the CRYENGINE, the exporter will compensate by swapping the values accordingly.

To export an object from Maya:

  1. Create a group called cryexportnode_@, and replace the '@' with the filename that you want to export.
    Pic1: Naming an object correctly
  2. Create a group under the cryexportnode, and name the new group '#_group' where you can replace the '#' with the name of the model that you want to export.
  3. Now, group the meshes to the group that you just named '#_group'.
    Pic2: Creating a group
  4. Click the Export button on the Crytek toolbar to open the Crytek Export dialog, and then click the Add Attributes button. By clicking this you will add various options to shaders, such as joints and meshes.
    Pic3: Attributes added

  5. Select the 'cryexportnode' group.

  6. Select the file type from the drop-down menu that appears in the Node Options section. You can also find this drop-down menu in the Extra Attributes section in Maya's Attribute Editor.

    Make sure you have selected the Parent tree node (in our case, cryexportnode_@) to enable the properties options under the Node Options.

    Pic4: Export window

  7. Click the Export Selected button on the Crytek Export window.

An example Maya scene with the hierarchy setup for the static geometry exporting can be downloaded here: statictest.mb.

Maya Bone Export

With a character model at hand, you should be ready for rigging. For this tutorial, we will use a standard humanoid figure.

To export a bone structure from Maya:

1. Parent the physicalized mesh to the joints as depicted below. You can also create one by adjusting very basic polygons surrounding your skeleton. Once finished, make sure you are blocking out your skeleton, and parent these new physics proxies to the skeleton.

Given that Maya does not allow spaces in names you can use a double underscore (__) as a space, this way the RC will convert it automatically when the character is exported.

Pic5: Character model in Maya

  1. Create a group called 'cryexportnode_@', and replace the '@' with the filename that you want to export.
  2. Create a group under the 'cryexportnode', and group the bones to the cryexportnode.
  3. Now, create a group and name it '#_group', and replace # with the name of the mesh to export.
  4. Group the node which we created in above step to the cryexportnode.
  5. Now, bind all of the skin geometry to the skeleton.
    Pic6: Skin geometry bound to skeleton
  6. Ensure you have bound the skin and the bones so that when you animate a joint the skin is animated relative to it.

    Be sure that your workplace has been set to the CRYENGINE directory. For example C:\CRYENGINE\GameSDK\Objects\mayaTest\animation\ would be where you are saving and exporting to.
  7. Click the Export button on the Crytek toolbar to open the Crytek Export window.
  8. In the Crytek Export window, click the Add Attributes button. You can now notice that all your shaders have been added with a new property in the Extra Attributes section. And now would be a good time to go back to your Physics shader and change its property to ProxyNoDraw. On your joints (under Extra Attributes), you will also notice new values labelled Spring, Spring Tension and Damping. CRYENGINE will later use these values to limit the joint's rotation.

    Pic7: ProxyNoDraw and other Extra Attributes

  9. Select the 'cryexportnode' group, and then select the Character (.CHR) file type from the drop down that appears in the Node Options section. You can also find this drop-down in the Extra Attributes section in Maya's Attribute Editor.
  10. Ensure the Do Not Merge option is checked, and then click the Export button in the Crytek Export window.

    Pic8: Exporting a character skeleton (*.chr) and its skinned meshes (*.skin)

For more information on the character pipeline, please refer to this section for more information: Character Authoring in Maya.

Also you must ensure that Maya exports its animations at 30 fps. This can be changed under Window -> Settings/Preferences -> Preferences, and then navigate to Settings group in the list, and on the right hand side, under the Working Units set the Time setting to 30fps and then click Save.