Export instructions (Blender to Ogre)

Export instructions (Blender to Ogre)

Postby Skorpio » 13 Oct 2013, 20:13

Export from Blender to Ogre

Download and install the Ogre exporter and the OgreXmlConverter:
http://www.ogre3d.org/tikiwiki/tiki-ind ... lConverter

The Blender Ogre exporter has to be put into the addon folder inside your Blender folder or you can install it over the addon menu. The addon needs to be enabled.

Then click on the Ogre check box in the top bar. This makes a couple of options available in other panels. In the scene panel you can set the path to the OgreXmlConverter.

Name your model and mesh (object and mesh datablocks), the material and textures.

Apply scale and rotation (ctrl-A). We treat 1 Blender unit as 1 meter. Since creatures can be scaled in-game, that's actually not so important.

Create a NLA track and add all animations to it. Make sure that the action strips are not too close to each other, so that the animations don't get fused.

Creatures with hands that should be able to hold a weapon should have two bones at their hands that have to be named Weapon_L and Weapon_R. The z-axis should point back, if the weapon is held vertically (check out a model in the repository).

To export a model, select it, then click on file --> export --> 'realXtend tundra' (the other exporter exports the whole scene, what you usually don't want). Scroll down to see the options. Swap axis should be 'xyz'.

Choose your destination folder and hit export. Put the mesh and skeleton files into the 'model' folder, the material into the 'scripts' folder and the textures into the 'textures' folder.

Testing a model in-game

To add a model to the game you have to open the level file (Test.level) and add a line for it to creature classes and creatures. Don't forget to increase the number of creatures and classes. You can simply copy and paste a line, for example the Orc, and replace the name of the creature and the mesh file. Many values of the creatures like hit points don't work correctly at the moment, so you can just leave them as they are.

SVN (Subversion) ...
User avatar
OD Moderator
Posts: 775
Joined: 05 Dec 2009, 18:28

Linux: Export instructions (Blender to Ogre)

Postby Elvano » 24 Nov 2013, 17:14

Linux users ought to extract the file named 'io_export_OgreDotScene.py' into the ~.config/blender/<your blender version>/scripts/addons/ folder and enable it in the user preferences as described above
(.config is a hidden folder in you user's home directory)

Get the file for your blender version here!

You might want take note of the rapid development on Blender.
This means that the exporter plugins might not support the lastest version of Blender and you may there for have to run an older version of Blender.
It can't hurt first testing the addon to the version you prefere, but if it isn't working and you do want to use the latest version,
Blender allows you to have multiple versions installed alongside eachother (for linux users anyway)
User avatar
Posts: 121
Joined: 23 Sep 2013, 12:42

Re: Export instructions (Blender to Ogre)

Postby andrewj » 25 Nov 2013, 13:45

Skorpio {l Wrote}:
Create a NLA track and add all animations to it. Make sure that the action strips are not too close to each other, so that the animations don't get fused.

Is there are easy way to do this (in Blender 2.68a) ?

I managed to do this for a model, but it required selecting every bone in this list with a SHIFT-click (over 50 of them), COPY with Ctrl-C, then selecting every single bone again, then PASTE with Ctrl-V. And that was for a single animation, models with 5 or 10 animations would take all day.

Needless to say, I was pretty unimpressed with the very confusing UI in Blender, with two different things to select (keyframes and bones) and two different ways of selecting them in a single window (bright colors for the keyframes, dim green row background for bones).
User avatar
Posts: 193
Joined: 15 Dec 2009, 16:32
Location: Tassie

Re: Export instructions (Blender to Ogre)

Postby Skorpio » 18 Mar 2014, 16:43

To add an action to a NLA track you have to press Shift-A and choose the desired action. Of course you have to create a track first Add -> Add Tracks.

PS: Sorry for the late reply, didn't see the post.
User avatar
OD Moderator
Posts: 775
Joined: 05 Dec 2009, 18:28

Re: Export instructions (Blender to Ogre)

Postby Bertram » 15 Feb 2015, 16:37

Hey there,

This how-to has been ported here: https://github.com/OpenDungeons/OpenDun ... dels-in-OD

Please, update this one from now on.

Thanks :)
User avatar
VT Moderator
Posts: 1635
Joined: 09 Nov 2012, 12:26

Who is online

Users browsing this forum: No registered users and 1 guest