Menu
Lumberyard
User Guide (Version 1.13)

Best Practices for Creating and Exporting Meshes

To maximize the benefits of the FBX Settings tool, learn the recommended best practices for creating and exporting skinned meshes.

Creating Skinned Meshes Actors for the Animation Editor

Use the following best practices when you create your character for the Animation Editor. In Lumberyard a character is a skinned mesh.

Setting up the World Coordinate System and Root Joint

If you use the y-up or z-up world coordinate system in your DCC, use the following guidelines to set up your character:

  • Use a root joint for your skinned mesh. This is required to ensure that motion extraction works properly in the Animation Editor.

  • Do not use transforms, groups, or parent nodes in the hierarchy above your root joint. The root joint must be the top parent of the skeletal hierarchy to ensure that motion extraction works properly.

  • Set the root joint position at the origin: 0,0,0.

  • Set the root joint rotation and orientation to 0,0,0.

  • Orient your character so that the front orthographic camera view shows the front of your character.

  • When using the Lumberyard Animation Editor, ensure that your imported character faces the positive y direction. The Asset Processor automatically adds a Coordinate system change modifier in the .fbx settings. The default value for Facing Direction is Rotate 180 degrees around the up axis. This enables the game entity's forward direction and character to point in the same direction.

  • If your character faces the negative y direction after you import the character into the Animation Editor, in the Asset Browser right-click your .fbx file and choose Edit Settings. For the Coordinate system change modifier, set Facing Direction to Do Nothing.

  • Use the same Coordinate system change modifier for the actor and each of the actor's motions. This is required to ensure that animations work properly in the Animation Editor.

Setting up Skin Binding

Observe the following best practices when you set up skin binding:

  • Delete the geometry history on your mesh before skinning the geometry to joints.

  • When skinning your mesh, limit your maximum influences per vertex to four. Lumberyard currently supports only four weight influences per vertex using the .fbx pipeline.

  • Skin bind your mesh at the origin and in the same forward direction as the root joint.

  • Check the bind pose before exporting your skinned mesh. For example, if the mesh moves after unbinding, you must reskin the mesh in order to prevent any errors in Lumberyard.

  • Ensure that your skinned mesh has one bind pose in your DCC before you export to an .fbx file.

  • Do not include any static meshes with your skinned meshes. Lumberyard cannot render unskinned meshes that are parented to bones.

Do the following to reskin your mesh:

To reskin your mesh in Maya

  1. For Menu Set, choose Rigging.

  2. Click Skin, Unbind Skin.

  3. In the Detach Skin Options dialog box, for History, choose Delete history. Click Detach and then click Close.

  4. Move or rotate your mesh to the appropriate position.

  5. Click Modify, Freeze Transformations.

  6. In the Freeze Transformations Options dialog box, select the Translate, Rotate, and Scale check boxes. Click Freeze Transform and then click Close.

  7. Select your mesh.

  8. Choose Edit, Delete by Type, History.

  9. In the outliner, select the bones that you want skinned. Hold Ctrl and select the mesh that you want skinned.

  10. Click Skin, Bind Skin.

  11. In the Bind Skin Options dialog box, for Bind to choose Selected joints. For Bind method, choose your preferred bind method. For the Skinning method, choose Dual quaternion or Linear. Click Bind Skin and then click Close.

    Note

    You must export and save your deformer weights in order to import the weight maps after reskinning.

To reskin your mesh in 3ds Max

  1. Select your mesh.

  2. On the Modify tab, expand Advanced Parameters. Click Save.

  3. Save the mesh envelope (skin).

  4. On the Modify tab, select the skin. Right-click the skin and choose Delete.

  5. On the Utilities tab, click Reset XForm.

  6. Click Reset Selected.

  7. Click Collapse.

  8. Click Collapse Selected.

  9. On the Modify tab, right-click Editable Mesh, and choose Editable Poly.

  10. For Modifier List, choose Skin.

  11. Under Advanced Parameters, click Load and choose the mesh envelope (skin) that you saved earlier.

    Note

    You must save your weights in order to load the weights after adding a new skin modifier.

  12. In the Load Envelopes dialog box, click Match by Name to preserve the weights that you saved earlier. Close the dialog box.

If you want to add a root joint to a skinned mesh, follow the preceding steps to unbind and reskin your mesh.

Exporting Skinned Meshes Best Practices

Use the following best practices when you export your skinned meshes using the FBX Settings tool.

  • If you use the z-up world coordinate system, use the following guidelines:

    • Ensure that your DCC scene is set to z for the up-axis world coordinate system.

    • Set the axis conversion up axis to z when exporting an .fbx file.

  • If you use the y-up world coordinate system, use the following guidelines:

    • Ensure that your DCC scene is set to y for the up-axis world coordinate system.

    • Set the axis conversion up axis to y when exporting an .fbx file.

  • When you create an .actor file, export your skinned mesh at the bind pose without any keyframes.

  • When you create a .motion file, bake animations before you export. Alternatively, bake animations when you use your DCC's .fbx export tools.

  • Use the following guidelines for vertex count:

    • Asset Processor processes your .fbx file to create an .actor file. Occasionally the number of vertices does not match the original vertex count of the .fbx file. Lumberyard allows a maximum of 65,536 vertices for skinned geometry after asset processing. Although the maximum number of vertices is 65,536, the original vertex count from your DCC tool cannot be up to 65,536 vertices. As a best practice when modeling your geometry, divide 65,536 by 3 for a value of 21,845 vertices. After you export the .fbx file, verify that the skinned mesh was successfully processed. If Asset Processor does not successfully export the skinned mesh, reduce the number of vertices in the model until the file is successfully processed.

    • Be aware that the more vertices in an .fbx file, the longer Asset Processor takes to process it. View Asset Processor often and check for errors.

  • Export only the skeleton and mesh. Do not use transforms, groups, or parent nodes in the hierarchy above your root joint. The root joint must be the top parent of the skeletal hierarchy to ensure that motion extraction works properly.

  • Remove unused geometry, bones, vertices, materials, and nodes that are not necessary for the .fbx asset. This reduces the processing time and offers a better chance that the automatic processing works properly without making adjustments later. In your DCC, consider naming nodes with _ignore as a suffix to prevent those nodes from being processed.

Using the Maya Game Exporter

The following are typical settings for the Maya Game Exporter when you export your skinned mesh character into Lumberyard.

Export settings for .actor files

  • Use the Model tab to export your .fbx files.

  • Use the following settings:

    • Select Export Selection from the drop-down list.

    • Select the Skinning check box.

    • If you are exporting blendshapes (morph targets), select the Blendshapes check box.

    • Clear the Animation check box. If this is selected, a .motion file is created.

    • Select your world coordinate system from the Up Axis drop-down list.

    • Navigate to a save path and specify the name of your .fbx file.

  • When you're done choosing these settings, select all of the bones for the character's skeleton and all of the skinned meshes.

  • Click Export.

Export settings for .motion files (Animation Clips tab)

  • Use the Animation Clips tab to export your .fbx files.

  • Use the following settings:

    • Select Export Selection from the drop-down list.

    • Click the + button to add an animation clip.

    • For Clip Name, type a name for the clip.

    • For Start and End, specify a frame.

    • Select the Bake Animation check box.

    • Select your world coordinate system from the Up Axis drop-down list.

    • Navigate to a save path and specify the name of your .fbx file.

  • When you're done choosing these settings, select all of the bones for the character's skeleton.

  • If you are exporting blendshapes with your animation, also select the skinned mesh that has the blendshape animations. For example, if your character's face mesh has blendshapes, select the skeleton and the character's face mesh.

  • Click Export.

Export Settings for .motion files (Time Editor tab)

  • Use the Time Editor tab to export your .fbx files.

  • Use the following settings:

    • Select Export Selection from the drop-down list.

    • Select the clip that you want to export from the Time Editor Clips drop-down list.

    • Click the + button to add an animation clip.

    • Select the Bake Animation check box.

    • Select your world coordinate system from the Up Axis drop-down list.

    • Navigate to a save path and specify the name of your .fbx file.

  • When you're done choosing these settings, select all of the bones for the character's skeleton.

  • If you are exporting blendshapes with your animation, also select the skinned mesh that has the blendshape animations. For example, if your character's face mesh has blendshapes, select the skeleton and the character's face mesh.

  • Click Export.

Troubleshooting Skinned Meshes

If your character's skinning appears visually broken in the Animation Editor, there are two issues that could cause the undesired skinning:

  • The Coordinate system change modifier is not identical for the .actor and .motion files.

  • You may need to reset the bind pose.

To change the coordinate system modifier

  1. In Lumberyard Editor, in the Asset Browser, navigate to your .fbx file.

  2. Right-click the .fbx file and choose Edit Settings.

  3. In the FBX Settings window, for the Coordinate system change modifier, set Facing Direction to Do Nothing or Rotate 180 degrees around the up axis.

  4. Ensure your .actor and .motion files use the same Coordinate system change modifier.

To reset a bind pose in Maya

  1. Ensure your character is in the bind pose.

  2. In Maya, select the character root bone.

  3. In the Rigging menu, click Skin and then select the Go to Bind Pose check box.

  4. For the Input box, choose Select by name.

  5. Search for all bind poses by typing bindPose* in the search box.

  6. Press Enter to select all of the bind poses and then press Delete.

  7. Select the root bone of your character.

  8. In Maya, in the bottom left corner, type the following to reset the bind pose for your character: dagPose -bp -save;

Exporting Static Meshes Best Practices

Use the following best practices when you export your static meshes using the FBX Settings tool.

  • Ensure that each object that needs a run-time collision has a physics mesh. Low-resolution physics meshes work better than high-resolution meshes. Primitives such as a cube, sphere, or capsule are best for optimal physics performance.

  • The maximum number of vertices for any static geometry is 65,536. You can export a scene where the total number of vertices exceeds 65,536, but each static geometry piece cannot exceed 65,536. If the combined mesh is larger than 65,536, you must make the following modification in FBX Settings:

    To use a combined mesh that has more than 65,536 vertices

    1. In Lumberyard Editor, in the Asset Browser, open the Mesh tab.

    2. Choose Add Modifier, Mesh (Advanced).

    3. Clear the Merge Meshes setting.

    This prevents Asset Processor from merging the meshes, which allows the geometry to be processed.

Creating Physics Proxies for Static Meshes

A physics proxy is a mesh that encapsulates physics geometry, such as hit detection and the ability to collide. Physics proxies typically use primitive meshes or meshes with a low polygon count for better performance. Primitive meshes such as cubes, spheres, or capsules work best to ensure optimal physics performance.

You have two ways to create a physics proxy for your static mesh (.cgf file). You can use the FBX Settings tool to manually create the physics proxy. Or you can use soft naming conventions, which causes Asset Processor to automatically create the physics proxy during processing. For the latter process, see Creating Physics Proxies Automatically.

To manually create a physics proxy modifier using the FBX Settings tool

  1. In the Asset Browser, right-click the .fbx file for which you want to create a physics proxy. Choose Edit Settings.

  2. In the FBX Settings tool, on the Meshes tab, click Add Modifier. Choose Physics Proxy.

  3. Click the hierarchy button (to the right of the Physics meshes box). Select the meshes that you want to use for the physics proxies. Click Select.

  4. The recommended best practice for this procedure is to prevent the selected physics mesh from also rendering as a static mesh. To do this, follow these steps:

    1. Beneath Mesh group, next to Select meshes, click the hierarchy button .

    2. Deselect the mesh that you used for the physics proxy. Click Select.

      This prevents the mesh that you selected for the physics proxy from also rendering as a static mesh.

  5. Click Update.

    When the File progress informs you that the job is complete, click OK.

Once you have assigned a physics proxy mesh to your static mesh, the static mesh is ready to display physics and collision behavior.

Creating Physics Proxies Automatically

An alternative to the manual creation of the physics proxy is to use soft naming conventions. To do this, rename your static mesh .fbx file and add _phys as a suffix to the file name. For example, wall_phys.fbx.

Adding the _phys suffix to your file name causes Asset Processor to automatically add a new Physics Proxy modifier. You can view this physics proxy modifier when you open the FBX Settings tool for an .fbx file with a _phys suffix.

Asset Processor also automatically deselects the mesh that is used as the physics proxy in the Select Meshes property. This prevents rendering of the physics mesh as a static mesh.

Only one physics proxy modifier is automatically created for each node that has a _phys suffix.