Ogre Materials

From EQUIS Lab Wiki

Jump to: navigation, search

Ogre models are defined via a set of files, normally created by exporting the model from a modelling tool such as XSI.

  • .mesh file: This is the main model file. Models are loaded into Ogre via the CreateEntity API call, which takes a .mesh file as parameter. The .mesh file contains the geometry of the model as well as pointers to the model's .material and .skeleton files.
  • .skeleton file: This contains the model's bones, the bone hierarchy, and the model's animations (expressed in terms of the bones.)
  • .material file: A material file expresses attributes of the model's appearance, such as lighting and texturing. Materials are described in the Ogre manual. The material used for a given mesh can be overridden using the SetMaterialName operation. If you wish to use invoke vertex or fragment programs on the GPU, you specify them in the .material file.

Viewing and Manipulating Ogre Model Files

.material files can be edited using any text editor.

.mesh and .skeleton files are binary. Their contents can be viewed by converting them to XML format using Ogre's XML Converter. In theory, you can modify these files by converting them to XML, editing, and then converting back to their binary form. In practice this may have limited use, however, as the next time the model is exported from the modeling tool, these changes will be lost.

Other Information