Introduction
OFF is a very simple text format for polygon meshes, best known from Geomview, a 3D viewer from the Geometry Center at the University of Minnesota. It lists the vertices, then the faces as lists of vertex numbers, and little else.
Its simplicity made it popular in geometry research. Shape collections used to test 3D search and recognition, such as the Princeton Shape Benchmark and ModelNet, are distributed as OFF files.
Structure
The first line is the keyword OFF. Prefixes add optional data to each
vertex: COFF adds a colour, NOFF a normal and
STOFF texture coordinates. The next line gives three counts: vertices,
faces and edges. The edge count is usually 0 and ignored by readers.
Then come the vertices, one per line as x y z, and the faces, one per
line as the number of corners followed by that many vertex numbers, counted from 0.
A face line may end with a colour. Lines starting with # are
comments.
OFF
# a square pyramid
5 5 0
0 0 0
1 0 0
1 1 0
0 1 0
0.5 0.5 1
4 3 2 1 0
3 0 1 4
3 1 2 4
3 2 3 4
3 3 0 4
Links
Software
- MeshLab (Windows, macOS, Linux)
- CloudCompare (Windows, macOS, Linux)
- Geomview (Linux and other Unix systems)
Developers
Reference
- OFF files, Geomview manual