The IDTA or model data contained within a POLYMODEL
structure totally represents the actual model of an object in Descent. The IDTA structures
are present in *.POF files (Descent 1 Full Version V1.0), *.PIG files (Descent 1 Full Version V1.4+),
*.HAM/*.HXM files (Descent 2 Full Version) and *.POL files (Descent Manager HAXMEDIT element files).
The format is similar to Descent 3's and FreeSpace 1-2's IDTA information.
This document is a compilation of info discovered by myself
(Mike Menefee), Peer Somerlund, Garry Knudson, and Bryan Aamot.
*.POF specs - Descent 1 3D model data files with this IDTA data embedded
*.HAM/*.HXM specs - Descent 2 3D model data files with this IDTA data embedded
HMEL specs (*.POL) - Descent Manager HAXMEDIT 3D model data files with this IDTA data embedded
IDTA specs - FreeSpace 1/2 IDTA specs
OOF specs - Descent 3 IDTA specs
eMail author: Mike Menefee
The first byte defines the block now following (0-5, see below). After a block
the following byte defines the data of the next block, etc.
-
0 - EOF - Means end of tree reached
-
1 - DEFPOINTS - Defines the vertices
+ 0 short id = 1
+ 2 short n_Points
+ 4 VMS_VECTOR points[n_Points]
|
-
2 - FLATPOLY - Flat (non-textured) polygon
+ 0 short id = 2
+ 2 short n_Points
+ 4 VMS_VECTOR vmsVector
+16 VMS_VECTOR vmsNormal
+28 short colorMap
+30 short ptldx[n_Points]
+.. if (!n_Points & 1)
short pad //Present only if n_Points is even
|
-
3 - TMAPPOLY - Textured polygons
+ 0 short id = 3
+ 2 short n_Points
+ 4 VMS_VECTOR vmsVector
+16 VMS_VECTOR vmsNormal
+28 short texture
+30 short ptldx[n_Points]
+.. if (!n_Points & 1)
short pad //Present only if n_Points is even
+.. UVL_VECTOR uvlVector[n_Points] //Controls Texture Mapping
}
|
-
4 - SORTNORM - Sortnorms are planes that split the model recursively
+ 0 short id = 4
+ 0 short id = 3
+ 2 short n_Points
+ 4 VMS_VECTOR vmsVector
+16 VMS_VECTOR vmsNormal
+28 short zFront
+30 short zBack
|
-
5 - RODBM - Never used.
+ 0 short id = 5
+ 2 short bmpNum
+ 4 VMS_VECTOR vmsTopPoint
+16 int BotWidth
+20 VMS_VECTOR vmsBottomPoint
+32 int TopWidth
|
-
6 - SUBCALL - Calls a subobject.
+ 0 short id = 6
+ 2 short sobjNum
+ 4 VMS_VECTOR vmsStartPoint
+16 short offset
+18 int pad
|
-
7 - DEFP_START - Just a list of all points of the model with subobject assignment.
+ 0 short id = 7
+ 2 short n_Points
+ 4 short formerPts //=0 in main model, !=0 in submodels
+ 6 short pad
+ 8 VMS_VECTOR vmsPts[n_Points]
|
-
8 - GLOW - Present only in player ship, always precedes polygon object.
+ 0 short id = 8
+ 2 short glowVal
|
Note: The "color map" data type is an unsigned16 bit
integer that represents a 5 bit, 256 color scheme. So, to get it out, you have to use a
six bit mask, like this:
red = ((ColorValue >> 10)&0x3f) * 4;
green = ((ColorValue >> 5)&0x3f) * 4;
blue = (ColorValue &0x3f) * 4;
|