OBJ

Also known as: Wavefront OBJ · .obj file

On this page 7

OBJ, formally Wavefront OBJ, is a plain-text file format for static 3D geometry that lists vertex positions, texture coordinates, vertex normals and the faces that connect them. Within 3D file formats & pipelines, an .obj file is the most widely supported way to move a single mesh between modeling, sculpting, scanning and rendering tools, because almost every application in 3D graphics & animation can read and write it.

The format was introduced by Wavefront Technologies for its Advanced Visualizer software in the late 1980s. Its longevity comes from simplicity: a human can open the file in a text editor and understand it. The same simplicity is its main limitation, since OBJ carries no animation, rigging, scene hierarchy or modern material model.

How an OBJ file describes geometry

An OBJ file describes geometry as lines of keyword-prefixed records, one element per line. Vertex records come first in most files, followed by faces that refer back to those vertices by one-based index, meaning the first vertex is number 1, not 0. Negative indices are also legal and count backward from the most recently defined vertex.

Faces can reference three separate attribute lists at once using the v/vt/vn syntax, so a face corner might read f 4/2/7, combining vertex 4, texture coordinate 2 and normal 7. Because positions, UVs and normals are indexed independently, OBJ stores UV seams and hard edges compactly, which real-time engines later expand into unique vertex combinations.

The most important record types are summarized below. Many applications support only a subset, chiefly the polygonal ones.

KeywordMeaningExample
vVertex position, optional weight or colorv 1.0 0.5 -2.0
vtTexture coordinate (UV)vt 0.25 0.75
vnVertex normalvn 0.0 1.0 0.0
fFace built from vertex referencesf 1/1/1 2/2/1 3/3/1
o and gObject name and group nameg wheel_front
usemtl and mtllibMaterial assignment and library filemtllib car.mtl
sSmoothing groups 1
Core OBJ record types

Materials and the companion MTL file

OBJ stores no surface appearance itself; materials live in a separate MTL file referenced by the mtllib statement. Each face block then selects a named material with usemtl, and the MTL file defines colors, transparency and texture maps for that name.

The MTL model reflects late-1980s shading concepts: ambient, diffuse and specular colors, a specular exponent and simple maps. Several applications added unofficial physically based extensions such as roughness and metallic maps, but support is inconsistent, so materials frequently need to be rebuilt after import.

StatementPurposePractical note
Kd / map_KdDiffuse color and textureMost reliably supported
Ks / NsSpecular color and exponentInterpreted differently by renderers
d or TrOpacity or transparencyOpposite conventions cause errors
bump or map_BumpBump or normal mapNormal map handling varies
illumIllumination model numberOften ignored on import
Common MTL statements

OBJ compared with other exchange formats

OBJ is best understood as a lowest common denominator for meshes, while newer formats carry complete scenes. The comparison below places it next to the formats most often considered instead.

FormatEncodingAnimation and riggingTypical role
OBJTextNoneStatic mesh exchange
FBXBinary or text, proprietaryYesGame and DCC interchange
glTF / GLBJSON plus binaryYesReal-time and web delivery
USDText or binary, layeredYesLarge scene assembly
AlembicBinaryBaked caches onlySimulation and VFX caches
PLYText or binaryNoneScans and point clouds
OBJ and related 3D formats

The choice usually depends on what must survive the transfer. For a sculpt sent to a texturing tool, OBJ is sufficient; for a rigged character, a lit scene or an asset bound for a browser, FBX, glTF or USD are the appropriate choices.

Where OBJ fits in an asset pipeline

In an asset pipeline, OBJ serves as a neutral handoff format for static geometry between stages that do not share a native file type. Typical handoffs include retopologized meshes sent from a sculpting tool to a UV or texturing application, photogrammetry results exported for cleanup and stock models distributed to customers using many different packages.

  • Sculpting and baking: high- and low-resolution meshes are exported as OBJ so that normal maps can be baked in another tool.
  • 3D scanning and printing: scan software and slicers widely accept OBJ, including per-vertex color extensions.
  • Marketplaces: asset stores often include an OBJ version because nearly every buyer can open it.
  • Scientific and engineering visualization: simple text output makes OBJ easy to generate from custom code.

Teams that rely on OBJ usually agree on conventions for scale, up axis and naming, because the format records none of these explicitly. A short pipeline document prevents most import surprises.

Limitations and common pitfalls

The main weaknesses of OBJ are missing metadata and large file sizes. Text storage is easy to read but slow to parse and several times larger than equivalent binary data, so meshes with millions of polygons can produce files of hundreds of megabytes.

ProblemCauseFix
Model is tiny or hugeNo unit information storedAgree on units, set import scale
Model lies on its sideY-up versus Z-up conventionsSet axis conversion on export
Textures missingAbsolute or broken paths in MTLUse relative paths, keep files together
Faceted or wrong shadingNormals not exportedExport normals or smoothing groups
Transparent surfaces invertd and Tr meanings confusedCheck opacity values after import
Frequent OBJ problems and fixes

Another pitfall is assuming that OBJ preserves everything visible in the source scene. Modifiers, instances, cameras, lights and vertex weights are lost, and curved surfaces defined with the format’s rarely supported free-form records are usually converted to polygons. Checking the imported mesh before passing it downstream avoids errors that are hard to trace later.

In everyday language

An OBJ file is like a written list of instructions for building a shape. It names every corner point in space, then says which points join to form each small flat surface. Put enough of those surfaces together and you get a chair, a car or a face.

Because the list is plain text, almost any 3D program can read it. The catch is that it only describes the shape and simple surface colors. It cannot make the object move, and it does not remember lights or cameras. It is a reliable way to share a still object, not a whole animated scene.

Seen in the real world

A product designer at a furniture company scans a prototype armchair with a photogrammetry rig. The scanning software produces a mesh of about 3.5 million triangles with a color texture. The designer exports it as an OBJ with an MTL file and a 4K texture so a 3D artist using a different modeling package can clean it up.

The first import shows the chair lying on its back at a hundred times its real size. The cause is a Z-up export read as Y-up and centimeters read as meters. After the two teams agree on Y-up and centimeters, the artist retopologizes the chair to 40,000 triangles, bakes normal maps from the scan and sends a clean OBJ back.

The final mesh is then converted to glTF for the company’s online catalog. OBJ handled the geometry handoff reliably, while the delivery format took over for real-time display.