HOME

TheInfoList



OR:

OFF (Object File Format) is a
geometry Geometry (; ) is, with arithmetic, one of the oldest branches of mathematics. It is concerned with properties of space such as the distance, shape, size, and relative position of figures. A mathematician who works in the field of geometry is c ...
definition
file format A file format is a standard way that information is encoded for storage in a computer file. It specifies how bits are used to encode information in a digital storage medium. File formats may be either proprietary or free. Some file formats ...
containing the description of the composing
polygons In geometry, a polygon () is a plane figure that is described by a finite number of straight line segments connected to form a closed ''polygonal chain'' (or ''polygonal circuit''). The bounded plane region, the bounding circuit, or the two to ...
of a geometric object. It can store 2D or 3D objects, and simple extensions allow it to represent higher-dimensional objects as well. Though originally developed for Geomview, a geometry visualization software, other software has adapted the simple standard.


Composition

The composition of a standard OFF file is as follows: * First line (optional): the letters OFF to mark the file type. *Second line: the number of vertices, number of faces, and number of edges, in order (the latter can be ignored by writing 0 instead). * List of vertices: X, Y and Z coordinates. * List of faces: number of vertices, followed by the indexes of the composing vertices, in order (indexed from zero). **Optionally, the
RGB The RGB color model is an additive color model in which the red, green and blue primary colors of light are added together in various ways to reproduce a broad array of colors. The name of the model comes from the initials of the three addi ...
values for the face color can follow the elements of the faces. The
four-dimensional A four-dimensional space (4D) is a mathematical extension of the concept of three-dimensional or 3D space. Three-dimensional space is the simplest possible abstraction of the observation that one only needs three numbers, called ''dimensions'', ...
OFF format, most notably used by Stella4D, which allows visualization of four-dimensional objects, has a few minor differences: * First line (optional): the letters 4OFF to mark the file type. * Second line: the number of vertices, number of faces, number of edges, and number of cells, in order (the number of edges can be ignored). * List of vertices: X, Y, Z and W coordinates. * List of faces: number of vertices, followed by the indexes of the composing vertices, in order (indexed from zero). * List of cells: number of faces, followed by the indexes of the composing faces, in order (indexed from zero). **Optionally, the RGB values for the cell color can follow the elements of the cells. Comments are marked with a pound sign (#): these are not read by the software.


Example

OFF
# cube.off
# A cube
 
8 6 12
 1.0  0.0 1.4142
 0.0  1.0 1.4142
-1.0  0.0 1.4142
 0.0 -1.0 1.4142
 1.0  0.0 0.0
 0.0  1.0 0.0
-1.0  0.0 0.0
 0.0 -1.0 0.0
4  0 1 2 3  255 0 0 #red
4  7 4 0 3  0 255 0 #green
4  4 5 1 0  0 0 255 #blue
4  5 6 2 1  0 255 0 
4  3 2 6 7  0 0 255
4  6 5 4 7  255 0 0


See also

*
Wavefront .obj file OBJ (or .OBJ) is a geometry definition file format first developed by Wavefront Technologies for its Advanced Visualizer animation package. The file format is open and has been adopted by other 3D graphics application vendors. The OBJ file form ...
*
STL (file format) STL is a file format native to the stereolithography CAD software created by 3D Systems. STL has several backronyms such as "Standard Triangle Language" and "Standard Tessellation Language". This file format is supported by many other softwar ...
*
PLY (file format) PLY is a computer file format known as the Polygon File Format or the Stanford Triangle Format. It was principally designed to store three-dimensional data from 3D scanners. The data storage format supports a relatively simple description of a sin ...
is an alternative file format offering more flexibility than most
stereolithography Stereolithography (SLA or SL; also known as vat photopolymerisation, optical fabrication, photo-solidification, or resin printing) is a form of 3D printing technology used for creating models, prototypes, patterns, and production parts in a lay ...
applications.


References

{{Reflist


External links


Description of the OFF format in the Geomview manual
CAD file formats