Codesnippets > 3D-snippets

DDA - ascii 3D object file format

(1/2) > >>

Kitty Hello:

--- Code: (glbasic) ---DDDA 1.1 # DDDA version_number
# file must start with "DDDA"

# texture coordinates
4            # texture coordinates count
0.000 0.000  # uv of vertex 0
0.000 0.000  # uv of vertex 1
0.000 0.000  # uv 2
0.000 0.000  # uv 3

# faces
2            # number of faces
255 255 255  # material color for face 1 (R G B)
3  0 0 3 0 2 0# number_of_nodes (3=triangle) n1 t1 n2 t2 ni ti ... (n=position index, t=texture index)
255 255 255  # RGB for face 2
3  0 2 1     # n.o.n. n1 t1 n2 t2 ...

# animation frames
2            # number of keyframes for this model
4            # nof_vertices_for_keyframe 1
0.0 1.8  0.6   0 1 0 # x1 y1 z1 nx ny nz ( 3 position, 3 normal )
2.0 1.5  0.9   0 1 0 # x2 y2 z2 nx ny nz
1.9 0.1 -0.2   0 1 0
0.0 0.1 -0.3   0 1 0
4            # nof_vertices_for_keyframe 2
0.0 1.9 0.0   0 1 0
2.0 1.9 0.0   0 0 1
1.9 0.0 0.1   0 0 1
0.0 0.0 0.0   0 1 0

--- End code ---

Hemlos:
Thanks  :nw:

Schranz0r:
whats about the textures?
the loader load it by itself?
Multitextures / More then 1 texture per object?


hmm... another keyframe format...  :x
Bones would be better  ;)

Hemlos:
Gernot,

I am testing anim9or export feature...
It has alot of outputs to sort out...

And a simple cube with 6 faces, 8 points, and 8 texture coordinates, has 30 normals....
This is a problem because your dda format has only one xyz for a normal on each point:

# animation frames
2            # number of keyframes for this model
4            # nof_vertices_for_keyframe 1
0.0 1.8  0.6   0 1 0 # x1 y1 z1 nx ny nz ( 3 position, 3 normal )
2.0 1.5  0.9   0 1 0 # x2 y2 z2 nx ny nz
1.9 0.1 -0.2   0 1 0
0.0 0.1 -0.3   0 1 0

This is where im at...im almost done and stuck here,
 because i dont know how to determine which normals i need to export.

Hemlos:
I finished the first object export plugin, for anim8or v0.97d.
It only makes one frame.
Screenshot is the converted object, loaded in the 3d object analyzer...looks like the normals are correct.
I will try to do the multiple keyframes another time.


Put the plugin script with anim8or.exe /SCRIPTS subdirectory,
 and set the configuration in anim8or to point to the proper SCRIPT directory.
Anim8or will open a debug console when a plugin is loaded, this is normal.




[attachment deleted by admin]

Navigation

[0] Message Index

[#] Next page

Go to full version