CAR Format (Carnivores)

From ModdingWiki
Jump to navigation Jump to search
CAR Format (Carnivores)
Format type3D Model
Model typePolygon
Maximum number of polygons400
Maximum number of vertices938
Games

The CAR Format (Carnivores) is used by Carnivores, Carnivores 2, and Carnivores Ice Age as 3D model files for the animals and hunter, weapons, dropship, and wind indicator, and are located in the \HUNTDAT folder (in Carnivores 2 and Ice Age, the weapon CAR files are instead located in \HUNTDAT\WEAPONS). The 3DF Format is a simplified version of this format.

"CAR" may be short for "character"; note that it is not short for Carnivores, since the extension was used for a similar (though presumably slightly simpler) CAR Format (Chasm: The Rift), several years before development on Carnivores would have begun.

Header definition

Header for CAR Format (Carnivores) 3D Model uses 52 bytes

Offset Type Description
0x0000 char[24] Name
0x0018 char[8] msc "msc: 0"
0x0020 INT32LE Number of animations
0x0024 INT32LE Number of sounds
0x0028 INT32LE Number of vertices
0x002B INT32LE Number of faces
0x0030 INT32LE Size of Texture in bytes

Vertex definition

Each vertex in the array uses 16 bytes.

Relative position Type Description
0x00 Single X coordinate
0x04 Single Y coordinate
0x08 Single Z coordinate
0x0C UINT16LE bone vertex owner
0x0E UINT16LE hide the vertex

Sound definition

Relative position Type Description
0x00 char[32] Name
0x20 UINT32LE Sound length in bytes
0x24 BYTE[len] PCM sound data in 16-bit mono 22khz

Polygon definition

This format uses triangles. Each polygon uses 64 bytes.

Relative position Type Description
0x00 INT32LE Index of first vertex
0x04 INT32LE Index of second vertex
0x08 INT32LE Index of third vertex
0x0C INT32LE U coordinate of first vertex * 256.0
0x10 INT32LE U coordinate of second vertex * 256.0
0x14 INT32LE U coordinate of third vertex * 256.0
0x18 INT32LE V coordinate of second vertex * 256.0
0x1C INT32LE V coordinate of first vertex * 256.0
0x20 INT32LE V coordinate of third vertex * 256.0
0x24 BYTE Flags0
  • bit 0: double sided
  • bit 1: dark back side
  • bit 2: Transparent poly
  • bit 3: Non-solid poly
  • bit 4: mortal weak target zone
  • bit 5: phong mapped
  • bit 6: environment mapped
  • bit 7: need VC
0x25 BYTE Flags1
  • bit 0-6: unused
  • bit 7: marks face as having a dark front side
0x26 UINT16LE DMask
0x28 INT32LE Distant
0x2C INT32LE Next
0x30 INT32LE Group
0x34 INT32LE Unknown2
0x38 INT32LE Unknown3
0x3C INT32LE Unknown4

File

Relative position Type Description
0x00 Header Header
0x34 POLYGON[face_count] Array of polygons
VERTEX[vertex_count] Array of vertices
BYTE[texture_size] Texture in 16-bit TGA-Style encoding BGR5551 always 256 pixels
ANIM[anim_count] Array of animations
SOUND[sound_count] Array of sounds
INT32LE Array of sound index (-1 for none)

https://carnivores.fandom.com/wiki/CAR

https://github.com/carnivores-cpe/Carnivores-CPE/

https://github.com/carnivores-cpe/c3dit

https://www.tapatalk.com/groups/the_carnivores_saga/carnivores-1-2-and-ice-age-car-files-t2309.html