Oolite converters

From Elite Wiki
(Redirected from Oolite Converters)
Conversion redirects here. For the planet Achenar 6c of the Frontier universe, Conversion, see Achenar.

Several Oolite specific helper scripts and applications are available to do conversions.

Oolite uses own-brand .dat files for ship models. The various graphics packages use eg. .obj files.

Modelling

  • Dat2Mesh.py
  • Dat2Obj.py
  • Dat2ObjTex.py
  • DatScale.py
  • Mesh2Dat.py
  • Mesh2DatTex.py
  • Mesh2Obj.py
  • Obj2DatTex.py
  • Obj2DatTexNorm.py

All of them are available on GitHub and require Python2.7+ (not 3.x) to be installed.

Explanation

New model utilities

Three Python scripts (and three Mac OS X drag-n-drop applications generated from the scripts). The apps or scripts are used to convert models from one format to another.

Mesh2DatTex.py
DropMesh2DatTex.app

Mesh2DatTex.app accepts Meshwork files with a .mesh extension dropped upon it and generates Oolite compatible .dat files as a result.
The Python script accepts any number of .mesh files as arguments, again generating .dat files as output.
Mesh2DatTex is quite old and there may be problems with textures being reversed - you are advised to check your models carefully.

Obj2DatTex.py
Obj2DatTex.app

Obj2DatTex.app accepts "Wavefront" files with a .obj extension dropped upon it and generates Oolite compatible .dat files as a result.
The Python script accepts any number of .obj files as arguments, again generating .dat files as output.
Obj2DatTex has recently been updated and should not present any problems.

Mesh2Obj.py
Mesh2Obj.app

Mesh2Obj.app accepts Meshwork files with a .mesh extension dropped upon it and generates "Wings3D" compatible Wavefront .obj and .mtl files as a result.
The Python script accepts any number of .mesh files as arguments, again generating .dat and .mtl files as output.
Mesh2Obj is new, and is being used to update old Meshwork models in Wings3D.

Explanation by Aegidian (from back in 2005) - see his original BB thread here. There is more detail on use later in the thread

Scripting

  • xml2ns.py - Converts xml to open step (written by Cdr. Jettison). Requires Python2.6+ (not 3.x) to be installed and XML plist must be free of comments to work.
  • Note that this conversion script contains CR/LF (carriage return/linefeed) end-of-lines, as used on Windows computers. This will cause "bad interpreter: No such file or directory" errors if run on Linux. You can strip out the CR characters yourself, or download this copy of the script which has already had the CRs removed. (you will also need to make the script executable)

Texturing

  • Planettool - a application from Ahruman for converting equirectangular projection textures to cube map textures.

Links


  • Note that Library OXP has MatFinder & DevTools add-ons for helping see the models in Oolite (for placing exhausts, etc.).