= Exporting Objects From Blender To Orxonox = ''Checked with Blender 2.69 on 27 Feb. 2017'' This page explains how to export 3D models from Blender and view them in a Level in Orxonox. == mesh Files == Ogre understands only the Ogre-specific .mesh files, so we have to export our objects from Blender to a .mesh file. A .mesh file is a binary file, that contains one single mesh (object). === Prerequisites === To export to mesh we first need the 'Blender Exporter' and the 'Ogre Command-line Tools'. The Blender exporter works well with [https://download.blender.org/release/Blender2.69 Blender 2.69], other versions haven't been tested. The Ogre command-line tools are available [http://www.ogre3d.org/tikiwiki/OgreXmlConverter here (Windows and Mac)].[[BR]] On linux, its called 'ogre tools'. We need the 'ogre-1.8-tools' version. For the ETH tardis PCs I uploaded the binary [http://svn.orxonox.net/downloads/tardisTools/OgreXMLConverter here] ==== Blender Exporter ==== Download the addon [https://code.google.com/archive/p/blender2ogre/downloads here] (blender2ogre-0.6.0.zip). In Blender, open 'User Preferences' -> 'Install from file ...'.[[BR]] Then choose the .zip file and activate the addon. ==== Command-line Tools ==== Download and extract to any location you want, just remember where. === Exporting to mesh === 1. Check if all textures for your objects are loaded into Blender. 1. Make sure your materials don't still have the generic name ('Material', 'Material.001', ...), otherwise Orxonox might not choose the correct material for your model. 1. Name your objects and meshes 1. Open the export dialog (File -> Export -> Ogre 3D). If it doesn't show up, make sure you have installed the script correctly. 1. Select the model and hit Export. This will produce a '.mesh.xml' file Then you need to manually convert them with the XML converter. On Windows, drag the file on the XML converter executable.[[BR]] On Linux, open a terminal and execute `./OgreXMLConverter fileName.mesh.xml` This will create (at least) 2 new files: A .mesh file and a .material file. Most likely, a log file of the OgreXML Converter will be produced too. === To Orxonox === 1. Copy the .mesh file to .../data_extern/models 2. Copy the .material file to .../data_extern/materials 3. Copy any texture files to .../data_extern/images/textures 4. Goto trunk/data/levels and open any level file (empty_level.oxw is always a good choice for tests) and insert: {{{ ... ... }}} 5. Make sure you have respected the [wiki:cc_guidelines Guidelines]