PDA

View Full Version : BHM 3D File Format



Scali
05-01-2010, 03:22 AM
Many years ago, we (Bohemiq, a demoscene group) developed a file format for storing 3D scenes and animation in a compact and efficient way. We arrived at a format that we call BHM, which is very similar to XML in nature, in that it is hierarchical, and very flexible. Except BHM stores binary data rather than ASCII.

I have decided a while ago to make some of this code open source, under the BSD license, and have created a project for it on SourceForge:
http://sourceforge.net/projects/bhmfileformat/

Since the file format by itself does not really give an example of how it can be used in practice, I have decided to build a simple multi-platform sample in OpenGL, which plays a skinned animation stored in a BHM file.

You can find this sample in the repository on SourceForge. You can use it to study the BHM format, if you would like to use it yourself (like XML, it can be used for anything, not just 3D scenes). But you can also use it as a tutorial for OpenGL or for skinned animation, for example. Since the code is all BSD-licensed, you are free to use and modify the code for your own productions.

The code also contains a small library which I call GLUX (GL Useful eXtensions), which bears some similarity to Microsoft's D3DX, and provides some easy wrappers for texture loading, shader compiling and linking, and basic maths. I will probably make that into a separate project later.

http://bohemiq.scali.eu.org/OpenGL-FreeBSD.png