Milkshape-ASCII output-explanation ?
Hi
I'm sort getting the hang of Milkshape.
I want to use it in opengl - so I want to understand the Ascii export output, I've checked the help pages and faqs of Milkshape and can't find an explanation !
Is there a web site explaining this ?
It almost seems to be ok until you realise there are 7 numbers per line - hence doesn't look like vertices !
eg Here's my export:
=====================
Frames: 30
Frame: 1
Meshes: 3
"Left" 0 0
119
0 0.000000 -50.000000 -25.000000 0.000000 0.000000 -1
0 0.000000 -56.500000 -27.500000 0.000000 0.000000 -1
0 -8.000000 -50.500000 -23.000000 0.000000 0.000000 -1
0 0.000000 -52.000000 -18.000000 0.000000 0.000000 -1
....
....
<etc>
60
0.710135 0.676975 0.193422
0.000000 0.000000 0.000000
0.008585 0.961489 0.274711
-1.000000 0.000000 0.000000
-0.934347 -0.122690 -0.334578
-0.985001 -0.078736 -0.153535
..
..
===============
It's easy.
For your vertices, you have an X, Y, Z position component along with a S, T texture co-ordinate component - there's additional MS bone and flag data (first and last figure), which you can ignore. The boneID is useful for character animation, so if you're using animations, you'll need this value. Flag is MS3D specific.
So your format is:
Meshes: [count]
"Name", flag, flag
VertexCount
Flag, X, Y, X, S, T, BoneID
... and so on.
[Edited by - evolutional on July 12, 2004 6:39:57 AM]
For your vertices, you have an X, Y, Z position component along with a S, T texture co-ordinate component - there's additional MS bone and flag data (first and last figure), which you can ignore. The boneID is useful for character animation, so if you're using animations, you'll need this value. Flag is MS3D specific.
So your format is:
Meshes: [count]
"Name", flag, flag
VertexCount
Flag, X, Y, X, S, T, BoneID
... and so on.
[Edited by - evolutional on July 12, 2004 6:39:57 AM]
thanks, so that's x, y, z, s, t
Then after that there's two more sections -
do you know what they mean ?
thanks again,
==============
60
0.710135 0.676975 0.193422
0.000000 0.000000 0.000000
0.008585 0.961489 0.274711
...
===============
and then this one:
===============
238
0 0 0 1 0 0 1 1
0 0 2 3 0 2 2 1
0 0 0 1 0 0 1 1
0 0 0 1 0 0 1 1
...
==============
Then after that there's two more sections -
do you know what they mean ?
thanks again,
==============
60
0.710135 0.676975 0.193422
0.000000 0.000000 0.000000
0.008585 0.961489 0.274711
...
===============
and then this one:
===============
238
0 0 0 1 0 0 1 1
0 0 2 3 0 2 2 1
0 0 0 1 0 0 1 1
0 0 0 1 0 0 1 1
...
==============
The first section is the normals of the vertices in triangles...
NormalCount
X, Y, Z
And then the next section:
TriangleCount
Flags, vertex index 1, vindex 2, vindex 3, normal index 1, nindex 2, nindex 3, smoothing group.
Then after that is animation data.
I recommend you download the Milkshape 3D SDK and take a look at the source code for the ASCII importers/exporter plugins.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement