OpenCTM
OpenCTM is a highly compressed file format for storing 3D meshes. OpenCTM is the Open Compressed Triangle Mesh file format. It is a file format, a software library and a tool set for compression of 3D triangle meshes. The geometry is compressed to a fraction of comparable file formats (3DS, STL, VRML, COLLADA...), and the format is easily accessible through a simple, portable API.
The triangle mesh data structure that OpenCTM uses is directly compatible with high performance graphics rendering pipelines, such as OpenGL, which makes is suitable for interactive computer graphics applications. Other application types, such as CAD/CAM tools, usually need to convert the mesh data into a custom mesh format for more efficient data handling.
Contents |
Specification
File format
OpenCTM uses a triangle index array to represent the triangle connectivity information, and several arrays for representing vertex data (vertex coordinates, normals, UV coordinates and custom vertex attributes).
The file format, which is binary, uses 32-bit little endian format for all integer fields, and 32-bit binary IEEE 754 format for all floating point fields (also little endian).
The file begins with a special integer identifier, 0x4D54434F, which, if interpreted as four ASCII characters, forms the string “OCTMâ€. Following the identifier is an integer value that specifies the file format version (the latest official file format version is 5).
The rest of the file, which is described in the file format specification, contains the triangle mesh information. This includes a compressed triangle index array and compressed vertex arrays (one array for each vertex attribute).
Due to the many steps of data processing that are required for implementing the compression, interacting with the file format directly is usually more complex than interacting with other, uncompressed triangle mesh file formats (for instance STL and PLY).
Software
Libraries
- C++: OpenCTM Toolkit
- JS: js-openctm