What is the structure of a *.blend file?

The interface, modeling, 3d editing tools, import/export, feature requests, etc

Moderators: jesterKing, stiv

Post Reply
thethekornerr
Posts: 0
Joined: Sun Oct 30, 2005 6:36 pm

What is the structure of a *.blend file?

Post by thethekornerr »

I want to build a model in Blender and get it to my engine.
I need vertex info.

Where can I get info on *.blend file?
Or maybe any simpler format which Blender supports.

Thanks.

lightning
Posts: 0
Joined: Sat May 17, 2003 9:06 pm

Post by lightning »

You would be better off using the .obj format, if you just need vertex/face information. Blender will export, it is in the scripts window.

There is an article here that has a brief summary of the format. It's pretty easy, you shouldnt have any trouble.
The dawn of a new error...

thethekornerr
Posts: 0
Joined: Sun Oct 30, 2005 6:36 pm

Post by thethekornerr »

Thanks.

thethekornerr
Posts: 0
Joined: Sun Oct 30, 2005 6:36 pm

Post by thethekornerr »

Does *.obj supports textures?
If not, which format do you advise to use?
I need not only vertex info (as I thought before), I need a whole model to export to own engine.

So which one is the easiest? And info?

Thanks.

an-toni
Posts: 0
Joined: Wed Mar 17, 2004 5:20 pm

Post by an-toni »

.blend is definitely not easiest, but thought it might be interesting for you / record to know that iirc CrystalBlend reads it - if your engine is in c++ to you might be able to reuse the code there

but yep, usually ppl export to diff formats for game engines (many engines seem to have their own)

~Toni

thethekornerr
Posts: 0
Joined: Sun Oct 30, 2005 6:36 pm

Post by thethekornerr »

If I make my own format, then I'll be unable to use Blender for creating models. Or at least I'll have to write script (and I don't know Python AT ALL).

So which one can you advise me to use? And info?

Thanks.

zupermonkey
Posts: 0
Joined: Tue Jul 06, 2004 1:13 pm

Post by zupermonkey »

I have learned Python in 0:30 minutes...

It is not hard, especially if you can already program in another language like C or C++.

jesterKing
Site Admin
Posts: 207
Joined: Fri Oct 18, 2002 12:48 pm
Location: Finland

Post by jesterKing »

thethekornerr wrote:If I make my own format, then I'll be unable to use Blender for creating models. Or at least I'll have to write script (and I don't know Python AT ALL).

So which one can you advise me to use? And info?

Thanks.
Pick any of the gazillion existing formats... Less grey hairs for yourself, too :)

/Nathan

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

Post by joeri »

jesterKing wrote:Pick any of the gazillion existing formats... Less grey hairs for yourself, too :) /Nathan
I think the question is: which of the formats that blender exports includes the models data and textures uv-coordinates and textures name.

so, I made a cube, slapped a texture on one face, and made an export from them all. Here are the results:

Code: Select all

AC       Data, UV Coordinates, Texture Name  (ascii)
OBJ      Data, UV Coordinates, Texture Name  (ascii)
WRL      Data, UV Coordinates, Texture Name  (ascii)
X3D      Data, UV Coordinates, Texture Name  (ascii)
X        Data, UV Coordinates (ascii)
LWO      Data, UV Coordinates (bin)
WINGS    Data , UV? (bin)
NDO      Data (bin)
OFF      Data (ascii)
CAL      Data, UV, Texture all in a bunch of xrf and xmf files.
Last edited by joeri on Wed Nov 16, 2005 12:35 am, edited 3 times in total.

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

AC

Post by joeri »

AC wrote:AC3Db
MATERIAL "DefaultWhite" rgb 1 1 1 amb 1 1 1 emis 0 0 0 spec 0.5 0.5 0.5 shi 64 trans 0
MATERIAL "Material" rgb 0.756191 0.756191 0.756191 amb 0.5 0.5 0.5 emis 0 0 0 spec 1 1 1 shi 32 trans 0
OBJECT world
kids 1
OBJECT group
name "Cube"
kids 2
OBJECT poly
name "Cube_0"
data 4
Cube
crease 30
numvert 8
1 -1 -1
1 -1 1
-1 -1 1
-1 -1 -1
1 1 -0.999999
0.999999 1 1.000001
-1 1 1
-1 1 -1
numsurf 5
SURF 0x00
mat 1
refs 4
0 0.0 1.0
1 0.0 0.0
2 1.0 0.0
3 1.0 1.0
SURF 0x00
mat 1
refs 4
0 0.0 1.0
4 0.0 0.0
5 1.0 0.0
1 1.0 1.0
SURF 0x00
mat 1
refs 4
1 0.0 1.0
5 0.0 0.0
6 1.0 0.0
2 1.0 1.0
SURF 0x00
mat 1
refs 4
2 0.0 1.0
6 0.0 0.0
7 1.0 0.0
3 1.0 1.0
SURF 0x00
mat 1
refs 4
4 0.0 1.0
0 0.0 0.0
3 1.0 0.0
7 1.0 1.0
kids 0
OBJECT poly
name "Cube_1"
data 4
Cube
texture "/IMG_0585.jpg"
texrep 1 1
crease 30
numvert 4
1 1 -0.999999
0.999999 1 1.000001
-1 1 1
-1 1 -1
numsurf 1
SURF 0x00
mat 1
refs 4
0 0.0 1.0
3 0.0 0.0
2 1.0 0.0
1 1.0 1.0
kids 0
OBJ wrote:# Blender OBJ File: g:/10YEARS/2.Menu/source/cd.blend
# www.blender.org
mtllib test.mtl
o Cube_Cube
v 1.000000 1.000000 -1.000000
v 1.000000 -1.000000 -1.000000
v -1.000000 -1.000000 -1.000000
v -1.000000 1.000000 -1.000000
v 1.000000 0.999999 1.000000
v 0.999999 -1.000001 1.000000
v -1.000000 -1.000000 1.000000
v -1.000000 1.000000 1.000000
vt 0.000000 1.000000 0.0
vt 0.000000 0.000000 0.0
vt 1.000000 0.000000 0.0
vt 1.000000 1.000000 0.0
vt 0.000000 1.000000 0.0
vt 0.000000 0.000000 0.0
vt 1.000000 0.000000 0.0
vt 1.000000 1.000000 0.0
vt 0.000000 1.000000 0.0
vt 0.000000 0.000000 0.0
vt 1.000000 0.000000 0.0
vt 1.000000 1.000000 0.0
vt 0.000000 1.000000 0.0
vt 0.000000 0.000000 0.0
vt 1.000000 0.000000 0.0
vt 1.000000 1.000000 0.0
vt 0.000000 1.000000 0.0
vt 0.000000 0.000000 0.0
vt 1.000000 0.000000 0.0
vt 1.000000 1.000000 0.0
vt 0.000000 1.000000 0.0
vt 0.000000 0.000000 0.0
vt 1.000000 0.000000 0.0
vt 1.000000 1.000000 0.0
vn 0.577349 0.577349 -0.577349
vn 0.577349 -0.577349 -0.577349
vn -0.577349 -0.577349 -0.577349
vn -0.577349 0.577349 -0.577349
vn 0.577349 0.577349 0.577349
vn -0.577349 0.577349 0.577349
vn -0.577349 -0.577349 0.577349
vn 0.577349 -0.577349 0.577349
vn 0.577349 0.577349 -0.577349
vn 0.577349 0.577349 0.577349
vn 0.577349 -0.577349 0.577349
vn 0.577349 -0.577349 -0.577349
vn 0.577349 -0.577349 -0.577349
vn 0.577349 -0.577349 0.577349
vn -0.577349 -0.577349 0.577349
vn -0.577349 -0.577349 -0.577349
vn -0.577349 -0.577349 -0.577349
vn -0.577349 -0.577349 0.577349
vn -0.577349 0.577349 0.577349
vn -0.577349 0.577349 -0.577349
vn 0.577349 0.577349 0.577349
vn 0.577349 0.577349 -0.577349
vn -0.577349 0.577349 -0.577349
vn -0.577349 0.577349 0.577349
usemtl Material
f 1/1/1 2/2/2 3/3/3 4/4/4
usemap IMG_0585.jpg
f 5/5/5 8/6/6 7/7/7 6/8/8
usemap (null)
f 1/9/9 5/10/10 6/11/11 2/12/12
f 2/13/13 6/14/14 7/15/15 3/16/16
f 3/17/17 7/18/18 8/19/19 4/20/20
f 5/21/21 1/22/22 4/23/23 8/24/24
and a MTL file wrote: # Blender MTL File: g:/10YEARS/2.Menu/source/cd.blend
newmtl Material
Ns 96.0784313725
Kd 0.756191 0.756191 0.756191
Ka 1.000000 1.000000 1.000000
Ks 1.000000 1.000000 1.000000
d 1.000000
illum 2

WRL wrote: #VRML V2.0 utf8

# This file was authored with Blender (http://www.blender.org/)
# Blender version 237
# Blender file g:/10YEARS/2.Menu/source/cd.blend
# Exported using VRML97 exporter v1.50 (2005/06/03)


NavigationInfo {
headlight FALSE
visibilityLimit 100.0
type ["EXAMINE", "ANY"]
avatarSize [0.25, 1.75, 0.75]
}

Background {
groundColor 0.057 0.221 0.4
skyColor 0.057 0.221 0.4
}

DEF Cube Transform {
translation 0.0 0.0 0.0
children [
Shape {
appearance Appearance {
material DEF MA_Material Material {
diffuseColor 0.756 0.756 0.756
ambientIntensity 0.25
specularColor 0.478 0.478 0.478
emissiveColor 0.0 0.0 0.0
shininess 0.196
transparency 0.0
}
texture DEF IMG_0585_jpg ImageTexture {
url "IMG_0585.jpg"
}
}
geometry IndexedFaceSet {
solid TRUE
coord DEF coord_Cube Coordinate {
point [
1.0 -1.0 -1.0, 1.0 -1.0 1.0, -1.0 -1.0 1.0, -1.0 -1.0 -1.0, 1.0 1.0 -1.0, 1.0 1.0 1.0, -1.0 1.0 1.0, -1.0 1.0 -1.0,
]
}
coordIndex [
0 1 2 3 -1, 4 7 6 5 -1, 0 4 5 1 -1, 1 5 6 2 -1, 2 6 7 3 -1, 4 0 3 7 -1,
]
texCoord TextureCoordinate {
point [
0.0 1.0, 0.0 0.0, 1.0 0.0, 1.0 1.0, 0.0 1.0, 0.0 0.0, 1.0 0.0, 1.0 1.0, 0.0 1.0, 0.0 0.0, 1.0 0.0, 1.0 1.0, 0.0 1.0, 0.0 0.0, 1.0 0.0, 1.0 1.0, 0.0 1.0, 0.0 0.0, 1.0 0.0, 1.0 1.0, 0.0 1.0, 0.0 0.0, 1.0 0.0, 1.0 1.0,
]
}
texCoordIndex [
0, 1, 2, 3, -1, 4, 5, 6, 7, -1, 8, 9, 10, 11, -1, 12, 13, 14, 15, -1, 16, 17, 18, 19, -1, 20, 21, 22, 23, -1,
]
}
}
]
}
X3D wrote: <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "http://www.web3d.org/specifications/x3d-3.0.dtd">
<X3D version="3.0" profile="Immersive" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:noNamespaceSchemaLocation="http://www.web3d.org/specifications/x3d-3.0.xsd">
<head>
<meta name="filename" content="g:/10YEARS/2.Menu/source/cd.blend" />
<meta name="generator" content="Blender 237" />
<meta name="translator" content="X3D exporter v1.50 (2005/06/06)" />
</head>
<Scene>

<NavigationInfo headlight="FALSE" visibilityLimit="100.0" type="EXAMINE, ANY" avatarSize="0.25, 1.75, 0.75" />

<Background groundColor="0.057 0.221 0.4" skyColor="0.057 0.221 0.4" />

<Transform DEF="Cube" translation="0.0 0.0 0.0">
<Shape>
<Appearance>
<Material DEF="MA_Material" diffuseColor="0.756 0.756 0.756" specularColor="0.478 0.478 0.478" emissiveColor="0.0 0.0 0.0"
ambientIntensity="0.25" shininess="0.196" transparency="0.0" />
<ImageTexture DEF="IMG_0585_jpg" url="IMG_0585.jpg" />
</Appearance>
<IndexedFaceSet solid="true"
texCoordIndex="0, 1, 2, 3, -1, 4, 5, 6, 7, -1, 8, 9, 10, 11, -1, 12, 13, 14, 15, -1, 16, 17, 18, 19, -1, 20, 21, 22, 23, -1, "
coordIndex="0 1 2 3 -1, 4 7 6 5 -1, 0 4 5 1 -1, 1 5 6 2 -1, 2 6 7 3 -1, 4 0 3 7 -1, ">
<Coordinate DEF="coord_Cube"
point="1.0 -1.0 -1.0, 1.0 -1.0 1.0, -1.0 -1.0 1.0, -1.0 -1.0 -1.0, 1.0 1.0 -1.0, 1.0 1.0 1.0, -1.0 1.0 1.0, -1.0 1.0 -1.0, " />
<TextureCoordinate point="0.0 1.0, 0.0 0.0, 1.0 0.0, 1.0 1.0, 0.0 1.0, 0.0 0.0, 1.0 0.0, 1.0 1.0, 0.0 1.0, 0.0 0.0, 1.0 0.0, 1.0 1.0, 0.0 1.0, 0.0 0.0, 1.0 0.0, 1.0 1.0, 0.0 1.0, 0.0 0.0, 1.0 0.0, 1.0 1.0, 0.0 1.0, 0.0 0.0, 1.0 0.0, 1.0 1.0, " />
</IndexedFaceSet>
</Shape>
</Transform>


</Scene>
</X3D>

Post Reply