Glest and its forks currently are restricted to the G3D modeling format. Currently an up-to-date importer and exporter only exist for Blender, requiring that Blender is used for modeling or at least converting imported models. This is done with the G3D support python script, which allows Blender to both import and export G3D models.
The script to use depends entirely on the version of Blender used. It is strongly recommended to use the latest version of the export script, which this page will be detailing.
|Blender 2.63 and higher||Download|
- In the info window, under the file option, choose "user preferences".
- In this new window, switch to the addons tab and click the "install add-on" button at the bottom.
- Open the python file you just downloaded.
- Alternatively, it's possible to manually install the script by placing it in the Blender scripts folder. The location varies depending on where you told the installer to create this folder, and could be in the installation directory or a user directory (such as the home folder or the AppData folder).
- The addon will now be found in this window, in the import-export category, under the name "G3D Mesh Import/Export". Tick the checkbox beside it to enable it.
- Note that in order to be able to export in future sessions, you must save the user preferences with Ctrl + U.
- All faces must be triangulated (the 2.6x exporter automatically converts them to triangles before export). Faces can be converted to triangles by selecting all faces and using the hotkey ctrl + T.
- The axis differs in G3D, with the Y axis being height, X axis being length, and Z axis being width, unlike Blender's default of the Z axis being height, X being length, and Y being width.
- The start and end animation frame should be set appropriately. A large number of frames causes a massive filesize. G3D interposition of frames is considerably smoother than viewed in Blender, so models should rarely require more than 30 frames. If the model is unanimated, the start aand end frame should be set to 1 in the timeline window.
- In the G3D support panel, under Object Data in the properties window, the model can be single sided or double sided (which controls whether or not the object can only be viewed from one side), have teamcolor or transparency (if team colour is toggled, alpha in the texture will be replaced with team colour), and be toggled as selectable or not (non-selectable objects can't be clicked on to select the unit, such as the pebbles that scatter when a worker is mining).
- In versions older than the Blender 2.63 version of the script:
- Single sided or double sided can be toggled object data tab in the properties window, by ticking or unticking the double sided box. This defaults to double sided, which means the faces from both sides of the model, compared to just the side the face's normal points.
- The usage of teamcolour or transparency is toggled in the materials tab of the properties window. Under the options header, if "face textures alpha" is ticked, alpha in the texture will become transparency. If unticked, as is the default, alpha will be replaced with teamcolor.
- To make a material partially transparent (for use such as transparent teamcolor), in the materials tab of the properties window, check the transparency box and under Z transparency, adjust the alpha slider.
To import a model from G3D, open the file menu of the info window, choose import, and select "Glest 3D File (g3d)". Choose the file to load and it will be loaded at the origin. Note that animations cannot be imported, only the meshes and UV (texture) coordinates.
- White model - The texture was not properly linked to the object (detailed above).
- 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.