blender .blend file format specs

I’ve recently created a thread on the blender forum asking the same Q,
but don’t seem to really be getting anywhere…

could anyone here help me with this:

all I’m looking for is a simple description of how each byte is handled and how it works

something like:

0x00(?): header magic
0x0?(?): unknown offset

say as if the header magic were 4 bytes long
the format would then look like this:

0x00(4): header magic
0x04(?): unknown offset

so yea…
I just need to know the file stucture and any important notes to include
thank you

2.49 format plz

I’m not working on 2.5 as it’s still somewhat experimental
(waiting for 2.6)

thank you :slight_smile:

so that’s 248…
what would be the difference between 248 and 249??
and would I need to do much to support a 249 blend file??

thanx again

I think you should concentrate on Blender 2.57

I knew someone would try to tell me to work on a 2.5x series plugin XD
I’m only doing the releases I know won’t change 2.49 and 2.6x

I’m working on both since 249 has to be converted to 26x
you can select which conversion type to use from a button window

unless the new blend format is perfected already :confused:

stability doesn’t mean the blend format doesn’t change.

DNA in the blend file is pretty constant, that’s why you can load extremely old blend files in blender 2.5… the big thing that’s changes is that animation is lost if you go back to 2.49 as that system has been totally changed

Multires has also changed…

When material refactor goes in that’ll probably change the format of materials…

On the other hand, because it’s just a bunch of datablocks and links large amounts of blend file stuff is unchanged from version to version, but stuff does change when features get added, which is pretty much every version of blender…

long story short, if you’re waiting for the .blend format to stabilise you’ll be waiting a long time, but the broad structure is extremely stable…

if you’re parsing blend files for data outside blender you better get used to the idea of making regular updates with each version!

Yup, if you just want to get data out from blender to some other application, you’re better off just exporting out from blender to some other format like obj or collada, or whatever. .blend is definitely not designed as an interchange format.

good luck at a 249 export with game chars

3DS fails
Collada fails
DX is ok, but needs a bit of work
VRML fails

I’m not going through the list

heh… alright…
I can handle that

just one thing I need to know how to do, and may require help with.
implementing the DNA feature into my plugin… :confused:

granted I’m not the most advanced of programmers…
but I see the concept goes by the binary data

I also have an experemental format that will constantly change based on different 3D format conversions
the blend format would greatly increase compatibility between formats…

I want to compair something myself…
does blender’s face-point data contain a total of 8 or more UV channels??

this is part of Nintendo’s model formatting for the Wii and GCN
the UV channel selection is controlled by the shaders and TEV’s
allowing you to basically do a pseudo texture switch on a single image.
(for those who wouldn’t understand why you’d need 8 channels)

Even if this is a problem, It’s still going to be a lot easier to just fix or extend the support of those other formats than to implement .blend file reading yourself. Take it from someone with a reasonable amount of experience in the blender source.

.blend was never designed as an interchange format, it’s basically just a (somewhat structured) binary dump of memory to disk. Especially if as you claim you’re not the most advanced of programmers, dealing with .blends will not be easy at all. Even implementing your own custom format and exporting to that from blender (which I would still recommend against over using an existing format) will be easier than .blend.

thanx for the advice
really :slight_smile:

but really…
I’m not some noob at 3D binary formatting neither
Nintendo by far has the most complicated method for organizing 3D data

looking at the data structures

I have to say,
Melee’s DAT model format appears to be much harder than the blend format

the blend format only looks about as hard as Brawl’s MDL0 format
(of course it supports more though)

oops >.>
I wasn’t supposed to say that

ah well…
we (the Brawl community) need more people knowing about the stuff we do… heh

the blend format actually appears only a bit simpler >.>

I just need to know how the DNA thing works, and how to do it…
as well as a recent blend description

I guess 257 will work <.<

btw, I’m a better progger in Py than in blender
I’m not a noob, but I’m no expert either

well, I’ve found a little documentation on the 249 format…
but nothing REALLY helpful to what I need >_>

be glad you got someone like me working on this.
I’m building this to allow cross-compatibility along anything that has to do with 3D data.

yes, that means import and export blend files

I’ll do my job to keep the plugin UD’d :wink:
but I need to have a constant supply of info in order to do it :confused:

so anyways…
the SDNA stucture vars…
I need to know how exactly those work…
(since I can’t seem to come to fully understand C-type codes)

tip for coders:
you may want to switch to B64 when I release my game system (computer)
my system won’t be using binary with only 2 bases
instead, I’m building it to use quanary (0,1,2,3) to run it’s data

the quanary representation of 110110 is 312
(3 bits instead of 6 when compaired to binary)

I developed quanary to basically bring a DNA system onto a computer
(and to try to decode DNA) :stuck_out_tongue:

imagine how awsome it would be to use your DNA to get a CG model of yourself =D
and then be able to manipulate it in any way you prefer.
just think of the possibilities :smiley:

and since quanary leads directly into B64 (as binary leads into hex)
imagine how much data you could then save

Q: how would it work on the machine?
A: a 4-state transistor would control the output based on the imput voltage

0 = 0% (0 volts)
1 = 33% (1.5 volts)
2 = 67% (3.5 volts)
3 = 100% (5 volts)

so yea…
just something to think about till I’m able to build it :slight_smile:

just tell me I’m not smart and can’t handle the concept of the blend file XDD
I’m freakin bamph-ing the computer XDD

nobody has yet answered my one Q

does blender support UV channels??
if so, how many??
(I need at least 8)
^unless 8 UV channels is a 3D standard >_>

perhapse I could get help here with my own format

if anyone’s interested, you can look up my format here:

I’m sure you guys will find a ton of flaws… heh

I have written some information about the blender file format here:

I have also some code to read .blend files:

Maybe this will help you.

thanx :slight_smile:
that helps a little, but I do need the byte-structures…

I noticed that’s TODO in this case… heh

Would something like this page help you?

Using the previously mentioned library, it should be simple to produce the same for 2.49. I can have a look if you need it.

oh wow, that helps alot :smiley:

I really just need to know what changes were made from 248 to 249

I can use the 248 src to help aid me,
but there’s alot of things about C++ that really catch me up

hopefully I can get my format correct to work with all this stuff

I really don’t know too much about 3D,
but my knowledge does surpass the brawl hacking community…

would you mind helping me build my format??
or do you have better things to do and only enough time to help me understand the blend format :stuck_out_tongue:

thanx btw :wink: