.blend file spec?

General discussion about the development of the open source Blender

Moderators: jesterKing, stiv

shagwana
Posts: 9
Joined: Wed Oct 16, 2002 6:18 am
Location: UK

.blend file spec?

Post by shagwana » Wed Nov 06, 2002 11:03 pm

Is there a .blend file spec document floating around any place? :wink:

_florian_
Posts: 35
Joined: Wed Oct 16, 2002 10:17 am

Post by _florian_ » Wed Nov 06, 2002 11:07 pm

hi

there is no file spec. .blend is something like a "memory dump".
what do you want to do?

florian
GIT d+ s:- a- C++ UL+++ P--- L+ E--- W+ N+ o-- K- w++ O-- M V--
PS+ PE Y+ PGP++ t+++ 5 X+++ R- tv++ b++ DI- D- G e+ h-- r- y++

shagwana
Posts: 9
Joined: Wed Oct 16, 2002 6:18 am
Location: UK

Post by shagwana » Wed Nov 06, 2002 11:16 pm

I wana pull some object information and convert it into another file type (so i can use it in my games). The information im after is the vert, poly, materials, uv textures, vert colors and possibly the bones data too.

olivierb
Posts: 5
Joined: Fri Oct 18, 2002 5:37 pm

Post by olivierb » Thu Nov 07, 2002 9:21 pm

why don't use a python script ?
IMHO it's the more efficient way to expot from Blender :)
I've posted some examples here, inspired by PovExport from Sebastien Loss.

Good luck :)
Olivier

jms
Posts: 33
Joined: Sat Oct 19, 2002 3:04 pm

Re: .blend file spec?

Post by jms » Thu Nov 07, 2002 10:02 pm

shagwana wrote:Is there a .blend file spec document floating around any place? :wink:
No, but there is a python script
to read object and materials/textures in a blender
file, an excelent work done by eeshlo for his
lightflow exporter. Address is on the elysiun python
forum.
http://www.elYsiun.com/forum/viewtopic.php?t=6244
Zoo-3D.Blender, Ze French-Speaking Community SKB My french book about Blender.

shagwana
Posts: 9
Joined: Wed Oct 16, 2002 6:18 am
Location: UK

Post by shagwana » Thu Nov 07, 2002 10:21 pm

Hi, one of the reasons for accessing the contence of the .blend file is to be able to pull the information that I dont seem to be able to access in pyhton (for example bones animation). Also, for the type of conversion Im doing on the mesh data (welding together vert's and generating smallest number of connected faces possible) phython just turns out to be slow for me. Granted, I dont know to much about pyhton so I could be doing things that can be done faster!.

To this date I have managed to export the file I need to, im just currently looking for ways to speed it up and improve the usefullness of blender to myself.

LethalSideParting
Posts: 71
Joined: Mon Oct 21, 2002 12:53 am
Location: Bucks, England

Post by LethalSideParting » Fri Nov 08, 2002 12:52 pm

Whilst we're all here, what does everyone think about the current Blender file spec?

My personal point of view is that a memory dump isn't a particularly elegant way to organise this (/me dons his flame-retardant suit :wink: ). I mean, one byte goes wrong and 90% of the time your scene won't load again. It's big, it's bad, and pretty ugly compared to some of the other formats out there (look at the .obj or .xsi formats if you don't believe me).

I also feel that one way to get Blender accepted quicker is to make it easier for other packages to import *from* the Blender format, rather than having to rely on it being exported nicely from Blender in the first place.

Do you people feel we need another format, in short?

LethalSideParting
Last edited by LethalSideParting on Fri Nov 08, 2002 3:25 pm, edited 1 time in total.

tyreth
Posts: 6
Joined: Fri Nov 08, 2002 3:03 pm

Post by tyreth » Fri Nov 08, 2002 3:04 pm

A new format sounds good, something that is easy to parse and work with with scripts or other programs for importing objects.

theeth
Posts: 500
Joined: Wed Oct 16, 2002 5:47 am
Location: Montreal
Contact:

Post by theeth » Fri Nov 08, 2002 4:25 pm

LethalSideParting wrote:My personal point of view is that a memory dump isn't a particularly elegant way to organise this (/me dons his flame-retardant suit :wink: ). I mean, one byte goes wrong and 90% of the time your scene won't load again.
the blend format isn't called DNA for nothing. There was a discussion about this in the foundation forum on Elysiun, and Ton explained clearly that the blend file were self cleanable and self repearable.

I never had any problem with blend not loading, and I worked with some big file now and again.

Martin
Life is what happens to you when you're busy making other plans.
- John Lennon

slikdigit
Posts: 133
Joined: Wed Oct 16, 2002 3:52 am
Location: Northampton, MA (US)

Post by slikdigit » Fri Nov 08, 2002 6:08 pm

right. I think it would be better to keep the current .blend file spec (at least for this series of the prog.) and instead enhance python/export to have access to all that it needs to for proper exporting.

Hos
Posts: 185
Joined: Wed Oct 16, 2002 12:06 am

Post by Hos » Fri Nov 08, 2002 6:23 pm

LethalSideParting wrote:I mean, one byte goes wrong and 90% of the time your scene won't load again.
Try compressing a file with zip, change one byte of
the zip file, then run unzip on the modified zip file. Does
the file successfully decompress?

This problem is common to many file formats (particularily
binary based file formats) and so I don't think this is a
valid criticism of the blend format.

Why would you want to change one byte anyways?

Chris

LethalSideParting
Posts: 71
Joined: Mon Oct 21, 2002 12:53 am
Location: Bucks, England

Post by LethalSideParting » Sun Nov 10, 2002 5:43 pm

I never had any problem with blend not loading, and I worked with some big file now and again.
Might just be me then... I've worked with some files > 10meg, and sometimes I'll go to load them and it'll just go 'Not a blend file' and return me to an empty scene. Not just big ones, though - it happened once with a file that was about 200k. Maybe it's me, maybe it's Windoze :roll:
Why would you want to change one byte anyways?
lol! I'm not saying a person would. What I was trying to convey is that they're very easy to corrupt, eg. when downloading or saving, just one byte out of line can send you off.

I wasn't trying to say 'get rid of the current spec'. However, I do feel that one thing that would help Blender a lot in the wider world is making it easier for other packages to import from the Blender file format, rather than relying on the Blenderhead who made the file exporting it to another format completely. It might be something to think about for Blender 3.0, at least. Just a thought.

LethalSideParting

belac
Posts: 15
Joined: Sun Nov 03, 2002 7:23 am
Location: Grand Rapids, Mi. USA
Contact:

Post by belac » Mon Nov 11, 2002 5:09 pm

why don't you have Maya and 3Dstudio change their formats to allow import of blender? or to allow us to import their files into blender? do you think that they would?

::sarcasm::

pontus
Posts: 1
Joined: Tue Nov 12, 2002 11:04 am

Post by pontus » Tue Nov 12, 2002 11:09 am

Changing the format seems a bit premature, it would be a quite disruptive change, when the focus is better kept on stabilizing the foundation version. However I do think that splitting out the format reading/writing code into a (shared) library would be a very good idea. This would allow external programs to use blender files easily. Also, language bindings for this library could be created for whichever language people want to use.

ton
Site Admin
Posts: 350
Joined: Wed Oct 16, 2002 12:13 am
Contact:

Post by ton » Tue Nov 12, 2002 4:14 pm

My vote is for keeping the current file format, improving import/export a lot, and go for using an external (shared) library later, or even better: use Verse for it, a sophisticated database system that will handle it all.

BTW: "not BLEND file" errors are generated when the first 16 bytes in a file are incorrect. Has nothing to do with file size, but happens when saving files with a web browser for example.

Post Reply