X File Exporter for Discreet's 3ds max
Microsoft DirectX 9.0 SDK Update (October 2004)

X File Exporter for Discreet's 3ds max


Files with the .x file name extension are used by Microsoft DirectX to store meshes, textures, animations, and other user-definable objects with a template hierarchy for data storage. DirectX has .x-file interfaces that provide a simple and safe way to import data into DirectX applications. These interfaces identify structures with unique identifiers (IDs), validate data layout, and provide data referencing and other intrinsic features.

Included with the DirectX software development kit (SDK) is source code to build a .x-file exporter plug-in for Discreet's 3ds max World Wide Web link (3D Studio MAX) application, versions 4.0 through 5.1. Some application providers include .x-file exporters that work with the application, such as Avid Technology's SOFTIMAGE|XSI World Wide Web link.

The 3ds max exporter plug-in makes use of the .x-file interfaces and functions developed to load ID3DXMesh, ID3DXPatchMesh, ID3DXSkinInfo, D3DXFRAME, ID3DXAnimationController, and other related interfaces and structures with minimal effort.

Once you have installed the DirectX SDK and Extras downloads (separate packages at Microsoft DirectX Downloads World Wide Web link), you can find the exporter plug-in files at the following location:

(SDK root)\Extras\Direct3D\Plug-Ins

Note  The .x files generated by the exporter plug-in store all mesh data in a left-handed (LH) coordinate system, to match the left-handed coordinate system used by DirectX, even though 3ds max uses a right-handed coordinate system. For more information, see 3-D Coordinate Systems.

Requirements

Minimum Operating SystemMicrosoft Windows 98
Required Applications
  • Discreet's 3ds max (3D Studio MAX), versions 4.0 through 5.1
  • Discreet's character studio World Wide Web link SDK
  • Microsoft Visual Studio 6.0
  • DirectX 9.0 SDK Update (Summer 2003) or later
Important  The exporter may not build with Visual Studio .NET/Microsoft Visual C++ .NET.

Installation

Complete the following steps to build the exporter plug-in on your computer.

  1. Before proceeding, close existing 3ds max application processes.
  2. Install Discreet's character studio SDK.
  3. Open Visual Studio 6.0, and load the following file:

    (SDK root)\Extras\Direct3D\Plug-Ins\3DSMax versions 4 and 5\xskinexp.dsp

  4. Allow Visual Studio to create a project workspace (stored as a .dsw file).
  5. From the Visual Studio Project menu, select Settings.
  6. In the Project Settings window, click the C++ tab.
  7. In the Category drop box, select Preprocessor.
  8. In the Additional include directories box, insert the following path:

    (3ds max root)\maxsdk\include\

  9. Also add the path to the character studio SDK include directory if different than the (3ds max root)\maxsdk\include\ directory. This could be one of the following:

    (3ds max root)\cstudio\include\

    (3ds max root)\cstudio\

  10. Click the Link tab.
  11. In the Category drop box, select Input.
  12. In the Additional library path box, insert the following path:

    (3ds max root)\maxsdk\lib\

  13. Also add the path to the character studio SDK lib directory if different than the (3ds max root)\maxsdk\lib directory. This could be one of the following:

    (3ds max root)\cstudio\lib\

    (3ds max root)\cstudio\

  14. Save these settings.
  15. Compile and build the exporter from the Build menu in Visual Studio.
  16. Copy the resulting file:

    xskinexp.dle

    to the following directory:

    (3ds max root)\plugins\

You can confirm that the exporter plug-in is loaded into 3ds max as follows. From the 3ds max Customize menu, select Plug-in Manager..., and you should see a green "loaded" dot next to the Xskinexp.dle exporter, along with its location at (3ds max root)\plugins\.

User's Guide

Generate your scene in 3ds max. When the scene is ready to export, use the following procedure.

  1. From the File menu, select Export.
  2. In the Save As Type box, locate and select X-File (*.X).
  3. Choose or name a file, including the .x file extension, and click the Save button. The following dialog box appears:

    Dialog box for 3ds max scene statistics and file options

  4. Unless you want to select other options, click the Go! button.

    The following table lists the export options and their descriptions.

    Export OptionsDescription
    TextDefault export option.
    Binary or Binary CompressedContent is not affected.
    Export Patch DataExisting high-order surfaces will be exported as patches instead of polygonal meshes.
    Include Animation DataAnimation will occur at the selected sample rate in frames per second.
    Looping Animation DataThe D3DX animation controller (ID3DXAnimationController) will replay (loop) the animation.

For a skinned mesh scene, bone limitations are also provided in the dialog box. The exporter plug-in does not support bones that are not attached to a parent 3-D object; bones must be attached with the "node" button in 3ds max.

Note  Microsoft Direct3D interfaces require object names in a C-style naming convention, where each name must start with a letter from 'a' to 'z,' or an underscore (_). The 3ds max exporter will correct your names to this convention.

Related Topics



© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.