DDA - ascii 3D object file format

Previous topic - Next topic

Kitty Hello

Code (glbasic) Select

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


Hemlos

Bing ChatGpt is pretty smart :O

Schranz0r

#2
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  ;)
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

Hemlos

#3
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.
Bing ChatGpt is pretty smart :O

Hemlos

#4
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]
Bing ChatGpt is pretty smart :O

Kitty Hello

If you need more normals per vertex, just add a new vertex with the same x,y,z position and different nx,ny,nz directions.

Hemlos

Unfortunetly i found with more testing, the texture coordinates get messed up in larger objects.....this plugin i wrote doesnt work properly.
Also, anim8or will not do multiple objects for keyframes, so exporting.3ds will have to do for now.
Bing ChatGpt is pretty smart :O