[ PMesh | GTS | Geomview | VRML 1.0 | VRML 2.0 | X3D | Miscellaneous ]
This page describes shortly the characteristics and capabilites of some of the supported 3D formats.
PMesh is a simple format used at the University of Edinburgh. The format begins optionally with a header. The first header line consists of the format line "#pmesh". The header ends with the first line not starting with a "#". The data starts with nv lines of the format "v float float float" for the vertices and is followed by nf lines of the format "p 3 int int int" for the triangles. Each line contains the three indices of the vertices. The index of the vertices starts at 1.
The first line of the GTS format contains three unsigned integers separated by spaces. The first integer is the number of vertices, nv, the second is the number of edges, ne, and the third is the number of faces, nf. The following nv lines contain the x, y and z coordinates for each of the nv vertices. The next ne lines contain the two indices (starting from 1) of the vertices for each edge. The third part of the file contains nf lines with three ordered indices (also starting from 1) of the edges for each of the nf faces.
The Geomview formal starts with a header consisting of the format line "OFF" and a second line with three integer numbers. The first integer is the number of vertices, nv, the second is the number of polygons, np, and the third number is typically "0". The following nv lines contain the vertex information (each consists of three floats). Following the vertices are np lines of polygons. The first number of each line stands for the size of the polygon. Mesh Viewer just reads polygons consisting of 2 or 3 vertices. Following are a number of indices of the vertices depending on the size of the polygon. The index of the vertices starts at 0.
A description of the file format can be found here.
VRML 1.0 support is very basic. The Mesh Viewer extracts only vertices and triangles from VRML 1.0 files and ignores very much everything else (all other shapes, transformations, texture etc.).
The VRML 1.0 specification can be found here.
VRML 2.0 (VRML 97) support is more advanced. Mesh Viewer is able to extract VRML shapes with vertices, triangles and texture coordinates. Shapes are rotated, scaled and translated if necessary. Texture must be stored in a JPEG file. Definion (def) and usage (use) for, for example, a point set within the VRML file is not implemented.
The VRML 2.0 specification can be found here.
Mesh Viewer is able to write vertices and triangles into X3D files.
The X3D specification can be found here.
The following two formats are no real formats, but help loading and displaying modelled data.
The List file is a text file listing n model files, which a loaded subsequently as different shapes into one mesh. Lists are useful for displaying, for example, the result data of a surface segmentation algorithm, which saves the extracted surfaces segments in different model files.
The first header line consists of "#list". The header ends with the first line not starting with a "#". The following lines consists of the names for the model files (one per line).
The Feature file is used to store vertices and edges. A feature file can be loaded beside the model for displaying/highlighting vertices or edges in the model. Feature vertices and edges are shown in red.
The first header line consists of "#features". The header ends with the first line not starting with a "#". The lines consists of either vertices or edges. A vertex line consists of the format "fv float float float". A edge line starts with "fe" followed by the x, y and z coordinates for the start and the end vertex.
Back to main page