NuXporter .X Mesh Exporter for DeleD Pro

This exporter generates .X mesh files, much like the built-in .X exporter. However, it has a few differences:

  • 1) It generates creased faces; i e it doesn't smooth normals over geometry
  • 2) It can export and copy textures with the (relative) path intact
  • 3) It can center and/or snap-to-ground-level the mesh
  • 4) It remembers the settings you last used
  • 5) It can write compressed binary format .X files
  • 6) It can write the lightmap texture coordinates to the .X file (using DeclData)

Instructions

To use it, open your scene in DeleD Pro. Then choose "NuXporter .X Output" from the menu. A settings dialog will be shown. You could keep working in DeleD at this point, as it is modeless. However, set up the settings you want to use, and press "OK" to actually export. (You have to click "Browse" and select a file for the OK button to highlight :-)

Here's what the options do:

Output File

  • File Path / Browse button -- set where the file will export to.
  • Text / Binary -- write text-format .X files, or compressed binary format.
  • Mirror Z -- export left-handed coordinate system.

Geometry

  • Normals -- include normals in the exported mesh
  • Texture Coordinates -- include texture coordinates in the exported mesh
  • Center Mesh -- re-center each mesh object to be exported around the origin. The exporter will make up the difference in the mesh frame transformation matrix, so your map will still look the same when loaded. However, this is useful for certain .X loaders.
  • Level Floor at 0 -- lifts each mesh object to be "grounded" at Y=0. Again, the difference will be made up in the transformation matrix for the mesh.
  • Scale -- Scale the input coordinates when exporting. Defaults to 1/100 (which means DeleD units are centimeters in a meter-based engine).
  • Identity Mesh Frame -- If doing Center Mesh or Level Floor, and this box is checked, the difference will NOT be made up in the frame transformation matrix. This is useful if making a single mesh that you want to "place" as a tree or house in a world editor, or if you make multiple meshes in a library of objects. Typically, use of this option requires special support in the loading game engine.

Options

  • Include Materials -- Include material references (texture names) in the exported .X file.
  • Copy Texures -- Copy the referenced textures from the DeleD Textures directory to the same directory as the .X file is exported to.
  • Texture Paths -- Include the sub-path for the texture (e g "Floor/") in the texture name saved in the material. Also copy textures to sub-directories of the mesh directory, if copying textures. This will create those sub-directories if needed.
  • Effect -- Write out a reference to an Effect instance with each material. The name of this effect comes from this field.
  • Shadow Map Coords -- Write the shadow map texture coordinates into the .X file, in addition to the regular texture coordinates, for objects that have light mapping information. The coordinates are written as a DeclData array, and the shadow map is written as an effect parameter.

  • Progress Bar -- Indicates what the exporter is doing. Typically, will sit for a while doing "Reading" in the beginning, where it extracts the geometry from DeleD, and then quickly process the mesh data into .X format.
  • Cancel -- Closes the exporter without saving.
  • OK -- Exports the mesh given the indicated settings.

Settings File

The settings are stored in a file called "NuXporter.ini" in the DeleD Plugins directory. You can edit that file in most good text editors (such as GVim, XEmacs, UltraEdit, SlickEdit, Visual Studio, TextPad, etc).

One cool feature is that, when exporting a new scene, the default output file name will be in the same directory as the previously exported mesh, but with the new scene name substituted for the actual file name.

I hope this will be of some use to the DeleD community. Please send feedback to the address nuxporter at mindcontrol dot org, and if you're lucky, it'll make it through my spam filter :-) You can also send me a Private Message on the gamedev.net forums; my handle is 'hplus0603'.

Download

You will need to download the current DirectX Runtime. Get it from Microsoft. Seriously. You need to click that link. The exporter won't work otherwise. Unless you already have a very recent DirectX runtime installed, of course.
You can download the actual plug-in installer from Google Projects and double-click it to install it.

Version history:

  • Version 1.2.1: Fix the "disabled OK button" bug.
  • Version 1.2: Support for DeleD version 1.6 (XML).
  • Version 1.1.3: Checkbox for which handedness to export.
  • Version 1.1.2: Export to left-handed clockwise meshes.
  • Version 1.1.1: Fix the combo box items, and performance on large scenes.
  • Version 1.1: Add shadow map exporting.
  • Version 1.0: Initial release. Export with sharp normals.