Everything You Need To Know About OBJ Files

We have years of experience with all 3D formats and helping developers expedite their work with AR. In this guide, we explain how to use OBJ files, how they compare to other 3D formats, and how 3D printing works.

In this article:

What’s an OBJ file?

An OBJ file (.obj) contains information about the geometry of 3D objects. The files are used for exchanging information, CAD, and 3D printing. OBJ files can support unlimited colors, and one file can define multiple objects. The current version is 3.0.

The objects in an OBJ file are defined by polygon faces (which themselves are defined by vertexes, or points) and normals, curves, texture maps, and surfaces. OBJ is a vector file, which makes the defined objects scalable. There’s no maximum file size.

The format was created in the 1980s by Wavefront Technologies for its Advanced Visualizer animation software (Autodesk Maya has since replaced Advanced Visualizer). The file extension OBJ comes from the name Wavefront OBJect (the full name is rarely used). Other companies have adopted the OBJ format for use in their applications.

3D printers and OBJ files

Because one of the primary uses of OBJ files is 3D printing, understanding how 3D files become 3D objects is key. At a high level, this is what happens:

  1. Send the file to a program called a slicer (Slic3r MakerBot Print and Simplify3D are some examples).
  2. This software creates the instructions for each layer of the object that the printer will generate, the path the printer head will travel while creating each layer, the time it will take, and the amount of material the printer will need.
  3. The data created by the slicer is saved as a Gcode file (the native language of 3D printers), which is sent to the printer.
  4. The printer follows the instructions in the file and creates the 3D object.

Notes:

  • Some objects represented in OBJ files are not printable. Some reasons why this happens include:
    • An object, like a sphere, may not be stable enough to stand on its own (though a design could consist of a base that you could remove later)
    • Items with hanging parts that have greater than a 45-degree will require supports added that you’ll remove later.
    • You can’t print a chain because it has interlinked but unconnected parts.
    • If the wall thickness is 0, you can’t print the object.
  • Not all slicer programs support OBJ files or all OBJ encoding methods.
  • Slicer settings (e.g., layer thickness, print speed, shell thickness) will impact the final quality of a printed object.

3D printing has reached the micron level; a micron is one-thousandth of a millimeter (for comparison, a human hair is between 50 and 100 microns). This means that you can print more precise and detailed objects. If you include metallic materials, embedded electronic components can be part of a printed object. OBJ files support this level of detail, so you can use them to design micron-level objects.

Multi-color printers are becoming popular. These printers can create more realistic objects than single color printers like organ models that a surgeon studies before an operation or artists or manufacturers can use them to design phone cases with custom images, for example. Since OBJ files can create multiple colors (via a supporting MTL file), you can use them to design objects for a multi-color 3D printer.

How to create, open, and edit OBJ files

You need a CAD or 3D graphics/modeling program to view, open, or edit an OBJ file using Windows, Mac, or Linux. Here’s a comprehensive list of software you can use to work with OBJ files.

Windows

  • Adobe Photoshop CC 2019
  • Autodesk 3ds Max 2020
  • Autodesk AutoCAD (requires import plugin)
  • Autodesk Fusion 360
  • Autodesk Maya 2020
  • Blender
  • CADSoftTools ABViewer
  • Dassault Systemes SolidWorks (requires import plugin)
  • Daz 3D Daz Studio 4
  • IMSI TurboCAD Pro
  • MAXON Cinema 4D
  • MeshLab
  • Microsoft 3D Builder
  • Microsoft Paint 3D
  • NewTek LightWave 3D
  • Siemens Solid Edge (requires import plugin)
  • Smith Micro Poser 11

Mac   

  • Adobe Photoshop CC 2019
  • Autodesk Fusion 360
  • Autodesk Maya 2020
  • Blender
  • Cheetah3D
  • Daz 3D Daz Studio 4
  • IMSI TurboCAD Deluxe
  • MAXON Cinema 4D
  • MeshLab
  • NewTek Lightwave 3D
  • Smith Micro Poser 11

Linux

  • Autodesk Maya 2020
  • Blender
  • GLC_Player
  • MeshLab

There are more applications available, but one of the options should work for most people. Technically, since the OBJ format is simple (the data is uncompressed, and is in ASCII), you could conceivably edit a file by hand (but this doesn’t happen often).

When to use OBJ files

OBJ files have some advantages over other 3D file formats. For more information on other file formats see “OBJ vs. Other 3D File Formats” below. These tips will help you decide if the format is the right choice:

  • OBJ has a large user base and support system, so if that is important to you, consider using OBJ.
  • OBJ has a simple file structure compared to COLLOADA.
  • OBJ is open source, and it’s a good bridge for converting files to other formats if you can’t convert between the two directly.
  • It’s easier to convert between OBJ and other formats than it is between FBX and others.
  • OBJ files can be imported to and exported from 3D and CAD programs, so if you need to open the same file in multiple applications, OBJ is a good choice.
  • OBJ files can approximate complex surface geometry without needing a large file size
  • OBJ files support multiple colors, but that’s not available in STL.
  • The OBJ file includes position, normals and UV data, and allows accurate surface subdivisions.
  • OBJ’s file size is small compared to COLLOADA and FBX.

When not to use OBJ files

Like all file formats, OBJ files do have some limitations, and it may be better to use a different format. Those scenarios include:

  • Not all printers support OBJ, so STL may be a better option. Either way, check to make sure the printer you want to use supports your file format.
  • STL is the preference for single color model printing.
  • If animation or scenes are needed, OBJ files won’t work. COLLADA, 3DS, X3D, FBX, and STEP are better options.
  • OBJ is not space-efficient, can be a processor hog and slow to load. glTF takes up less space and loads faster.

OBJ language: How a 3D object is defined in an OBJ file

An OBJ file consists of several statement types that, when combined, define a 3D object. The statements describe shapes and locate them in relation to each other.

Comment statements start with #. The language ignores anything after # until the next line, allowing developers to leave notes for themselves or others who may be viewing their code.

Vertex data

A vertex is a point where the corners of a face or polygon meet. Vertex statements start with v and contain the following:

  • Three required variables: x, y, and z
  • One optional variable: w
  • Variable values range from 0-1. The default is 1.

Notes:

  • Some applications support colors; if they are available, add RBG values after the variables.
  • If a UV (vt) or vertex normal (vn) are defined for one vertex in a shape, they must be defined for all.

A UV defines how a 3D model is mapped onto a 2D surface (such as computer display) and determines how to apply textures to the 3D object; they are sometimes called texture vertexes. UV statements start with vt and contain the following:

  • One required variable: u
  • Two optional variables: v and w
  • Variable values range from 0-1. The default is 0.

A vertex normal defines shading and brightness by indicating the direction of a light source. Vertex normal statements start with vn and contain the following:

  • Three required variables: x, y, and z

Parameter space vertices are free-form curve or surface attributes/control points. Parameter space vertex statements start with vp and contain the following:

  • Three required variables: u, v, and w
  • Use u for curve points
  • Use u and v for surface points and non-rational trimming curve control points
  • Use u, v, and w for rational trimming curve control points

Here is a sample of a portion of an .obj file containing the four types of vertex information from the University of Utah School of Computing:

Surface data

Free-form curve or surface types include basis matrix, Bezier curves, B-spline, Cardinal, and Taylor. The definitions contain the following:

  • Degrees (indicated by deg)
  • Basis matrix (indicated by bmat)
  • Step size (indicated by step)
  • Curve type (indicated by cstype)
  • Connectivity between free form surfaces (indicated by con)

The definition of the body of the curve or surface contains the following:

  • Parameter values (indicated by parm)
  • Outer trimming (indicated by trim)
  • Inner trimming loop (indicated by hole)
  • Special curve (indicated by scrv)
  • Special point (indicated by sp)
  • End statement (indicated by end)

Here is a sample of a portion of an cubic Bezier surface made with a basis matrix from the University of Utah School of Computing:

Element data

Other elements that you can include are points (p), lines (l), faces (f), curves and 2d curves (curv and curv2D respectively), and surfaces (surf).

Notes:

  • Each face can contain three or more vertexes.
  • Polygons can be defined by using more than three vertex/texture/normal indices.

Grouping data

You can connect various elements with grouping statements. Groups use the following indicators, followed by names to define each group:

  • Group name: g
  • Smoothing group: s
  • Merging group: mg
  • Object name: o

Display and rendering data attributes

These values help drive how the object will appear on the screen:

  • Bevel interpolation: bevel
  • Color interpolation: c_interp
  • Dissolve interpolation: d_interp
  • Level of detail: lod
  • Material name: usemtl
  • Material library: mtllib
  • Shadow casting: shadow_obj
  • Ray tracing: trace_obj
  • Curve approximation technique: ctech
  • Surface approximation technique: stech

References

OBJ files can reference vertices, normal, etc. by either absolute position or by relative position.  Not all software supports both methods, so take care when opening files to ensure they are compatible with the software you’re using.

How objects are defined

OBJ files have three different ways to encode the surface geometry of an object. Each method has its strengths and is good to use in various situations. Here is an overview:

  1. Tessellation with Polygonal Faces
  • Use Polygons to create a surface.
  • It’s the simplest of the three methods to encode the diagram.
  • Use vertexes and normals for encoding.
  • This method can result in coarseness in a printed model; you can mitigate this by using a smaller polygon, but that will increase the file size.
  1. Free-Form Curves
  • The method uses Bezier curves, cardinal splines, and similar curves to define a surface, which will create an approximation of the surface.
  • It’s a more complicated way to describe a surface than polygon tessellation, but it requires less data.
  1. Free-Form Surfaces
  • Use free-form shapes instead of polygons.
  • It’s more precise and creates smaller file sizes than the other two methods.
  • Use exact encoding rather than approximating the shape.
  • This method is best for creating airplane wings or boat hulls.

Material Template Library (MTL) files

OBJ files don’t contain visual information, but you can add this information to the objects in the OBJ file by referencing a support file. Here’s an example of an MTL file from Florida State University:

The Material Template Library (.mtl) is a widely used ASCII file format that determines how an object defined in an OBJ file reflects light using the Phong reflection model.

Wavefront Technologies also developed MTL. The MTL format is outdated because it doesn’t support newer formats (e.g., parallax maps and specular maps), but custom MTL file generators can incorporate these.

To reference an MTL file, use the following syntax in the OBJ file:

OBJ files can reference multiple MTL files, which allows the ability to add numerous features to objects. Multiple OBJ files can reference the same MTL file. Each MTL file may contain one or more color and texture definitions.

In the MTL file, define color attributes using the following information:

  • Ambient color statements start with Ka, and use 3 RBG values, ranging from 0 to 1.
  • Diffuse color statements start with Kd, and use 3 RBG values, ranging from 0 to 1.
  • Specular color statements start with Ks, and use 3 RBG values, ranging from 0 to 1, and is weighted using a specular exponent.
    • The specular exponent is Ns, and values range from 0-1000.
  • Transparency statements start with either Tr or d (which comes from dissolved); the values range from 0-1. Tr and d are inverses of each other, so a Tr value of 0.2 would be equal to a d value of 0.8. The default values are d=1.0 or Tr=0.0, which means the object will be fully opaque. Transparency is not related to the thickness of the object.
  • Illumination models (aka shading algorithms) start with illum. Values range from 01-10, and each number is a predefined set of parameters.

You can create Texture Maps by using combinations of the color statements above. A variable name is created, and the desires statements follow. There are also texture options available, including the following:

  • Blend horizontally
  • Blend vertically
  • Boost sharpness

Example OBJ files

Below are links to a few sample OBJ files that you can download from Florida State University’s Department of Scientific Computing:

A Mini Cooper car OBJ file

A lamp OBJ file

A basic cube OBJ file

A large building OBJ file

 

OBJ vs. other 3D file formats

Besides OBJ, there are several other 3D file formats available. Here are some of the alternatives:

  • STL: A proprietary format that’s used by CAD software for 3D printing, computer-aided manufacturing (CAM), and data exchange for CAD/CAM, STL is the most common 3D format. The format has a large ecosystem but doesn’t support color and texture information. High-resolution objects will make the file size extremely large. The name comes from STereoLithography.
  • COLLOADA: Games and applications often use this format because it can support scenes and animations. ISO has adopted the open-source format. COLLOADA has a complex file structure but isn’t updated often. The name comes from COLLAborative Design Activity.
  • FBX: Used for high-fidelity data exchange between software applications, FBX can support scenes and animations. FBX is a proprietary format, and its name comes from FilmBoX.
  • X3D: Used for 3D web graphics, X3D supports multiple encoding languages. ISO has also adopted this format. The name comes from eXtensible 3D.
  • VRML: An obsolete standard that was used for 3D web graphics on the web, but it’s been replaced by X3D. The name came from Virtual Reality Modeling Language.
  • AMF: Used for 3D printing and other additive processes. ISO has adopted AMF. The name comes from Additive Manufacturing File format.
  • 3MF: Used for 3D printing, 3MF includes data that is in auxiliary files in other formats. The name comes from 3D Manufacturing Format.
  • gITF: Used for 3D scenes and models with a small file size and fast load times. The name comes from GL Transmission Format.
  • IGS: A cross-platform ASCII vector graphics format than many CAD programs can open. IGS stands for Initial Graphics Exchange Specification, and the U.S. Air Force was involved in its creation.
  • JSON: An open standard file format that is generally used for web applications. JSON stands for JavaScript Object Notation.

Frequently asked questions about the OBJ file format

Have more questions about the OBJ file format? You’ll find answers below to questions that cover everything from different OBJ formats to how you can convert OBJ files.

Is there another OBJ file format?

There is an obsolete .obj file format that were binary support files that was used by a compiler to link data and code, and were called relocatable object code. MS-DOS, 16-bit versions of Windows and OS2 used the code. Windows NT was 32-bit and the first OS version that didn’t use these files.

What is the OBJ-Browse method in PEGA?

PEGA is CRM (Consumer Relationship Management) software. Within PEGA, you can perform many operations. Obj-Browse is one that allows people to search for, then copy for cases of a particular class, and copy the entire class (or specified properties of that class) to the clipboard as a group of embedded pages.

You can only use visible properties columns as selection criteria. However, OBJ-Browse can return values of properties not shown as columns. Other than the name, this has nothing to do with the OBJ file format.

What is the Blender OBJ format?

Blender is a free open-source 3D graphics application available for Mac, Windows, and Linux. It can import OBJ files and convert them to Blender’s format (called a BLEND file). You can also add OBJ files to existing BLEND files.

Blender can also export files in the OBJ format, but because BLEND files have more data, not everything will be available in the exported file.

What is the MAYA OBJ format?

MAYA is the successor to Wavefront’s Advanced Visualizer, where OBJ was born. MAYA uses its format, MB, but it can import and export OBJ files.

How to convert AutoCAD to OBJ

AutoCAD is a CAD program sold by Autodesk. Its proprietary file format has the extension DWG. You can’t directly convert or export a DWG file to the OBJ format. There are a few options:

  • Add a plugin to AutoCAD that adds the option to export in the OBJ format.
  • Use a conversion program like PolyTrans.
  • Export the DWG file to an intermediate file format such as STL, then open that in another graphics program (such as Blender), and export it from there to OBJ.

How to convert OBJ to IGES

IGES is a file format that CAD programs use. The name is an abbreviation of Initial Graphics Exchange Specification; the file extension is IGS. You can convert OBJ files to IGES via many programs, including SolidWorks, Autodesk Fusion 360, or FreeCAD.

How to convert STL to OBJ with Autodesk Fusion 360

Autodesk Fusion 360 can import and export both STL and OBJ files. So, follow the import steps in the program with the STL file; when you export, choose OBJ as the file type.

How to convert OBJ to JSON

JSON is a data format that stores text data (similar to a database) or encodes the geometry of objects. To convert an OBJ file to JSON, use a site like Online 3D Model Converter.

How to convert SolidWorks files to OBJ 

SolidWorks is a CAD and CAE program for Windows-based computers. With SolidWorks, you can export files as OBJ with a free macro. Since the native SolidWorks format contains texture and color information, the macro will export both an OBJ file and an MLT file.

How to convert C4D files to OBJ

C4D is a file type used for animation, rendering, and motion graphics. The name comes from Cinema 4D. PolyTrans and Maxon Cinema 4D (the native app for the format) can export files as OBJ. Since C4D files support animation, not all files will export properly.

How to convert SKP files to OBJ

SKP files are native to the SketchUp application. SketchUp can export to OBJ. If you don’t have the application, programs such as Babel3D or websites like Online CAD Converter can do the job. Mechanical engineering, architecture, interior design, and occasionally video games use SKP files.

Scale 3D commerce with 3D Cloud™ by Marxent

Creating OBJ files and other 3D formats is only the start in the world of 3D commerce. If you want to make 3D assets for one-time use in a campaign, you might not need a 3D CMS. However, if your goal is to create reusable content at scale, a 3D CMS is essential. A 3D CMS allows for 3D products to be associated with product data  produce a 3D product catalog, or access and provide 3D files in multiple formats? Then 3D Cloud by Marxent is essential for scalability. 3D Cloud CMS is a 3D content pipeline and workflow management suite that includes generic asset storage, so that team members can access all 3D files easily and deploy them to a complete range of 3D experiences.

For furniture, kitchen cabinets, building products, and bathroom manufacturers and retailers, 3D Cloud CMS is the only solution to scale 3D commerce efforts efficiently. Use this sophisticated 3D digital file management system to create format types for various platforms, including USDZ, glTF, and OBJ. Deliver assets to a complete range of 3D applications (e.g., WebAR, 3D room planning, 3D product configuration, 360 product spins, photo replacement, and more) so customers can better envision your product. 3D Cloud™ by Marxent effectively manages high 3D asset volumes while allowing your team to focus their creativity, control costs, and deliver exceptional experiences.