3DN

From Carnivores Wiki
Jump to: navigation, search

3DN is a slightly simplified version of the 3DF and CAR file formats from the Action Forms-developed Carnivores games, used in Carnivores: Dinosaur Hunter. Specifically, the 3DN files swap the order of faces and vertices, so that vertices are stored first, and the files store only the model; the texture, animations, and sounds are stored elsewhere. These files are located in \models.

Format[edit | edit source]

// for each vertex (16 bytes)
float
4
X coordinate
float
4
Y coordinate
float
4
Z coordinate
uint16
2
owner
bone to which vertex is attached
uint16
2
hide
whether the vertex is hidden in Designer 2; has no effect in-game
// for each face (64 bytes)
uint32
4
v1
vertex 1
uint32
4
v2
vertex 2
uint32
4
v3
vertex 3
uint16
2
tax
v1 texture U coordinate
uint16
2
tbx
v2 texture U coordinate
uint16
2
tcx
v3 texture U coordinate
uint16
2
tay
v1 texture V coordinate
uint16
2
tby
v2 texture V coordinate
uint16
2
tcy
v3 texture V coordinate
uint16
2
flags
always null?
uint16
2
DMask
appears to be unused by the games, possibly editor/tool-specific
uint32
4
Distant
purpose unknown
uint32
4
group
appears to be unused by the games, possibly editor/tool-specific
byte
12
reserv
0x00
unused; reserved for future use
// for each bone (48 bytes)
byte
32
name
float
4
X coordinate
float
4
Y coordinate
float
4
Z coordinate
int16
2
index to the parent bone, -1 if there is no parent
uint16
2
whether the bone is hidden in Designer 2; has no effect in-game