I'd like to speak with someone who knows the DTS format well
by Leadwerks · in Torque Game Engine · 11/09/2005 (4:51 pm) · 4 replies
I am writing the .dts loader plugin for 3D World Studio. Going by the German docs, and some guesswork, I can now load mesh files up to the primitives. After that, the format stops making sense to me. If anyone has a good knowledge of the format, and is willing to help, please
contact me at josh at leadwerks dot com , and I will send you my MSN screen name.
Thanks.
contact me at josh at leadwerks dot com , and I will send you my MSN screen name.
Thanks.
#2
11/09/2005 (6:30 pm)
Does it include docs on the format?
#3
11/09/2005 (6:39 pm)
No but it includes the source code to read and write .dts's which can be used as a "doc". It also includes the dtsSDK (and dtsSDK+) libraries which were designed to allow 3rd party tools to interface more cleanly with .dts.
#4
What the data for each primitive actually looks like, when I write it to a log, is the following bytes (for 2 primitives):
0 0 0 112 0 0 0 112
0 0 0 112 0 0 0 112
The data is always mostly identical bytes for each primitive, though the "112" byte value changes. I don't know what is going on, but up until the primitives, everything is fine, and then all of a sudden the data is totally unrecognizable to me.
11/09/2005 (6:56 pm)
The problem I am having right now is in the meshes chunk. I got up to the point where I can find the number of primitives, and that is correct, but the data following that seems wrong:For n=1 To numMeshes meshtype=ReadInt(f) unknown=ReadInt(f) numFrames=ReadInt(f) matFrames=ReadInt(f) parent=ReadInt(f) minx#=ReadFloat(f) miny#=ReadFloat(f) minz#=ReadFloat(f) maxx#=ReadFloat(f) maxy#=ReadFloat(f) maxz#=ReadFloat(f) x#=ReadFloat(f) y#=ReadFloat(f) z#=ReadFloat(f) radius#=ReadFloat(f) numVerts=ReadInt(f) For v=1 To numVerts x#=ReadFloat(f) y#=ReadFloat(f) z#=ReadFloat(f) Next numTVerts=ReadInt(f) If numtverts<>numverts RuntimeError "numVerts<>numTVerts" For v=1 To numTVerts tu#=ReadFloat(f) tv#=ReadFloat(f) Next For v=1 To numVerts nx#=ReadFloat(f) ny#=ReadFloat(f) nz#=ReadFloat(f) Next numPrimitives=ReadInt(f) For p=1 To numPrimitives // Everything is right up to this point firstElement=ReadShort(f) numElements=ReadShort(f) primitivetype=ReadInt(f) Next
What the data for each primitive actually looks like, when I write it to a log, is the following bytes (for 2 primitives):
0 0 0 112 0 0 0 112
0 0 0 112 0 0 0 112
The data is always mostly identical bytes for each primitive, though the "112" byte value changes. I don't know what is going on, but up until the primitives, everything is fine, and then all of a sudden the data is totally unrecognizable to me.
Torque 3D Owner Michael Cozzolino
Big Monk Games