Skip to main content

Mesh interchange format

Readable mesh geometry with a long tail of tooling.

Wavefront OBJ is a simple text format for vertices, normals, texture coordinates, and faces. loaders.gl maps it into the shared mesh pipeline and can write compatible OBJ text back out.

The OBJ data path

Parse familiar text into a portable mesh shape.

OBJ keeps the source easy to inspect and edit, while the loader resolves its separate attribute streams and face references into data that renderers and Arrow-based tools can consume.

Geometry

Vertices, normals, UVs, colors, and faces

Materials

Optional MTL references are recognized at the loader boundary

Output

Mesh objects or Mesh Arrow tables

Write

Encode compatible mesh data as OBJ text

Detailed guide

OBJ structure and APIs

The reference below covers the file layout, loaders, writers, mesh output, materials, and implementation limits.

Loaders and Writers​

CharacteristicValue
File FormatWavefront OBJ
Data FormatMesh, Mesh Arrow table
File Extension.obj
MIME TypeNot standardized
File TypeText
Loader Decoder TypeSynchronous
Loader Worker Thread✅ Yes
Loader Streaming❌ No
Writer File TypeText
Writer APIsencode, encodeSync, encodeTextSync

Mesh Data​

OBJ files describe mesh geometry through vertex positions, texture coordinates, normals, and face indices. OBJLoader returns Mesh Arrow tables by default, or legacy Mesh objects when obj.shape: 'mesh' is selected.

Materials​

OBJ files are commonly paired with MTL files for material definitions. loaders.gl's OBJ support focuses on geometry data.