Binary *.DDD format. Need Guideline.

Previous topic - Next topic

VlasovAlexey

Hi,
I've a question about the binary *.DDD format. Having looked through ac3d-ddd-plugin SRC, I realized that normals are indexed using tables from MeshObject.cpp gAvertexnormals()

I want to add support for binary export to GL Basic Tools for 3Ds Max. I'm not a pro at C++ so I need some kind of a manual, something like this:

filetype  (int) 4 bytes
version   (double) 8 bytes
numAnimations (int) 4 bytes (number of animated frames?)
numColors    (int) 4 bytes (are these colors for each triangle?)
numTextures  (int) 4 bytes (number of UV vertexes?)

//Triangles Color

T1 ..(unsigned long)(4 bytes)( How do you describe a color with 4 bytes? RGBA(one channel – one byte) or some other way?)
T2 ..(unsigned long)(4 bytes)
...
xxx ..(unsigned long)(4 bytes)

// Texture UV Coordinates

m_Texture[0]. (float) 4 bytes to X Mapping  Coordinate.
m_Texture[1]. (float) 4 bytes to Y Mapping  Coordinate.
.....
The total number of lines is the same as it is in numTextures.

Then I couldn't work out the sequence in which I needed to save indexes for normals, triangles, animated frames and vertex coordinates. I need a detailed guide, like the one above.

Thanks for any help...

Kitty Hello

The ddd file format is closed source. Should I open that?
It's pretty complicated to write because of the indexed normals.

bigsofty

I would be interested in this too!  =D
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

VlasovAlexey

Quote from: Kitty Hello on 2011-May-16
The ddd file format is closed source. Should I open that?
Yes :enc:

Quote from: Kitty Hello on 2011-May-16
It's pretty complicated to write because of the indexed normals.

No problem.