HTRDR-OBJ(5) | File Formats Manual | HTRDR-OBJ(5) |
NAME
htrdr-obj
—
geometric file format
DESCRIPTION
A htrdr-obj
file is an ordinary obj file
composed solely of triangular meshes. Its special feature is that each
triangle must be included in a material group as defined by the
usemtl
directive. And the form of the
usemtl
directive must be as follows:
usemtl
front_mtl[:interface_mtl]:back_mtlwith front-mtl, interface-mtl and back-mtl the material names of the front, interface and back of the triangles belonging to the group. The interface material name is optional: it is used for thin geometries, i.e. geometries with no thickness. Material names can be composed of any character, with the exception of spaces, tabs and the colon character used to separate the aforementioned names. Note that, by convention, a side of a triangle is said to be "front-facing" when its vertices are ordered clockwise.
The grammar of a htrdr-obj
file is
therefore a subset of the obj file format, with only one specific convention
concerning material names. Consequently, any software supporting the obj
file format can be used to create or view a
htrdr-obj
file.
EXAMPLES
Define a sheet of paper at the interface between air and concrete:
v -1.0 -1.0 0 v -1.0 1.0 0 v 1.0 -1.0 0 v 1.0 1.0 0 usemtl air:paper:concrete f 1 2 3 f 3 2 4
Define a wooden cube whose faces along the Z axis are against a brick. The other faces are in contact with the air:
v 0 0 0 v 1 0 0 v 0 1 0 v 1 1 0 v 0 0 1 v 1 0 1 v 0 1 1 v 1 1 1 usemtl wood:air f 1 3 2 f 2 3 4 f 1 5 3 f 3 5 7 f 5 6 7 f 7 6 8 f 4 8 2 f 2 8 6 usemtl wood:brick f 3 7 4 f 4 7 8 f 1 2 5 f 5 2 6
HISTORY
The htrdr-obj
format was first developed
for the htrdr(1) program.
October 5, 2023 | UNIX |