History: Mesh and Armature Exporter
Source of version: 2 (current)
Copy to clipboard
{DIV(class="Layout_box4")}%warning2% Deprecated Exporter. Please try to use ((OGRE Meshes Exporter)).{DIV}
{img src="img/wiki_up/Mesh_and_Armature_Exporter.jpg" alt="Mesh_and_Armature_Exporter.jpg" imalign="right"}
__Authors__: Jens Hoffmann, Michael Reimpell, Jeff Doyle, et al.
__Project__: OGRE Main Project (BlenderExport)
__Type__: Python Script
__Documentation__: [http://ogre.cvs.sourceforge.net/*checkout*/ogre/ogrenew/Tools/BlenderExport/Docs/index.html|Help page]
__Sources__: [http://cvs.ogre3d.org/viewcvs.py/ogre/ogrenew/Tools/BlenderExport/|OGRE Main CVS]
---
The ogreexport script exports Blender ((mesh))es and armatures to Ogre ((-XML)) files. Using the ((OgreXmlConverter)) command line tool from the ogrenew/Tools/XMLConverter directory of your Ogre installation, these -XML files can be further converted into .mesh and .skeleton files.
Blender has two notions of ((material)): Materials as displayed in the rendering engine and materials as displayed in the game engine. The script option "Game Engine Materials" let you choose which material properties should be converted. The export script already supports a multitude of material properties, most notably: ((-Ambient (Light)|ambient)), ((-Diffuse (Light)|diffuse)), ((-Specular (Light)|specular)), ((-Emissive (Light)|emissive)), ((-UV Coordinates|UV textures)) with and without alpha channel, vertex colours, normal maps, two sided faces. Support for other properties can easily be added.
The script fully supports armature keyframe ((animation))s. If you use IK solver or other constraints, you have to enable blender pose sampling in the exporter before exporting.
To export your meshes, simply highlight them and choose File->Export->OgreXML. You can also select armatures to get meshes in form of your armatures, which may be useful for debug purposes. After hitting the export button, you should get a set of .material, .mesh.xml and .skeleton.xml (if using armatures) files. Use the OgreXMLConverter utility to convert the .mesh.xml and .skeleton.xml files to their binary counterparts.
To automatically convert the -XML files on export, set the ''{MONO()}OGRE_XML_CONVERTER{MONO}'' script variable to a command line that executes the OgreXMLConverter tool, e. g.,
{CODE(wrap="1", colors="ini")} # OGRE_XML_CONVERTER
# the command line used to run the OgreXMLConverter tool.
# Set to '' to disable automatical conversion of -XML files.
OGRE_XML_CONVERTER = 'OgreXMLConverter'{CODE}
Depending on your Ogre installation and operating system you may need to specify the full path to the OgreXMLConverter tool.