htrdr 0.9.2

htrdr-obj(5)

NAME

htrdr-obj - file format of the ground geometry in htrdr(1)

DESCRIPTION

A htrdr-obj file is a regular OBJ [1] composed only of triangular meshes. Each triangle must be included in a material group as defined by the 'usemtl' directive. The name of the material group must be of the form "<front-mtl-name>:[<interface-mtl-name>:]<back-mtl-name>", where <front-mtl-name>, <interface-mtl-name> and <back-mtl-name> are strings separated by a colon (:) defining the name of the front, interface, and back facing materials, respectively. The interface material name is optionnal: it is used for thin geometries, i.e. geometries with no thickness. Material names can be composed of any characters expected for spaces and tabulations. Note that regarding the htrdr(1) convention, a triangle side is said "front facing" when its vertices are clock-wise ordered.

Note that to be a valid htrdr-obj(5) file for htrdr(1), the front and the back facing names must reference a material listed in htrdr-materials(5) file submitted to the htrdr(1) command line.

The grammar of a htrdr-obj file is thus a subset of the OBJ file format [1] with only a specific convention regarding the material name. As a consequence, any software supporting the OBJ file format can be used to create or visualise an htrdr-obj file.

EXAMPLES

Define a quad at the interface between the air medium and the concrete material.

v -5.0  -5.0  0
v -5.0   5.0  0
v  5.0  -5.0  0
v  5.0   5.0  0

usemtl air:concrete
f 1 2 3
f 3 2 4

Define a wooden cube whose Z-aligned faces are against a brick material. The remaining 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

SEE ALSO

1.
OBJ file format - <http://www.martinreddy.net/gfx/3d/OBJ.spec>

htrdr(1)