OBJ 3D file format: When should you use it?
The Wavefront OBJ format is the most widely adopted 3D model storage format. Understanding when and how to use it is essential to getting the most out of it.
|Ben Houston's Ultimate Guide to 3D File Formats|
|Part 1: glTF||Part 2: USD/USDZ||Part 3: FBX 3D||Part 4: OBJ 3D||Part 5: STEP||Part 6: glTF v. FBX 3D|
The file format name, OBJ, is in reference to its purpose of storing 3D OBJects. The OBJ format was originally the native file format for the 1980s era Advanced Visualizer 3D modeling package. Advanced Visualizer 3D is now obsolete, but some of its code was incorporated into its successor, the Maya 3D editing suite. In addition to just the OBJ geometry format, it has a sister format called
MAT, which is used for material definitions.
Should you use the OBJ 3D file format? It depends on what you are using it for.
Here are the pros and cons of the OBJ 3D file format:
Easy to Read and Write
The biggest strength of the OBJ file format (and its sister MAT material definition file format) is that it is text-based and very simple to understand. As a result of its simplicity, it is usually the first format that any 3D tool imports and exports. It is generally the only format that is supported by nearly every 3D software package.
Separate Position, UV and Normal Topologies
A strength of the OBJ file format is that it enables the storage of both position, UV and normal data that has different topology. This is great for high quality modeling tools.
Slow and Inefficient
Text-based file formats as the OBJ file format is, while easy to write, have two very large downsides if you are dealing with a lot of data. First, these file formats are not space inefficient. When writing out large amounts of numbers, which is the core of 3D model data, it is takes more disk space to write out the numbers as human readable text rather than as computer readable raw bytes. Second, the conversion between human readable numbers and the computer readable raw bytes requires processor time both to write the file and to read the file. This means that text-based formats are slower to process, especially as they get large, compared to binary file formats.
The separate position, UV and normal topologies, while they are valuable if you want to edit the model again, make it slower to load OBJ file data into a game engine for rendering. One needs to do a post processing operation to unify the topologies, and convert them to triangles, prior to uploading it to the GPU.
Orphaned 1980s Era Technology
Another downside of OBJ is that it was designed in the 1980s and it hasn’t been updated since. As mentioned earlier, the OBJ file format was created as the native file format for the Advanced Visualizer 3D software, but this software was discontinued in the mid 1990s. Since then, the OBJ file format hasn’t really had direction to keep up with the times. There have been a few attempts to improve the OBJ file to address some of its shortcomings, but these have been implemented at best sporadically or not at all by all the various tools that read and write OBJ files. This means that OBJ files should generally be viewed as an orphaned 1980s technology with no significant future ahead of it.
3D Model Data Only
Lastly, OBJ file formats, because they were designed as the storage format for a modeling tool, focus on just on storing a single model, possibly with rudimentary grouping, without any scene hierarchy, lighting, animation, bones, or skinning. This means that if you want to store a 3D scene or an animated character, you can not use the OBJ format.
You should use the OBJ file format when you want to easily exchange just 3D model data with other pre-existing tools. It is not the most efficient format, but for 3D object data, it is sufficient. The OBJ file format is incredibly widely supported.
If you want to transfer more complex scene data including animations, and lighting, it is recommended to use either FBX or glTF.
Use FBX when you want to transfer data between the current popular 3D editors, like Maya, Clara.io, and 3DS Max, and 3D experience engines like Unity, Unreal Engine.
If your destination platform (where you are sending the data) supports a more modern format like glTF, using glTF instead of FBX will save you time because it better transfers material properties.
If you want to use a format for fast real-time transfer to a client application, especially for AR applications, FBX can be slower than a transmission optimized format like glTF.
Clara.io supports importing and exporting both FBX, glTF and OBJ files with ease.
Threekit is product visualization software that creates photorealistic images, interactive 3D and augmented reality experiences that help businesses sell more. To learn more, please schedule some time with one of our teammates.