Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 4 and Version 5 of content/tools/FromBlenderToOrxonox


Ignore:
Timestamp:
Feb 27, 2017, 5:05:20 PM (4 years ago)
Author:
zifloria
Comment:

Updated to Blender 2.69

Legend:

Unmodified
Added
Removed
Modified
  • content/tools/FromBlenderToOrxonox

    v4 v5  
    11= Exporting Objects From Blender To Orxonox =
    22
    3 ''Checked with Blender 2.49b on 6. Mar. 2010 by [wiki:Deca beni]''
     3''Checked with Blender 2.69 on 27 Feb. 2017''
    44
    55This page explains how to export 3D models from Blender and view them in a Level in Orxonox.
     
    1111=== Prerequisites ===
    1212
    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.
     13To export to mesh we first need the 'Blender Exporter' and the 'Ogre Command-line Tools'.
     14
     15The Blender exporter works well with [https://download.blender.org/release/Blender2.69 Blender 2.69], other versions haven't been tested.
     16
     17The Ogre command-line tools are available [http://www.ogre3d.org/tikiwiki/OgreXmlConverter here (Windows and Mac)].[[BR]]
     18On 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]
    1419
    1520==== Blender Exporter ====
    1621
    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.
     22Download the addon [https://code.google.com/archive/p/blender2ogre/downloads here] (blender2ogre-0.6.0.zip).
    1823
    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].
     24In Blender, open 'User Preferences' -> 'Install from file ...'.[[BR]]
     25Then choose the .zip file and activate the addon.
    2226
    2327
    2428==== Command-line Tools ====
    2529
    26 Download and extract to any location you want, just remember where. With Windows it should usually extract automatically to C:\OgreCommandLineTools
     30Download and extract to any location you want, just remember where.
    2731
    2832=== Exporting to mesh ===
    2933
    30 [[Image(wiki:BlenderExport:export.png, right)]]
    31  1. Make sure your model reaches the [wiki:BlenderGuidelines general guidelines for a mesh].
    3234 1. Check if all textures for your objects are loaded into Blender.
    3335 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
    3839
    39 This 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.
     40Then you need to manually convert them with the XML converter.
    4041
    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:
     42In Windows, drag the file on the XML converter executable.[[BR]]
     43In Linux, open a terminal and execute {{{./OgreXMLConverter fileName.mesh.xml}}}
    4244
    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 }}}
     45This 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.
    5246
    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.
    5647
    5748=== To Orxonox ===