C3D Binary File Format

From Drifter
Jump to: navigation, search

There are currently two versions of binary C3D model files, C3DV1.0 and C3DV1.1.

C3D V1.0

Header - 8 bytes - string - "C3DV1.0\0"
Number of vertices - 4 bytes - int
Number of faces - 4 bytes - int
Repeat for number of vertices

Vertex X - 4 bytes - float
Vertex Y - 4 bytes - float
Vertex Z - 4 bytes - float

Repeat for number of faces

Face vertex 1 - 4 bytes - int
Face vertex 2 - 4 bytes - int
Face vertex 3 - 4 bytes - int
Face normal 1 - 4 bytes - float
Face normal 2 - 4 bytes - float
Face normal 3 - 4 bytes - float
Face texture U - 4 bytes - float
Face texture V - 4 bytes - float

C3D V1.1

Header - 8 bytes - string - "C3DV1.1\0"
Number of vertices - 4 bytes - int
Number of faces - 4 bytes - int
Number of UV maps - 4 bytes - int
Repeat for number of vertices

Vertex X - 4 bytes - float
Vertex Y - 4 bytes - float
Vertex Z - 4 bytes - float

Repeat for number of faces

Face vertex 1 - 4 bytes - int
Face vertex 2 - 4 bytes - int
Face vertex 3 - 4 bytes - int
Face normal 1 - 4 bytes - float
Face normal 2 - 4 bytes - float
Face normal 3 - 4 bytes - float
Repeat for number of UV maps
Face texture U - 4 bytes - float
Face texture V - 4 bytes - float
Personal tools
Namespaces

Variants
Actions