Difference between revisions of "Oolite converters"

From Elite Wiki
m (Murgh moved page Oolite Converters to Oolite converters: small cap for generic title)
(Added Aegidian's 2005 explanation)
(One intermediate revision by the same user not shown)
Line 19: Line 19:
  
 
* export_oolite.py - exports a blender mesh into a .dat file for Oolite. [https://gist.github.com/blm768/6059892 GitHub download] ([http://www.aegidian.org/bb/viewtopic.php?p=205187#p205187 blm768, 2013])
 
* export_oolite.py - exports a blender mesh into a .dat file for Oolite. [https://gist.github.com/blm768/6059892 GitHub download] ([http://www.aegidian.org/bb/viewtopic.php?p=205187#p205187 blm768, 2013])
 +
 +
=== 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 [[User:Aegidian|Aegidian]] (from back in 2005) - see his original BB thread [http://www.aegidian.org/bb/viewtopic.php?f=4&t=842 here]. There is more detail on use later in the thread''
  
 
== Scripting ==
 
== Scripting ==
Line 33: Line 61:
 
* [[Property_lists|Property lists]] - a short introduction in plists.
 
* [[Property_lists|Property lists]] - a short introduction in plists.
 
* [[OXP_howto|OXP howto]] - overview about creating OXP.
 
* [[OXP_howto|OXP howto]] - overview about creating OXP.
* [http://aegidian.org/bb/viewtopic.php?f=2&t=10039 BB discussion] about converting plists.  
+
* [http://aegidian.org/bb/viewtopic.php?f=2&t=10039 BB discussion] about converting plists (2011-21)
 
+
* [http://aegidian.org/bb/viewtopic.php?f=4&t=18942 Python model converters] (2017)
  
 
[[Category:Oolite_utilities|Converters]] [[Category:Oolite_scripting|Converters]]
 
[[Category:Oolite_utilities|Converters]] [[Category:Oolite_scripting|Converters]]

Revision as of 07:48, 10 April 2023

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.

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