Explained

3D file formats: what are they and which one to choose?

Choosing the right 3D file format can make all the difference for your project. This article breaks down the key formats—STL, OBJ, GLTF, and more—helping you select the best option for your business needs and workflows.

Jack Wang · Feb 9, 2023

Introduction

KIRI Engine can export your 3D scans in a variety of 3D file formats: *.STL, *.OBJ, *.XYZ, *.PLY, *.GLTF, *.GLB, and *.USDZ. Do you know which file format to choose and why?

Every format is usually optimized for a purpose, so it is important to know what they are and how they compare.

This article aims to give you the essentials about these different 3D file formats so you know which one to pick when exporting your 3D scan data.

STL (Standard Tessellation Language)

Starting with a very popular file format: the STL. Developed by 3D Systems in the 1980s for 3D printing purposes, the STL is the most common format you’ll find in online model repositories.

The STL describes 3D objects by tessellation. It approximates the surface of 3D models with a network of interconnecting triangles, a structure known as mesh, being a simple and convenient way to represent 3D objects.

Yet, the level of detail and exactness in STL 3D models is dependent on the number of triangles used for describing a surface. Highly detailed 3D models require a denser mesh of triangles, the same way high-resolution images require a higher pixel density for better quality.

Overall, the STL format is generally lightweight in terms of file size as it does not carry any additional information like color and dimensional units, being ideal for storing and sharing models. However, the size of STL files grows exponentially with the level of detail due to the more refined and denser meshes required.

OBJ (Wavefront Object)

The OBJ format is yet another popular file format for 3D models. Created by Wavefront Technologies in the 1990s, it also approximates the surface of 3D models with meshes, but in a way that is more versatile than the STL.

An OBJ model describes 3D surfaces with polygonal meshes and free-form curves instead of triangular meshes. It is a more efficient way to store highly-detailed 3D models as the file size will not increase significantly according to the mesh density.

OBJ files can also convey color and texture information, making them especially useful for applications like game development and multicolor 3D printing. It is also worth noting that most STL-compatible software programs are also compatible with OBJ files.

XYZ

The XYZ file format offers a different approach to storing 3D data than the STL and the OBJ. Instead of tessellation, XYZ stores point cloud data, which is a collection of individual points in space captured by 3D scanners. The Cartesian coordinates (X, Y, and Z) of each captured point are stored in a plain text file, which can be converted to 3D models and scenes by appropriate software.

Interestingly enough, the XYZ format was not designed for 3D scanning. Created by the Minnesota Supercomputer Center in 1990, it was created as a chemical file format to store the positions of atoms and molecules in 3D.

As of today, XYZ is the simplest file format for recording point cloud data obtained from 3D scanning. Therefore, it can be easily read and written by a range of different software. Still, its simplicity comes at the expense of carrying little to no additional information other than the position in space.

PLY (Polygon File Format)

The Polygon File Format (PLY) was created at the Stanford Computer Graphics Laboratory in the 1990s, this time specifically for 3D scanning applications.

Like the XYZ format, it also stores point cloud data. However, instead of registering simple points and vertices, the PLY format uses nominally flat polygons to convey 3D data. This makes it capable of storing more properties than the XYZ format, including surface normals, color, texture, and transparency.

GLTF & GLB (GL Transmission Format)

The GLTF (*.glTF) and GLB (*.glb) extensions are variants of the same file format: the GL Transmission Format. It is a relatively new format, developed by the Khronos Group in 2015 as a standardized format for 3D scenes.

GLTF and GLB files can contain multiple 3D properties, such as models, lighting, shaders, materials, node hierarchy, cameras, scenes, and even animations. For this reason, they are well suited for game development, virtual and augmented reality (VR/AR), and for embedding digital environments in websites.

The main difference between GLTF and GLB lies in their structures. GLTF is based on JSON (JavaScript Object Notation), and data like texture, shaders, and animations are stored in external files. The GLB, on the other hand, is a binary version of the GLTF and contains all the information in one compressed file.

As such, GLB files are more lightweight and easier to upload than their GLTF counterparts. Yet, the GLB format cannot convey as many details and complexities as the GLTF, creating a typical trade-off between quality and file size.

USDZ (Universal Scene Description)

USDZ is an uncompressed zip version of the USD (Universal Scene Description), a file format developed by Pixar back in 2015. Like the GLTF/GLB formats, it describes entire 3D scenes and contains multiple 3D files within.

In 2018, Apple announced that USDZ would be the standard format for its augmented reality (AR) applications. USDZ files are essentially zip archives, making them easy to share - and even more so in macOS and iOS platforms.

Still, being zip archives, USDZ files cannot be edited directly. This means that all the individual files within the archive must be extracted and worked on separately. It is also worth mentioning that Android does not currently support USDZ.

So, which 3D file format should I use?

KIRI Engine can export your 3D scans in several 3D file formats, but the final choice will almost always depend on the application and your particular workflow.

However, as a rule of thumb:

  • If you want to create and share individual 3D models, whether for 3D modeling or 3D printing purposes, STL and OBJ are the ones to go for.
  • For more versatility in terms of post-processing your 3D scans, use point cloud formats such as XYZ and PLY.
  • For applications involving entire 3D scenes and multiple assets, GLTF/GLB (for Android devices) and USDZ (for Apple devices) formats are the right call.