The .tetra file format is a simple, human-readable format designed to store volumetric tetrahedral meshes. It contains vertex positions and tetrahedral elements defined by four vertex indices.
Each line of a .tetra file represents either:
- A vertex position, using the
vprefix - A tetrahedral element, using the
tprefix
Comments can be included using #.
Each vertex line starts with v followed by the X, Y, Z coordinates.
v 1.0 0.0 0.0
v 0.0 1.0 0.0
v 0.0 0.0 1.0Each tetrahedron line starts with t followed by four 0-based vertex indices.
t 0 1 2 3This defines a tetrahedron using the 4 vertices with indices 0, 1, 2, and 3 (in the order defined in the vertex list).
A simple .tetra file representing a single tetrahedron might look like this:
# Vertices
v 0.0 0.0 0.0
v 1.0 0.0 0.0
v 0.0 1.0 0.0
v 0.0 0.0 1.0
# Tetrahedra
t 0 1 2 3- Indices are zero-based
- All tetrahedra should reference valid vertices
- No assumptions are made about orientation, winding, or manifoldness
- This format does not support metadata, normals, colors, or surface extraction — it is designed for simplicity
This format is intended to be used with:
- The TETRA Exporter for Blender
- The TETRA Importer for Unity or other custom engines
- Future tools that may extend
.tetrawith optional headers or regions
This specification and format are provided under the MIT License, as part of the TETRA project.