Changes between Version 4 and Version 5 of content/tools/FromBlenderToOrxonox
- Timestamp:
- Feb 27, 2017, 5:05:20 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
content/tools/FromBlenderToOrxonox
v4 v5 1 1 = Exporting Objects From Blender To Orxonox = 2 2 3 ''Checked with Blender 2. 49b on 6. Mar. 2010 by [wiki:Deca beni]''3 ''Checked with Blender 2.69 on 27 Feb. 2017'' 4 4 5 5 This page explains how to export 3D models from Blender and view them in a Level in Orxonox. … … 11 11 === Prerequisites === 12 12 13 To export to mesh we first need the 'Blender Exporter' and the 'Ogre Command-line Tools'. Get them from the [http://www.ogre3d.org/download/tools Ogre Tools Download Page]. For Blender 2.49b, you will need to have Python installed on your system, version 2.5.2 or higher. If you use Linux, you will most probably already have Python installed. 13 To export to mesh we first need the 'Blender Exporter' and the 'Ogre Command-line Tools'. 14 15 The Blender exporter works well with [https://download.blender.org/release/Blender2.69 Blender 2.69], other versions haven't been tested. 16 17 The Ogre command-line tools are available [http://www.ogre3d.org/tikiwiki/OgreXmlConverter here (Windows and Mac)].[[BR]] 18 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] 14 19 15 20 ==== Blender Exporter ==== 16 21 17 If a system wide installation is intended, unpack the zip archive you downloaded from the Ogre webpage into /usr/share/blender/scripts. If only a local installation in required or possible (probably due to the lack of permissions), unpack it somewhere in your home dir, ~/.blender/scripts/ is suggested.22 Download the addon [https://code.google.com/archive/p/blender2ogre/downloads here] (blender2ogre-0.6.0.zip). 18 23 19 '''Note:''' On the Tardis computers of D-ITET, the Blender Mesh Exporter is already installed. 20 21 '''Note 2:''' The manual for the OGRE Meshes Exporter can be found [http://www.cs.ucr.edu/~macchiea/cs134/lab1/ogrehelp/ogremeshesexporter.html here]. 24 In Blender, open 'User Preferences' -> 'Install from file ...'.[[BR]] 25 Then choose the .zip file and activate the addon. 22 26 23 27 24 28 ==== Command-line Tools ==== 25 29 26 Download and extract to any location you want, just remember where. With Windows it should usually extract automatically to C:\OgreCommandLineTools30 Download and extract to any location you want, just remember where. 27 31 28 32 === Exporting to mesh === 29 33 30 [[Image(wiki:BlenderExport:export.png, right)]]31 1. Make sure your model reaches the [wiki:BlenderGuidelines general guidelines for a mesh].32 34 1. Check if all textures for your objects are loaded into Blender. 33 35 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. 34 1. It is very helpful, to name your objects and data blocks if you have not done so already (see picture). 35 1. Open the export dialog (File -> Export -> OGRE Meshes). If this option doesn't show up, update the menus (Scripts Windows -> Scripts -> Update Menus). If it still doesn't show up, make sure you have installed the script correctly and you have python installed. Verify in the User Preferences Window under ''File Paths'', that the path to Python scripts is correct. 36 1. Select the model. Hit Preferences and provide the Path to the Ogre Command-line Tools (e.g. C:\OgreCommandLineTools), return to the main window. Check "OgreXML Converter", uncheck "Copy Textures", if your texture resides in the same folder as your blend file. Pick a sensible filename for your material under Material Settings. 37 1. Hit Export. 36 1. Name your objects and meshes 37 1. Open the export dialog (File -> Export -> Ogre 3D). If it doesn't show up, make sure you have installed the script correctly. 38 1. Select the model and hit Export. This will produce a '.mesh.xml' file 38 39 39 Th is will create (at least) 4 new files in the blend-file-folder: a .mesh file, a .mesh.xml file, and a .material file. Most likely, a log file of the OgreXML Converter will be produced also. Ignore it for now.40 Then you need to manually convert them with the XML converter. 40 41 41 Check if the new created .mesh file is version 1.41 or 1.40 (open it with gedit or any editor and have a look at the first lines). If your exported mesh has 1.41 you have to export the .xml file by yourself using the following steps: 42 In Windows, drag the file on the XML converter executable.[[BR]] 43 In Linux, open a terminal and execute {{{./OgreXMLConverter fileName.mesh.xml}}} 42 44 43 1. Download and extract the OgreXMLConverter from [http://sourceforge.net/projects/ogre/files/ogre-Tools/1.7.2/OgreCommandLineTools_1.7.2.zip/download here] 44 2. Copy the .mesh file from the previous exported Mesh (exported from Blender) into the OgreXMlConverter folder 45 3. Use the following command to create a 1.40 version mesh 46 {{{ 47 #!html 48 <pre class="wiki" style="white-space:normal;"> 49 wine OgreXMLConverter yourmesh.xml 50 </pre> 51 }}} 45 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 also. 52 46 53 The material filename will be the one you chose in the export dialog. This file contains all materials that are used in your scene, so if you export several meshes from the same scene (blend-file), you will only need one material file.54 55 The name of the two mesh files will be the one you picked in the material window (see picture). The .mesh.xml file is a XML file containing the data of your object. Because you checked "OgreXML Converter", the XML file was directly converted to the binary mesh file, which we need to load the model into the game.56 47 57 48 === To Orxonox ===