Hi everybody,
I've written an add-on for Blender 2.5 that imports / exports .msh files to / from Blender 2.5.
1 May, 2012. UPDATE! The current version of the add-on works only with Blender 2.63 or later with Bmesh (new powerful mesh system with Ngons).
Feel free to test and use this add-on, especially if you like Blender.
Bug reports are welcome.
The addon exports and imports geometry, UVs, materials and textures from/into Blender scene.
Import example: Atlantis from Orbiter in Blender.
Export example: Sintel near a DGIV:
Installation:
1. Download the latest Blender build
2. Download the archive from links below:
Old version for Blender 2.7x (Github) (.zip), or
Latest version (Blender 2.8, not done yet!) (.zip)
Latest version (Blender 2.8, not done yet , new link!) (.zip)
or you can download Git repository from git://github.com/vlad32768/blender-orbiter-io.git
3. Place io_orbiter_msh.py into Blender's addons directory
4. Enable module in File->User Preferences->Add-Ons dialog
Notes on .msh import:
1. You should import meshes from Orbiter installation. The module will autodedect Orbiter directory and load textures from Orbiter installation.
2. The script doesn't import vertex normals. It seems that Blender often recalculates vertex normals, so it's useless to import them.
3. If there is one material with different textures in .msh file, the script will create a copy of this material for every texture.
4. There are no ambient and emissive colors in Blender, so the script doesn't import ambient colors, but calculates emit component
5. Some models (for example DGIV and DG-XR) have got materials with shiny specular and zero hardness. That doesn't look good in blender.
You can use "Raise small hardness" parameter in file import dialog to set minimal hardness manually
Notes on .msh export
1. The script exports selected objects. To export the whole scene, select all objects by pressing "a".
1a. Blender has to be in object mode before exporting ( to avoid some Python API issues and, of course, to select mesh objects for export). If not, object mode will be set automatically during export.
2. Coordinate system: The script does conversion to left handed coordinate system, so there is the proper way to place your model in Blender when you start modeling:
-- Y axis is the direction of the main thruster's exhaust; -Y is the main thrust direction;
-- Z axis points UP;
-- X axis points LEFT.
3. Materials:
-- You should use Blender Internal renderer; don't use Cycles if you want to export your model to Blender;
-- The script exports only the first material of a mesh object;
-- The script makes Ambient color equal to Diffuse;
-- Emissive color is equal to Diffuse*emit
4. Textures
-- The script exports only the first texture of a material; this texture's type must be "IMAGE".
-- If you export your model to "file.msh", textures will be saved in "filetex" directory near the .msh file.
"file.msh" should be copied to Orbiter's "Meshes" directory, "filetex" directory -- to "Textures" (see TEXTURES section of .msh file)
-- Blender does not support writing .DDS files. In most cases the script will save .png files (check it).
So you have to convert textures to .dds manually. However, the script writes names with .dds extension in .msh TEXTURES section
I've written an add-on for Blender 2.5 that imports / exports .msh files to / from Blender 2.5.
1 May, 2012. UPDATE! The current version of the add-on works only with Blender 2.63 or later with Bmesh (new powerful mesh system with Ngons).
Feel free to test and use this add-on, especially if you like Blender.
Bug reports are welcome.
The addon exports and imports geometry, UVs, materials and textures from/into Blender scene.
Import example: Atlantis from Orbiter in Blender.
Export example: Sintel near a DGIV:
Installation:
1. Download the latest Blender build
2. Download the archive from links below:
Old version for Blender 2.7x (Github) (.zip), or
Latest version (Blender 2.8, not done yet!) (.zip)
Latest version (Blender 2.8, not done yet , new link!) (.zip)
or you can download Git repository from git://github.com/vlad32768/blender-orbiter-io.git
3. Place io_orbiter_msh.py into Blender's addons directory
4. Enable module in File->User Preferences->Add-Ons dialog
Notes on .msh import:
1. You should import meshes from Orbiter installation. The module will autodedect Orbiter directory and load textures from Orbiter installation.
2. The script doesn't import vertex normals. It seems that Blender often recalculates vertex normals, so it's useless to import them.
3. If there is one material with different textures in .msh file, the script will create a copy of this material for every texture.
4. There are no ambient and emissive colors in Blender, so the script doesn't import ambient colors, but calculates emit component
5. Some models (for example DGIV and DG-XR) have got materials with shiny specular and zero hardness. That doesn't look good in blender.
You can use "Raise small hardness" parameter in file import dialog to set minimal hardness manually
Notes on .msh export
1. The script exports selected objects. To export the whole scene, select all objects by pressing "a".
1a. Blender has to be in object mode before exporting ( to avoid some Python API issues and, of course, to select mesh objects for export). If not, object mode will be set automatically during export.
2. Coordinate system: The script does conversion to left handed coordinate system, so there is the proper way to place your model in Blender when you start modeling:
-- Y axis is the direction of the main thruster's exhaust; -Y is the main thrust direction;
-- Z axis points UP;
-- X axis points LEFT.
3. Materials:
-- You should use Blender Internal renderer; don't use Cycles if you want to export your model to Blender;
-- The script exports only the first material of a mesh object;
-- The script makes Ambient color equal to Diffuse;
-- Emissive color is equal to Diffuse*emit
4. Textures
-- The script exports only the first texture of a material; this texture's type must be "IMAGE".
-- If you export your model to "file.msh", textures will be saved in "filetex" directory near the .msh file.
"file.msh" should be copied to Orbiter's "Meshes" directory, "filetex" directory -- to "Textures" (see TEXTURES section of .msh file)
-- Blender does not support writing .DDS files. In most cases the script will save .png files (check it).
So you have to convert textures to .dds manually. However, the script writes names with .dds extension in .msh TEXTURES section
Last edited: