Tutorial: Exporting static mesh (Maya)

Report 2 Downloads 149 Views
Tutorial: Exporting static mesh (Maya) This tutorial walks you through the steps needed to get a static mesh exported from Maya and ready for importing into Lumberyard, including how to export the static mesh and its material. Placement of the static mesh and setup of the material will be covered in different tutorials. At the end of the tutorial you will have exported the static mesh and material. You will learn how to do the following: •

Export static mesh and its material from Maya to Lumberyard

Prerequisites You must have the following before starting this tutorial: • • • •

Lumberyard 1.6.0.0 installed or later Autodesk Maya 2014 or later versions Lumberyard Maya plugin and exporter installed through Setup Assistant Sample asset is included with Lumberyard. It can be found where you installed Lumberyard under: ...\dev\SamplesProject\Objects\Tutorials\Tree\tree_large_01.fbx

Step 1: Exporting a static mesh and material from Maya To get a static mesh and its material from Maya to Lumberyard, we have to export it using the Maya Lumberyard Tools. To export a static mesh and material from Maya 1. Run the version of Maya that you have installed on your system and open or import the file for the static mesh you want to export from Maya. 2. Make sure the material that is assigned to the static mesh isn’t using the default lambert1 material. A new material must be created and applied to the static mesh in order to export the mesh.

3. Open the Lumberyard Tools from the Lumberyard shelf and select the static mesh you want to export.

4. Click on the Add Selected button under the Geometry Export section in the Lumberyard Tools. The static mesh will be added to the Geometry Export list, which it will be auto-assigned the .CGF extension for static objects. You have the option to rename the exported version of the static mesh, but the default will just inherit the same name as the mesh.

Note: You can organize your scene in any hierarchy you want. The Lumberyard Tools uses name referencing to find the appropriate object to export that gets stored under the Lumberyard Export Group node, which we will cover a little later.

5. You may want to choose a custom export path if you do not want your exported mesh to default to the same location as your Maya file. If you are following along with the FBX asset, you can just keep it set to <default> to export to the same location as the FBX file.

6. The static mesh is ready for exporting, but we will need to set up a material group with our material listed under it as a sub-material. If we don’t do this, we will get an error when trying to export our mesh. To add a material group with the material for the static mesh, select your mesh first and then click on the Add Group button under the Material Export section.

Note: If you had the static mesh selected, this should have auto-created a material group with the material under it. Otherwise, it would have created an empty material group, which you would need to select the material for your mesh, have the material group active in the Material Export list, and then click the Add Material button.

7. You have the option to change the name of your material group and the material assigned to the static mesh. The default name will inherit the name of the first material and add the suffix “_matGroup”.

Note: There is a drop down list next to the material that says No Physics. This is the default setting for materials. There are other options if the object needs to be for collision, ragdoll, and a few other things. You can refer to the documentation on these, but for this tutorial we will keep it as No Physics.

8. You may want to choose a custom export path if you do not want your exported material group to default to the same location as your Maya file. If you are following along with the FBX asset, you can just keep it set to <default> to export to the same location as the FBX file.

9. To export the static mesh and the materials, you can use the individual export buttons or use the Export All button at the bottom of the Lumberyard Tools window.

Note: An asset must have a UV applied to it for export. This is a common error with test assets. If you are successful, you should see the RC compiler window pop up and go away once it is done converting your assets to the appropriate format for the Lumberyard Editor.

10. As something to be aware of, if you look in the Outliner or Hypergraph, you should notice a group node named LUMBERYARD_EXPORT_GROUP. This node is the parent to all of your export data and settings. You will want to keep this in your scene for future exports. If you go further into this node, you will see one that stores the settings, and another node that holds all of your Geometry Export information. There is a separate group node created for each item in the Geometry Export list, with each of the node’s settings. The only information that does not get stored under the LUMBERYARD_EXPORT_GROUP is the material groups.

You should now have a .CGF and .MTL file in the location you specified. As a reminder, we will not be covering the static mesh placement or material setup in Lumberyard in this tutorial because it is covered in a separate tutorial series. You have now successfully exported your static mesh and material to be used in the Lumberyard Editor. Please refer to other tutorials in the related section for next steps.

Related tasks and tutorials Now that you have exported a static mesh and its material, you should learn how to place your asset and set up materials in Lumberyard, or continue learning how to export: • • •

Tutorial: Getting started – Object placement Tutorial: Getting started – Materials Tutorial: Exporting characters (Maya)

We’d love to hear from you! Head to our Tutorial Discussion forum to share any feedback you have, including what you do or don’t like about our tutorials or new content you’d like to see in the near future.