OBJ

OBJ is a format of file containing the description of a geometry 3D. It was defined by the company Wavefront Technologies within the framework of the development of its software of animation Advanced Visualizer. This format of file is opened and was adopted by other software 3D (such as Poser E-frontier, Maya of Autodesk, Blender, MeshLab, 3D Studio max, Lightwave of Newtek, etc) for treatments of import/export of data.

The geometrical forms can be defined by smooth polygons or surfaces such as rational and nonrational surfaces.

Structure of the file

Files OBJ are with the ASCII format (a binary version exists, identified by extension MOD).

A comment can be placed while making begin the line by character #.

A polygonal surface is described by a whole of tops (accompanied by coordinates of texture and normals in each top) and of a whole of faces.

A top is defined in the following way:

v 1.0.0.0.0.0

A coordinate of texture is in the following way defined:

vt 1.0.0.0

A normal is in the following way defined:

vn 0.0.1.0.0.0

Each face is then defined by a whole of indices referring to the coordinates of the points, of texture and the normals defined previously.

For example, the following face

F v1/vt1/vn1 v2/vt2/vn2 v3/vt3/vn3

a triangle made up of the tops of indices v1 defines, v2 and v3 in the list of tops v. Each one of these tops has a coordinate of texture identified by its incide in the list of the coordinates of texture vt and a normal identified in the list of the normals vn.

When several objects cohabit in the same file, the section defining the faces is preceded by

G of the object

Materials can be referred into important of the files mtl (material template library)

material usemtl

Example

As example, a cube is defined in the following way

# cube.obj # G cubic v 0.0 0.0 0.0 v 0.0 0.0 1.0 v 0.0 1.0 0.0 v 0.0 1.0 1.0 v 1.0 0.0 0.0 v 1.0 0.0 1.0 v 1.0 1.0 0.0 v 1.0 1.0 1.0 vn 0.0 0.0 1.0 vn 0.0 0.0 -1.0 vn 0.0 1.0 0.0 vn 0.0 -1.0 0.0 vn 1.0 0.0 0.0 vn -1.0 0.0 0.0 F 1//2 7//2 5//2 F 1//2 3//2 7//2 F 1//6 4//6 3//6 F 1//6 2//6 4//6 F 3//3 8//3 7//3 F 3//3 4//3 8//3 F 5//5 7//5 8//5 F 5//5 8//5 6//5 F 1//4 5//4 6//4 F 1//4 6//4 2//4 F 2//1 6//1 8//1 F 2//1 8//1 4//1

External bonds

  • specifications

Random links:Rose shade of Jean-Charles Brosseau | Sporting Clube de Pombal | Wynand Janssens | Burnup | Shooting of OK Corral | Réaction_affleurante_d'alcool