Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Version 4 (modified by nicolasc, 17 years ago) (diff)

Blender Export howto

This page explains how to export 3D models from Blender to load them in Orxonox.

mesh Files

Prerequisites

Blender Mesh exporter from the http://www.ogre3d.org/index.php?option=com_content&task=view&id=413&Itemid=133 Ogre Webpage. this package should be installed alongside the other Blender scripts. (/usr/share/blender/scripts for a global installation)

exporting to mesh

  1. Check if all textures are loaded in the blend-file
  2. Open the export dialog (File→Export→OGRE Mesh)
    • Select the model, check "OgreXML Converter", uncheck "Copy Textures", if your texture resides in the same folder as your blend file.
  3. Hit Export

This will create (at least) 3 new files in the blend-file-folder: <model>.mesh, <model>.mesh.xml, and Scene.material. While the .material name can be chosen while exporting, the mesh cannot. It is recommended to rename the mesh-file into something more sensible.

obj Files

  1. Delete all unused Materials
  2. Load the correct texture files for your meshes into blender (jpg or png)
  3. Select all objects you want to export. Don't forget the mountpoints of your spaceship!
  4. Export the the Blender scene as an Object file (File → Export → Wavefront (obj))

Now you should have two new files: a *.obj and a *.mtl file. The OBJ file contains all you meshes and texture coordinates. The MTL file contains all material (texture) related data. These files can be edited with any good text editor.

Problems

  • If your model is transparent in the engine (but shouldn't) you have to flatten you texture file in GIMP before exporting as png or jpg. That deletes the alpha channel, which is not needed anyway.

Attachments (1)

Download all attachments as: .zip