DTS format question
by Danny Goss · in Torque Game Engine · 06/17/2005 (11:41 am) · 3 replies
I am attempting a DTS conversion program and I have been studing the DTS format for quite a while now. I have been reading through ms2DTS, DTSSDK, DTSSDKPlus, and the tsShape code and I keep getting confused about the relationship between some of the vector list. This question is specificly about the mesh.
In a mesh, can a vertex in the vertex list have more than one texture coordinate? Looking at the milkshape export it looks like each vertex can only have one tex coordinate. If you can have more than one tex coord, then how are the verts, tverts, normals, enormals, primitives, indices, mindices vindex, vbone, vweight, nodeIndex vectors used in relation to one another? Most of them look like parallel list.
The reason I am confused is because there is a vertices list called verts and a texture coordinate list called tverts. There is an index list into the vertices list and there is not one for the tverts list so I am assuming that the same index will be used which means there can only be one texture coordinate per vertex. However, can a vertex not have more than one texture coordinate in a 3D model?
Thanks for any help.
Danny
In a mesh, can a vertex in the vertex list have more than one texture coordinate? Looking at the milkshape export it looks like each vertex can only have one tex coordinate. If you can have more than one tex coord, then how are the verts, tverts, normals, enormals, primitives, indices, mindices vindex, vbone, vweight, nodeIndex vectors used in relation to one another? Most of them look like parallel list.
The reason I am confused is because there is a vertices list called verts and a texture coordinate list called tverts. There is an index list into the vertices list and there is not one for the tverts list so I am assuming that the same index will be used which means there can only be one texture coordinate per vertex. However, can a vertex not have more than one texture coordinate in a 3D model?
Thanks for any help.
Danny
#2
Here is how I thought primitives and indices were stored in the file.
Number of primitives (32 bit number)
first index (16 bit number)
Num of indices (16 bit number)
type (32 but number) For each primitive
Number of indices (32 bit number)
index (16 bit number) For each index
but what is created from the milkshape exporter is something more like this
Number of primitives (32 but number)
type (32 bit number) For each primitive
Number of indices (32 bit number)
4 bytes I don't know (32 bit number???)
4 bytes I don't know (32 bit number???? -> this is the one that prevent my mesh from being rendered
4 more 32 but numbers I don't know what they are
several 16 bit number????????????
I don't know what going on. It's late - I'm going to bed
Good night.
Danny
07/16/2005 (11:17 pm)
I have found what is causing the mesh not to render but I don't know what it is. There is one byte that I can change the value to 20 and the shape will render. I am having trouble finding out what that byte is though. In the file I have found where the indices size is written. It is a 32 bit number. The next 4 bytes are all value 0. The next byte in the file I created was value 0, but in the file created byte the Milkshape exporter the byte is value 20. If I change this byte, the mesh will render. Looking at this byte's position in the file in a hex editor, I would say that it is a 32 bit number, but I have not been able to figure out what it is. I thought that after the number of indices, there were suppose to be the indices (16 bit numbers), but that does not appear to be the case.Here is how I thought primitives and indices were stored in the file.
Number of primitives (32 bit number)
first index (16 bit number)
Num of indices (16 bit number)
type (32 but number) For each primitive
Number of indices (32 bit number)
index (16 bit number) For each index
but what is created from the milkshape exporter is something more like this
Number of primitives (32 but number)
type (32 bit number) For each primitive
Number of indices (32 bit number)
4 bytes I don't know (32 bit number???)
4 bytes I don't know (32 bit number???? -> this is the one that prevent my mesh from being rendered
4 more 32 but numbers I don't know what they are
several 16 bit number????????????
I don't know what going on. It's late - I'm going to bed
Good night.
Danny
#3
Maybe your answer is there.
I hope that helps.
01/16/2009 (5:57 pm)
http://www.garagegames.com/community/forums/viewthread/48429Maybe your answer is there.
I hope that helps.
Torque Owner Danny Goss
Thanks for any help
Danny