dna_500 Today a document completely describing the internal .blend file format surfaced. It's written by Jeroen Bakker, a former demo coder and it caused a bit of a stir in some chatboxes. This document is the first time someone collected the entire structure of a .blend file and the 'Blender DNA'. Until now the documentation for it was shattered around in many places, mostly as comments in the code

Jeroen writes:

I'm working on a product what integrates Blender in a render pipeline by using the Blender command line and blend-files (.blend). The command line is not a problem as it is commonly used, but using blend-files outside Blender is difficult, because it is not that well documented. On the Internet, I've only found some clues about it on the Blender architecture pages [ref: http://www.blender.org/development/architecture/]. These were not sufficient. To really understand the file format I had to go through Blender's source code. In this article I will describe the blend-file-format with a request to tool-makers to support blend-file.

First I'll describe how Blender works with blend-files. You'll notice why the blend-file-format is not that well documented, as from Blender's perspective this is not needed. We look at the global file-structure of a blend-file (the file-header and file-blocks). After this is explained, we go deeper to the core of the blend-file, the DNA-structures. They hold the blue-prints of the blend-file and the key asset of understanding blend-files. When that's done we can use these DNA-structures to read information from elsewhere in the blend-file.

In this article we'll be using the default blend-file from Blender 2.48, with the goal to read the output resolution from the Scene. The article is written to be programming language independent and I've setup a web-site for support.

Links

Share this article
  • Twitter
  • Digg
  • Facebook
  • StumbleUpon
  • del.icio.us
  • Reddit






Related News

Related Resources


Related posts are selected automatically based on their content.


11 Responses to “'The mystery of the blend' – the Blender file-format explained”  

  1. 1 Nathan Letwory

    Very cool documentation, well executed and detailed. More of this!

    /Nathan

  2. 2 Agile

    @ Bart "formed demo coder" or "former"?

    Demoscene is one of European achievements!

  3. 3 Agile

    It is well demanded resource, I too searched for documentation on blender files.

  4. 4 Paul

    Nice! At the moment, when I need to automate extracting information from blend files, I work through Blender's python API, because I'm daunted by the file format. With this as a guide, I can imagine cutting out the middle man. Thanks Jeroen!

  5. 5 marijn

    the article was also in "BlenderArt Magazine Issue #21, Look What I Can DO!".

  6. 6 Jeroen Bakker

    HI, thank you all for your remarks! Hope it's helpful.

  7. 7 Felix

    yeah, and nw for the first time, .blend compatibility might be broken with 2.5 :'(

    oh well, one can always run 2.49 and 2.50. :)

  8. 8 gokudomatic

    I'm impressed that the blender programmers could maintain so long the project without a clear written spec of the file format. What would happen if one of them get shot by a truck? or worse, get hired by an ultra-proprietary company (where even his soul won't rest in peace)?

  9. 9 ysvry

    intresting work thx.

  10. 10 DiThi

    The formant hasn't been documented apart from blender's source code because the usual way of dealing with those files is using blender with a script which exports the data to a different format. If you want to do a program which manupulates .blend files, I think using blender as a batch tool is the easiest way.

  11. 11 pima

    many thanks !!

Leave a Reply