Converter

From MegaGlest
Revision as of 03:42, 27 March 2011 by Hofmic (talk) (Thumbnailed image)
Jump to: navigation, search
Refreshing the menus is sometimes needed after installing the G3D exporter.

Glexemel is the main, and as of 2 February 2011, the only, Blender converter for G3D files. There is no direct exporter yet, so creating a G3D file is actually a two part procedure, the first being to Export the model from Blender. This is exported as an XML, which is converted to a G3D using Glexemel, which this page details.

Getting Glexemel and the Export Script

The Export script and Glexemel are separate files, and must be downloaded separately. Windows users will need both the export script download and the windows binary, whereas Linux users only need the Export Script download, as a precompiled binary is included with that.

Placing the Script

You must place the export script and its binary (windows may also require the DLL's packaged with the binary) inside the scripts folder of Blender. This is found in the installation directory, though some windows users may have it buried in AppData.

Exporting to G3D

If you installed the script and binary properly, using the export script should export directly to G3D. If it exports to XML, the converter is not functioning correctly.

Command Line Method

This is the old method of exporting to G3D, and it is strongly recommended to NOT use this method. The above method achieves the exact same results with much faster and easier work.

Exporting the Model

If Glexemel is not found when using the export script, or if using the old export script, it will instead export to a XML file, which contains data about the model, but is not a G3D file itself and cannot be used in Glest. This file must be converted to G3D using Glexemel's xml2g.exe program. Once you've exported the XML file, move it and all textures to the folder with xml2g.exe.

Converting to G3D

Note: This is done in the command line, and may be too complex for inexperienced users. If that is the point, the above method is recommended.

First of all, we need to open the command line. There are a few ways to do this. The easiest is to open Run and type "cmd", or, if on Windows Vista or 7, you can simply type cmd in the search bar of the start menu. Alternatively, there should be a link to the Command Line in the Start Menu under All Programs > Accessories > Command Prompt.

For Linux users, simply use the console.

Glexemel command line.png

That's all their is to it. It's also possible to convert a G3D into a XML by using the reverse with g2xml.exe, but this is nearly useless, since there's no real reason to need to look at the XML other than to possibly edit the texture name or diffuse color of the model, both which could be done in Blender (which does have an Import Script for G3D).

Troubleshooting

See exportscript.
  • White model - The texture was not linked to the object via the materials screen on the buttons window of Blender.
  • Model is sideways - Model not orientated properly. The Y axis is height, the X axis is length, and the Z axis is width, unlike Blender's defaults.
  • Triangle Error / No model appears - Meshes must be all triangle. Convert the mesh to triangles before exporting.

See Also

External Links