OFF (file format)
From HandWiki
Filename extension | .off |
---|---|
Internet media type | text/plain |
Type of format | 3D model format |
OFF (Object File Format) is a geometry definition file format containing the description of the composing polygons of a geometric object.[1] It can store 2D or 3D objects, and simple extensions allow it to represent higher-dimensional objects as well.[2] Though originally developed for Geomview, a geometry visualization software, other software has adapted the simple standard.[3]
Composition
The composition of a standard OFF file is as follows:[4]
- 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 values for the face color can follow the elements of the faces.
The four-dimensional OFF format, most notably used by Stella4D, which allows visualization of four-dimensional objects, has a few minor differences:[5]
- 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
- STL (file format)
- PLY (file format) is an alternative file format offering more flexibility than most stereolithography applications.
References
- ↑ "OFF file format (Princeton)". http://segeval.cs.princeton.edu/public/off_format.html.
- ↑ Burkardt, John. "Geomview Object File Format". https://people.sc.fsu.edu/~jburkardt/data/off/off.html.
- ↑ Holmes, Ryan. "OFF Files". http://www.holmes3d.net/graphics/offfiles/?graphics/offfiles.
- ↑ Holmes, Ryan. "OFF Files". http://www.holmes3d.net/graphics/offfiles/offdesc.txt.
- ↑ Webb, Robert (2020). "Stella4D Pro Manual". https://www.software3d.com/StellaManual.php?prod=stella4D#import.
External links
Original source: https://en.wikipedia.org/wiki/OFF (file format).
Read more |