Version 6 (modified by FelixSchulthess, 17 years ago) (diff) |
---|
Object Export with Blender
This page explains how to export 3D models from Blender to load them in Orxonox.
mesh Files
Prerequisites
Blender Mesh exporter from the Ogre Webpage.
If a system wide installation is intended, unpack the zip file into /usr/share/blender/scripts. If only a local installation in required or possible - due to the lack of permissions - unpack them somewhere in your home dir - ~/.blender/scripts/ is suggested - and adapt the script path in blender (User Preferences→File Paths→Python). Don't forget to save your default settings (Ctrl+U).
Exporting to mesh
- Check if all textures are loaded in the blend-file
- 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.
- 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
- Delete all unused Materials
- Load the correct texture files for your meshes into blender (jpg or png)
- Select all objects you want to export. Don't forget the mountpoints of your spaceship!
- 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.
- Wavefront OBJ File Format Summary: http://www.fileformat.info/format/wavefrontobj/
- Alias/WaveFront Material File Format: http://www.fileformat.info/format/material/
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)
- export.png (5.9 KB) - added by FelixSchulthess 17 years ago.
Download all attachments as: .zip