Skip to content

Add Object in the Environment

Brice Donval edited this page Jan 7, 2020 · 8 revisions

(author: Donatella Simonetti)

Content

How to create a flat object

Pre requirements

OgreXMLConverter: can convert a XML file in mesh and vice versa. Download XML converter for Windows this link: http://wiki.ogre3d.org/OgreXmlConverter

  • Open CommandPrompt and write the following line:
    • cd ‘path folder OgreCommandLineTool’
    • OgreXMLConverter
    • OgreXMLConverter [options] sourcefile [destfile]
      • If you want just to convert, you can write: OgreXMLConverter sourcefile [destfile]

Note that each file you want to convert has to be in the same folder of OgreXMLConverter.exe.

How add the object in Greta Environment

<GRETA_DIR>/bin/Player/Data/objectList.ini --> every object (file .mesh) you want to create has to be put inside the environment and so has to be add in this list, giving it an id (i.e. object.chair) and write its path.

Once put the mesh file in the folder you mentioned in the file objectlist.ini, take into account that the mesh file need a file .material where it stored the information about the texture and color of the object. If the texture is made by an image, remember to put the image in format .png or .jpg.

Once created the file .mesh, the related file .material, add the object in objectlist.ini file. The last step is add the object in the XML environment:

The “reference” is the identifier you put in the list of the object while the "id" is a name you create for that object.

Blender2Ogre plugin

Pre-requirements: Blender Steps to follow:

  • OgreXMLConverter: can convert a XML file in mesh and vice versa. Download XML converter for Windows this link: http://wiki.ogre3d.org/OgreXmlConverter ;
  • Download Bleder3ogre file .zip: https://github.com/OGRECave/blender2ogre ;
  • Export the file zip and copy the io_ogre folder in <BLENDER_DIR>/scripts/addons folder;
  • To set the correct path to OGRETOOLS_XML_CONVERTER config.py (in <BLENDER_DIR>/scripts/addons/io_ogre); the path has to be the path of the folder you download in the first step where you have the .exe files;
  • Open Blender. Go to: File/User Preferencies/Add-ons. At the bottom you find “install Add-on from File”. Click and find the io_ogre folder you copied in blender and click on config.py file to install the addon;
  • Find the ogre addon just installed and enable it. Make sure that the path of OgreTools_xml_converter is the same you putted in the config.py file. If different change it.

Now it is done and you can create the object in Blender and export them in .mesh format.

Getting started with Greta

Greta Architecture

Quick start

Advanced

Functionalities

Core functionality

Auxiliary functionalities

Preview functionality

Nothing to show here

Previous functionality (possibly it still works, but not supported anymore)

Clone this wiki locally