Wavefront OBJ is a text-based legacy 3D model exchange format. Despite its severe limitations in efficiency and features (e.g. no modern material support, no geometry instancing) it remains popular due to its simple syntax and manual editability.
Export settings
- See general export options.
- If the there are issues displaying the exported model correctly in other programs, try setting "Triangulate Meshes" to true.
CGA Mapping to OBJ
Geometry
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. |
Materials
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. |
See also Rendering and export for more information.