Loading Blender files by Ogre

Beauty

20-09-2010 22:09:06

I figured out that there is a possebility to read *.blend files directly from Ogre applications.


This was is used by the project OgreKIT (alias GameKIT).
OgreKit is based on Ogre 1.7 trunk, Bullet physics, LUA scripting and reading all data directly from Blender .blend files (next year also .fbx and .bullet)
http://code.google.com/p/gamekit

Main feature is that it can extract any information straight from a Blender .blend file. Currently we are converting the following data into Ogre data:

  1. triangle meshes, vertices, uv coordinates[/*:m]
  2. embedded texture images, such as .jpg, .png etc[/*:m]
  3. collision shape information and rigid body info (mass etc), rigid body constaints[/*:m]
  4. skeleton (armatures), vertex weighting and animation curves[/*:m][/list:u]
    Some other features include:

    1. Everything is open source under permissive BSD/MIT/Zlib licenses[/*:m]
    2. Includes latest Bullet Physics SDK[/*:m]
    3. full cmake build system support, including dependencies that build out-of-the-box under Windows, even if the DirectX SDK is missing (Linux/Mac builds will be fixed later)[/*:m]
    4. static linking to avoid missing DLL issues[/*:m]
    5. little and big endian .blend files, 32/64 bit support, forward and backward compatibility (Blender 2.5 Animato support under construction)[/*:m][/list:u]



And I got a link to sources of the used blend file parser.


I think about to integrate it in my project.
But I don't want to use it as whole game engine. (no need of physics, sound, scripting)
I would like to create (static) scenes with Blender and load them by my Ogre (Mogre) application.

Yes, you can use the Blender BlendParse files in your own project, there are no dependencies on gamekit. You can see a stand-alone example in http://dynamica.googlecode.com/svn/trun ... BlendParse, download the source from http://dynamica.googlecode.com. Note that gamekit uses its own animation system sampling Blender animation curves.


Maybe somebody need it and like to port it to C#.
In this case, be welcome publish it.


P.S.
I hope you don't say I'm a spammer because of creating such threads.

Beauty

20-09-2010 22:16:28

Now I looked to to sources more deeply.

The interesting files are these:
readblend.h
readblend.c

Maybe nothing more is needed to port.
Although ... "nothing more" means about 3000 lines of code :lol: