Wavefront OBJ Export

Format Description

Originally developed by Wavefront Technologies for its Advanced Visualizer animation package, OBJ is an open and widely adopted geometry definition file format.

It is a simple ascii-based format that only represents 3D geometry - the position of each vertex, the texture coordinate associated with a vertex, the normal at each vertex, and the faces that make each polygon.

OBJ files can optionally contain a reference to a material library file (MTL). MTL files contain one or more material definitions, each of which includes the color and texture and other properties of individual materials. These are applied to the surfaces and vertices of objects. Material files are also stored in ASCII format.

Specific Export Options for OBJ

OBJ has no additional export options (see general export options).

CGA Mapping to OBJ


OBJ element CGA feature
v Vertex data from asset meshes.
vn Vertex normal data from asset meshes.
vt Texture coordinates from "colormap" texture channel of asset meshes. Please note, that the per-texture transformations (see material.colormap.{su, sv, tu, tv, rw}) are NOT included in these texture coordinates.
f The mesh faces/polygons defined by the vertex, vertex normals and texture coordinates indices from the asset meshes.
g The face group name. If the mesh comes directly from an inserted asset, the original name will be used. If Mesh Granularity is set to "merge meshes by material", this name is controlled by the material.name attribute. Else, an internal name is set dependending on the operation which created the geometry.
s Smoothing groups are not supported and are turned off. Use vertex normals instead.
usemtl Material name and reference into the corresponding MTL file (see Material section below). It is only written, if the "Materials" export option is enabled.
mtllib Local reference to the corresponding MTL file. It uses the same base name as the OBJ file (but with extension '.mtl') and is written into the same directory.


Note: The material definitions are exported into separate MTL files.

MTL element CGA feature
newmtl The material name, corresponds to the usemtl statement in the obj files.
illum If the material of the mesh contains a specular color component equal to (0,0,0) a LAMBERT material is exported (illum is set to 3). For PHONG materials (specular component != zero or reflectivity) it is set to 4.
Kd Diffuse color, set to the value of material.color.
map_Kd The diffuse texture, set to the value of material.colormap. This statement is only written if a texture file is assigned to the colormap channel. Optionally, the following uv translation and scaling factors are exported:
  • If material.colormap.{su,sv} are != 1.0 the -s option is appended with the scaling factors.
  • If material.colormap.{tu,tv} are != 0.0 the -o option is appended with the translation values.
Ka Ambient color, set to the value of material.ambient.
Ks Specular color, set to the value of material.specular if the material is of type PHONG (illum = 4).
d Opacity, set to the value of material.opacity.
map_d Opacity map, set to the value of material.opacitymap.
Ns The specular exponent of the phong lighting model, also called "shininess". Set to the value of material.shininess.
Tf For Maya compatibility, set to (1.0, 1.0, 1.0).
Ni For Maya compatibility, set to 1.0.

Further Reading

Copyright ©2008-2016 Esri R&D Center Zurich. All rights reserved.