Newer
Older
Import / research / 3d-z-maps / mview-0.3.3 / Documentation / formats.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>

 <title> Supported 3D formats </title>

 <link rel="stylesheet" type="text/css" href="style.css">

</head>
<body>

<h1>Supported 3D formats</h1>

<p align=center>
 [ <a href="#pmesh">PMesh</a> |
   <a href="#gts">GTS</a> |
   <a href="#geomview">Geomview</a> |
   <a href="#vrml1">VRML 1.0</a> |
   <a href="#vrml2">VRML 2.0</a> |
   <a href="#x3d">X3D</a> |
   <a href="#misc">Miscellaneous</a> ]
</p>

<p>
 This page describes shortly the characteristics and capabilites of some of
 the supported 3D formats.
</p>

<a name="pmesh">
<div class=h2 WIDTH=100%>
   PMesh format
</div>
</a>

<p>
 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.
</p>

<a name="gts">
<div class=h2 WIDTH=100%>
   GTS format
</div>
</a>

<p>
 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.
</p>

<a name="geomview">
<div class=h2 WIDTH=100%>
   Geomview format
</div>
</a>

<p>
 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.
</p>

<p>
 A description of the file format can be found <a
 href="http://www.geomview.org/docs/html/OOGL-File-Formats.html">here</a>.
</p>

<a name="vrml1">
<div class=h2 WIDTH=100%>
   VRML 1.0 format
</div>
</a>

<p>
 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.).
</p>

<p>
 The VRML 1.0 specification can be found <a
 href="http://www.web3d.org/x3d/specifications/vrml/VRML1.0/index.html">here</a>.
</p>

<a name="vrml2">
<div class=h2 WIDTH=100%>
   VRML 2.0 format
</div>
</a>

<p>
 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.
</p>

<p>
 The VRML 2.0 specification can be found <a
 href="http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/">here</a>.
</p>

<a name="x3d">
<div class=h2 WIDTH=100%>
   X3D format
</div>
</a>

<p>
 Mesh Viewer is able to write vertices and triangles into X3D files.
</p>

<p>
 The X3D specification can be found <a href="http://www.web3d.org/">here</a>.
</p>

<a name="misc">
<div class=h2 WIDTH=100%>
   Miscellaneous formats
</div>
</a>

<p>
 The following two formats are no real formats, but help loading and
 displaying modelled data.
</p>

<h4>List format</h4>

<p>
 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.
</p>

<p>
 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).
</p>

<h4>Feature format</h4>

<p>
 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.
</p>

<p>
 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.
</p>

<a href="index.html">Back to main page</a>

</body>
</html>