The original thread’s head is badly out of date. Rather than rewrite aegidian’s post, I’ve started a new thread.
We provide a set of Python scripts to convert models to and from Oolite’s DAT format. The latest versions can always be found in the repository
and downloaded directly using this link
. Updates will be announced in this thread.
The tools are:
: convert a mesh in OBJ format to DAT, preserving texture coordinates and vertex normals. This is now the recommended conversion tool. The meshes it produces require Oolite test release 1.74 or later.
From a Wings3D modelling perspective, preserving vertex normals means that hard and soft edges in Wings3D are preserved, producing a result similar to Wings3D preview mode (Tab key) if all the faces in Wings3D are planar (ensure this by selecting Tesselate → Triangulate in face mode). The
key in shipdata.plist
has no effect on models with vertex normals.
python Obj2DatTexNorm.py <filename>
for default settings,
python Obj2DatTexNorm.py --help
for information about options.
: an older conversion tool which does not preserve normals but does support smooth groups. Models converted with this tool will have a faceted look by default, but can be smoothed using the
key in shipdata.plist
From a Wings3D modelling perspective, complete loops of hard edges will be preserved when using smoothing (the enclosed faces form a smooth group), but lighting may behave differently than in Wings3D preview mode.
python Obj2DatTex.py <filename>
: partially convert a DAT mesh to OBJ format. Dat2ObjTex.py can handle a single material, while Dat2Obj.py ignores all textures. These tools do not preserve normals, and Dat2ObjTex.py won’t do anything useful with materials from files converted with Obj2DatTexNorm.py unless
python Dat2ObjTex.py <filename>
python Dat2Obj.py <filename>
: scale a DAT model uniformly on all axes.
python DatScale.py <filename> <scalefactor>
python DatScale.py myModel.dat 3
. A new file is created, in the example case “myModel x 3.0.dat”.
: converters for the obsolete, Mac-specific Meshwork modeller.
The converters require Python (version 2.7 or later for Obj2DatTexNorm.py). Mac OS X and Linux systems generally have Python preinstalled. For Linux systems, check your package manager if necessary. For Windows, download it from python.org
currently, Obj2DatTexNorm.py is the only one that can be considered actively maintained, and the others have known problems. Crash/exception reports for all tools are welcomed, as well as reports of bad conversions with Obj2DatTexNorm.py. In order for reports to be useful, please ensure that they apply to the latest version – the link at the top of this post is always up-to-date – and include, at minimum, a copy of the file you’re trying to convert (and its associated MTL file in the case of OBJ files).