OpenCTM
Encyclopedia
OpenCTM is a 3D geometry technology for storing triangle-based
meshes in a compact format.
es. The technology is divided into three different parts:
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.
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).
, 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
).
differentiation operations, followed by lossless entropy coding using the
LZMA
compression library.
meshes in a compact format.
Overview
OpenCTM is an open source project that has evolved around a technology for compressing 3D triangle meshTriangle mesh
A triangle mesh is a type of polygon mesh in computer graphics. It comprises a set of triangles that are connected by their common edges or corners....
es. The technology is divided into three different parts:
- An open, binaryBinary fileA binary file is a computer file which may contain any type of data, encoded in binary form for computer storage and processing purposes; for example, computer document files containing formatted text...
file format. - An open sourceOpen sourceThe term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...
software library for reading and writing OpenCTM files. - A software tool set for converting and viewing OpenCTM files.
The triangle mesh data structure that OpenCTM uses is directly compatible with high performance graphics rendering pipelines, such as OpenGL
OpenGL
OpenGL is a standard specification defining a cross-language, cross-platform API for writing applications that produce 2D and 3D computer graphics. The interface consists of over 250 different function calls which can be used to draw complex three-dimensional scenes from simple primitives. OpenGL...
, which makes is suitable for interactive computer graphics applications. Other application types, such as CAD
Computer-aided design
Computer-aided design , also known as computer-aided design and drafting , is the use of computer technology for the process of design and design-documentation. Computer Aided Drafting describes the process of drafting with a computer...
/CAM
Computer-aided manufacturing
Computer-aided manufacturing is the use of computer software to control machine tools and related machinery in the manufacturing of workpieces. This is not the only definition for CAM, but it is the most common; CAM may also refer to the use of a computer to assist in all operations of a...
tools, usually need to convert the mesh data into a custom mesh format for more efficient data handling.
OpenCTM uses a triangle index array to represent the triangle connectivity information, and several arrays for representing vertex
Vertex (geometry)
In geometry, a vertex is a special kind of point that describes the corners or intersections of geometric shapes.-Of an angle:...
data (vertex coordinates, normals
Surface normal
A surface normal, or simply normal, to a flat surface is a vector that is perpendicular to that surface. A normal to a non-flat surface at a point P on the surface is a vector perpendicular to the tangent plane to that surface at P. The word "normal" is also used as an adjective: a line normal to a...
, UV coordinates
UV mapping
UV mapping is the 3D modeling process of making a 2D image representation of a 3D model.-UV mapping:This process projects a texture map onto a 3D object...
and custom vertex attributes).
File format
The file format, which is binaryBinary file
A binary file is a computer file which may contain any type of data, encoded in binary form for computer storage and processing purposes; for example, computer document files containing formatted text...
, uses 32-bit little endian
Endianness
In computing, the term endian or endianness refers to the ordering of individually addressable sub-components within the representation of a larger data item as stored in external memory . Each sub-component in the representation has a unique degree of significance, like the place value of digits...
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
FourCC
A FourCC is a sequence of four bytes used to uniquely identify data formats.The concept originated in the OSType scheme used in the Macintosh system software and was adopted for the Amiga/Electronic Arts Interchange File Format and derivatives...
, 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
STL (file format)
STL is a file format native to the stereolithography CAD software created by 3D Systems. This file format is supported by many other software packages; it is widely used for rapid prototyping and computer-aided manufacturing. STL files describe only the surface geometry of a three dimensional...
and PLY
PLY (file format)
PLY is a computer file format known as the Polygon File Format or the Stanford Triangle Format.The format was principally designed to store three dimensional data from 3D scanners. It supports a relatively simple description of a single object as a list of nominally flat polygons...
).
Compression
The compression is based on lossless entropy reduction, by means of variousdifferentiation operations, followed by lossless entropy coding using the
LZMA
LZMA
The Lempel–Ziv–Markov chain algorithm is an algorithm used to perform data compression. It has been under development since 1998 and was first used in the 7z format of the 7-Zip archiver...
compression library.