What OpenCTM is (and what it's not)
OpenCTM is primarily a file format for storing 3D triangle meshes in a compact yet versatile format. In order to make it easy for software developers and 3D designers to support the format, an easy to use software library is provided that can read and write OpenCTM format files.
It is important to understand that OpenCTM is only concerned with managing triangle mesh data. In other words, OpenCTM is not a scene description format. For instance, OpenCTM does not handle multiple meshes, transformation matrices, materials, light sources, physical properties, etc.
While most 3D file formats with scene description capabilites tend to be quite application or technology specific, OpenCTM is suitable for almost any application. Any online e-shopping system, game engine, medical application or phone widget is free to tailor a scene or model description format of their own, and use OpenCTM as the 3D data carrier format. A typical scene file format could be a ZIP archive containing an XML file for the application specific scene and material descriptions, along with several OpenCTM files for the geometry data and JPEG files for the textures.
Features
File format
The file format has the following features:
- Open, documented and future proof.
- Supports storage of per-vertex normals, UV coordinates and custom vertex attributes.
- Can store very large geometries (billions of triangles and vertices).
- Very compact storage of 3D triangle geometries, using efficient entropy-reduction techniques, combined with state of the art entropy coding (LZMA). An STL file can usually be compressed to 5-6% of its original size.
- Lossless compression with user controllable precision:
- True lossless compression (IEEE 754 32-bit floating point) for situations where you need 1:1 representation of your data.
- Fixed point representation with user controllable accuracy when you want excellent compression ratios.
Software library
The software library has the following features:
- Open source, with a very liberal license (zlib/libpng license).
- Easy to use, well documented, clean API (similar to the OpenGL API).
- Written in C, and easy to interface from other languages.
- Highly portable. It has been tested on Windows, Mac OS X, Linux (32-bit and 64-bit) and OpenSolaris, using several different compilers.
- Very fast loading of compressed files (AMD X2 64, 2.5 GHz, Linux 64 bit):
- 24 ms for a model consisting of 69 K polygons (Stanford bunny).
- 0.58 s for a model consisting of 1.4 M polygons (male03).
- Very lightweight:
- No external dependencies.
- The compiled shared library is less than 100 KB on all tested platforms.
Tools
The included 3D file converter (ctmconv) has the following features:
- Supports the following file formats (both read and write):
- OpenCTM (.ctm)
- COLLADA 1.4/1.5 (.dae)
- Stereolithography (.stl)
- Stanford triangle format (.ply)
- 3D Studio (.3ds)
- Wavefront geometry (.obj)
- Provides full control of the OpenCTM compression parameters.
- Can scale and transform the converted mesh.
- Highly portable (works on Windows, Mac OS X, Linux, OpenSolaris, etc).
The included 3D file viewer (ctmviewer) has the following features:
- Supports all the file formats that the converter tool supports.
- OpenGL accelerated interactive 3D view:
- GLSL based phong shading
- Texturing
- Vertex colors
- Rapid loading - perfect for previewing 3D files.
- Highly portable (works on Windows, Mac OS X, Linux, OpenSolaris, etc).
Documentation
The following documentation is available:
- OpenCTM Developers Manual.
- OpenCTM API Reference.
- OpenCTM Format Specification (work in progress).
