Exporting Mesh Data From 3ds Max

From Orion Engine Wiki
Jump to navigation Jump to search

The Orion Engine software development kit includes a plug-in for Autodesk 3ds Max that will allow you to export mesh data directly to an Orion Engine mesh file. The exporter supports converting a variety of animation, vertex, mesh, frame-hierarchy, and material data.


Installation

Simply copy the appropriate plug-in to your 3ds Max plug-ins folder, and then restart the application. The plug-in should automatically load when 3ds Max is started. Note that we have plug-ins that were specifically built for all versions of 3ds Max from release 6 all the way up to 3ds Max 2018 (or newer).

Exporting Files

Exporting a scene from 3ds Max follows the traditional export workflow. Go to the File menu and then click on Export. Select the "Orion Engine Mesh File" format in the drop-down list and then enter a suitable filename. Once you click on the Save button, the exporter dialog will be displayed so that you can set the exporter options. Unless you are an advanced user, the default settings should be fine. Finally, click on the Export button to actually save the file. These steps save the entire scene, including geometry, frame-hierarchy, materials, etc. If you only want to save part of a scene, then click on Export Selected in the File menu instead.

The exporter dialog has many options in each of the rollouts. You can optionally export adjacency information, the meshes can be optimized, bounding boxes can be calculated, the frame hierarchy can be collapsed, etc. Skinning information created using the physique modifier can be exported, along with a full system of bones and/or a biped.

NOTE: You can also perform silent unassisted batch exports using the MAXScript (.ms) file that we provide as a starting template.

Supported Vertex Data

While exporting, the exporter attempts to automatically determine the appropriate vertex data to extract from 3ds Max based on the currently selected options. The following table explains how vertex data from 3ds Max is mapped to Orion Engine vertex element semantics.

3ds Max Data Orion Engine Vertex Data Type Orion Engine Vertex Element Usage
Vertex OE_VERTEXELEMTYPE_REAL3 OE_VERTEXELEMUSAGE_POSITION
Normal OE_VERTEXELEMTYPE_REAL3 OE_VERTEXELEMUSAGE_NORMAL
Binormal OE_VERTEXELEMTYPE_REAL3 OE_VERTEXELEMUSAGE_BINORMAL
Tangent OE_VERTEXELEMTYPE_REAL3 OE_VERTEXELEMUSAGE_TANGENT
Color Vertex OE_VERTEXELEMTYPE_UINT32 (r, g, b elements) OE_VERTEXELEMUSAGE_ARGB_COLOR
Alpha Vertex OE_VERTEXELEMTYPE_UINT32 (a element) OE_VERTEXELEMUSAGE_ARGB_COLOR
Illumination Vertex OE_VERTEXELEMTYPE_UINT32 (r, g, b elements) OE_VERTEXELEMUSAGE_ARGB_COLOR
Texture Vertex OE_VERTEXELEMTYPE_REAL2 (up to 8 sets of UV coordinates are supported) OE_VERTEXELEMUSAGE_TEXTURE_COORDS

Supported Material Data

The exporter extracts material data from a few classes of 3ds Max materials. In the case of the DirectX Shader material, the exporter extracts the values for the parameters that appear in the rollout for the effect in the Material Editor. In the case of a Standard material, the exporter extracts the diffuse color, specular color, self-illumination color, opacity, and shininess from 3ds Max and creates an OeMaterial definition from the data. In the case of a Multi/Sub-Object material, the exporter extracts one level of sub-materials from the Multi/Sub-Object material and exports the data for them. Multi/Sub-Object materials with more than one level of depth are not supported. The exporter can export up to 8 textures for each subset in a mesh. For example, in addition to the diffuse texture of a Standard material, you can also select a bump map texture, etc. The texture usage, and the index to the UV coordinates that should be used, will all be exported along with the mesh data.

More Information

(See also: Using the Orion Genesis World Builder and Supported File Formats)

Patch meshes are currently not supported, however this will be finished soon. More information on the available export options may be added to this page at a later time.