My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
BlendParse  
Blender .blend parser
Updated Apr 21, 2010 by erwin.co...@gmail.com

Introduction

The open source Blender modeler uses the binary .blend format to store all its assets. We developed a parser, fully under the permissive zlib license, to extract any data from this file format. The parsing is very fast so it can be directly used in a game or application.

Details

Some of the data that can be extracted from a .blend file:

  • triangle meshes, vertices and indices
  • textures embedded/packed in the jpg format
  • collision and physics information
  • animation and skinning information (see example in the OgreKit demo at the gamekit project)

Implementation

The .blend parser and example code is located in Oolong Engine2/Examples/Demos/ReadBlend.

Notes

If necessary, you can optimize the triangle mesh data using PowerVR SDK utilities such as TriStrip.

  • See the TriStripList function in OolongEngine2/Renderer/Geometry/TriStrip.cpp.
  • Textures could be optimized using PVRTC compression.

See also the OgreKit project at http://gamekit.googlecode.com on more advanced usage, such as extracting skeletal animation and skinning from a .blend file.

Comment by omai...@gmail.com, Oct 9, 2011

Please note that the method:

btCollisionObject* BulletBlendReaderNew::createBulletObject(Blender::Object* object);

has memory leak for

btTriangleMesh* meshInterface = new btTriangleMesh();

if the object type is: OB_RIGID_BODY or OB_DYNAMIC and the object->boundtype is:

OB_BOUND_SPHERE or OB_BOUND_BOX or OB_BOUND_CYLINDER or OB_BOUND_CONE
since all of the above bound types dosent use allocated meshInterface.


Sign in to add a comment
Powered by Google Project Hosting