There are so many strings of letters (and numbers) associated with 3D model types, it can feel impossible to decipher. In this article, you’ll learn the differences between the most common file types used in 3D printing. We’ll compare those used to store and share 3D models, including STL, OBJ, AMF, and 3MF, along with their less common cousins. We’ll also explain how these relate to other 3D printing file types, like G-code, which is used to control how a 3D printer produces physical objects.

Whether you’re new to the topic, an experienced hobbyist, or using 3D printing professionally, we’ll aim to clear up common misconceptions and predict how things may change in the future.

In order to appreciate the differences between the various types of file formats used in 3D printing, it’s worth understanding a typical workflow (i.e. the individual steps required to produce a printed item). So, before we get to our discussion of the various formats, let’s do a quick overview of the process to produce a 3D printed part and how it relates to file types.

Back to Contents

The Main 3D Printing File Formats/Types

The 3D Printing Workflow

It all starts with a model
It all starts with a model (Source: Spencer Wright)

3D printing takes a virtual model and creates it, layer by layer, as a physical object. So, the first thing you need is a model to print.

Modeling

A 3D model is a description of the item to be printed, normally produced using dedicated CAD or modeling software. This model describes an object’s surface shape and dimensions, as well as optional details such as internal structure, materials, color, texture, and so. There are many techniques used to define such models and even more ways to store the resulting data.

There are literally hundreds of different file formats for describing 3D models. Some are proprietary formats that are associated with a particular program or company and therefore limited in their transferability, while others are generally accepted across a range of software tools. To make sharing models easy, files that are open-source or neutral formats are the most widely used for 3D printing, though proprietary formats are a powerful asset if you’re designing within a specific software suite. In the sections below, we’ll look in more detail at the pros and cons of the most common 3D model file types and a few alternatives.

Slicing

A simplified 3D printing workflow showing the main 3D printing file types and other data required
Once you have a model, it needs to be processed by slicing software (Source: Ken Douglas via All3DP)

The next step in the workflow is to convert the 3D model into something printable using a 3D slicer. To do this, the software requires additional information about the characteristics of the printer (size, speed, and method of printing), material properties, and a host of other data defining slicer settings (quality, supports, and scale, among others).

G-code

The output of this step is a file containing toolpath information to instruct the printer what to do. The most common toolpath file format is G-code, and we’ll see how this (and alternative formats) relate to the underlying 3D models and how they may evolve in the future.

Now that you have a sense of the entire workflow and the relevant file formats in each step, let’s do a deeper dive into the formats themselves.

Back to Contents

Advertisement
Advertisement
Advertisement

3D Model File Formats

3D models are used for everything from medical imaging and engineering simulations to gaming and film special effects. The software producing these models stores the associated data in different formats, and not all are ideally suited to 3D printing.

CAD programs also store additional supporting data, including internal dimensions, design constraints, editing history, or perhaps lighting or animation data (which are not relevant to defining a 3D print).

As a result, simple open-source file formats that minimize irrelevant data have come to dominate the 3D printing space. Unfortunately, as 3D printing evolves and becomes more sophisticated, exactly what data is relevant has also changed and presents challenges for the future of the industry.

Ultimately, these models need to be sliced into the thin layers that characterize 3D printing, and this is easiest to achieve when the model’s shape is defined as a mesh of tessellated tiles. Typically, these tiles are triangular in shape, but other polygons can be used too.

This approach of “tiling” a surface is very flexible, but it does so at the expense of being precise. For example, a CAD program might describe an exact sphere of a given radius centered on stated coordinates, but the equivalent mesh would be only an approximation of this shape.

For 3D printing, the most common type of model file is the STL format, which uses a mesh of triangles to define surfaces. Millions of STLs can be found on sharing sites such as ThingiverseMyMiniFactory, and Cults, but these sites do also support other 3D model formats.

Let’s compare the main options and see why STLs are not always the best choice.

Back to Contents

Advertisement
The Main 3D Printing File Formats/Types

STL: The De Facto Standard

STL files store 3D models as a mesh of triangles
STL files store 3D models as a mesh of triangles (Source: Wikimedia Commons)

The STL format was invented back in 1987 by 3D Systems, a company founded by 3D printing pioneer Chuck Hull. It stands for stereolithography, one of the earliest forms of 3D printing.

STL files describe 3D objects as a mesh of tessellated triangular “tiles”, each defined by the coordinates of its vertices. For this reason, STL is often referred to as “Standard Triangle Language” or “Standard Tessellation Language”. A reasonably complex model with curved shapes could be comprised of tens of thousands of triangles. Adding more triangles improves the resolution of the shape but results in much bigger STL files.

Despite this potential drawback, the simplicity and long heritage of the STL have ensured that it’s, by far, the most dominant format used in 3D printing. It’s supported by virtually all CAD and slicer programs and dominates model-sharing websites.

In addition to the file size issue, the STL format has several other significant drawbacks. A major issue is that it does not enforce checks on geometry or explicitly link one triangle with another. The resulting “triangle soup” can be slow to process and prone to errors.

STL files frequently have holes or gaps (enclosed surfaces that aren’t “watertight”) or are otherwise non-manifold, meaning that the described geometry can’t exist physically. Consequently, many STL files cannot be sliced or printed, leading to a large market in tools and software designed to repair and help fix these inherent issues.

Finally, STLs only describe shapes and do not specify color, material, scale, or any other contextual info. This makes the format unsuitable for high-precision or multicolor 3D printing.

Pros

  • Is a neutral and simple to implement 3D model format
  • Has become a de-facto standard and is widely supported by almost every CAD tool, slicer, and model-sharing website

Cons

  • Does not support colors or other material information and so is not suited to printers with multicolor or multi-material capability
  • Does not contain scaling information, resulting in confusion about the default dimensions (i.e. millimeters, inches, or another unit of measurement)
  • Does not contain any other metadata about the design (designer or copyright, for example)
  • Is error-prone due to issues from the simple tesselation method preventing the model from being sliced or printed successfully
  • Requires enormous file sizes for (or cannot support) the ultra-high resolution or smooth finish possible in many modern printers
  • May become obsolete in the future as more modern formats gain traction among users

Back to Contents

Advertisement
Advertisement
Advertisement
The Main 3D Printing File Formats/Types

OBJ: The Second Most Widely Used

Image of: OBJ: The Second Most Widely Used
Unlike STL, OBJ files can store color and other surface data (Source: 3D Lab Academy via Turbo Squid)

The OBJ format, also known as the Wavefront Object, was first defined in the 1990s by Wavefront Technologies and aimed to improve on STL in several significant ways.

The first improvement is that it’s capable of encoding smoother surfaces with fewer tiles. It does this by using not just triangular tiles but other polygons (such as quadrilaterals or hexagons), too. It can also use additional mathematical models to further improve shape definition.

Secondly, it’s capable of describing color, material, and texture information, although to take full advantage of this, additional materials list (MTL) and image (PNG) files must be separately associated with it.

The OBJ format is a very popular way to store 3D models with color and texture information and is commonly used for video games and film special effects. As a result, it’s a rich source of designs for 3D printing, and almost every slicer supports it. It’s also the second most popular format for model-sharing websites.

Pros

  • Like STL, is an open-source and neutral file standard with widespread software support and availability of already-designed models
  • Is the simplest file format to support multiple colors and materials
  • Has improved model resolution and therefore quality over STL
  • Stores other metadata without additional files

Cons

  • Causes workflow issues due to having separate files for color and texture definition
  • Provides no scale information
  • Can result in files that are complex to rework

Back to Contents

Advertisement
Advertisement
Advertisement
The Main 3D Printing File Formats/Types

AMF: Prematurely Dubbed "STL 2.0"

AMF uses curved triangles to improve how shapes are described
AMF uses curved triangles to improve how shapes are described (Source: SolidSmack)

By the 2000s, the STL and OBJ formats were becoming an obstacle to advanced 3D printing, and the search for more modern alternatives began in earnest. AMF, short for “Additive Manufacturing File”, was introduced in 2011 and positioned as “STL 2.0”. It’s an XML-based format designed to be faster, less error-prone, and capable of storing color, material, and texture information (without using external files), among many other attributes.

AMF became an official ISO (52915) standard in 2013 and was updated to version 1.2 in 2020. It’s a huge advance on both STL and OBJ. Not only does it address issues of missing materials and other metadata, but it also encodes 3D shapes in a much more sophisticated manner. The format uses curved triangles that must conform to strict rules of topology and linkage; this almost completely eliminates a host of model issues that plague STL files in particular.

Driven by an expert committee formed by the international standards organization ASTM and with the initial support of SolidWorks and Autodesk, AMF looked well-placed to push STL into history. Adoption, however, has been slow, and its future is now uncertain. It has been suggested that the AMF committee was a little too hasty in defining important points and did not consult enough with key manufacturers and service providers in the 3D printing industry.

Several CAD packages, as well as the main slicers, support the AMF format, although its use is not necessarily encouraged by all of these vendors. This latter point is perhaps due to the presence of a fast-emerging competitor, as we’ll see in the following section.

Pros

  • Is a modern, extensible XML-based file standard that can evolve to keep up with new requirements
  • Stores material, color, and other metadata without additional files
  • Uses advanced means of defining and storing shape geometry, leading to better resolution and fewer errors

Cons

  • Has poor levels of uptake and associated support by CAD and slicer software
  • Is not universally supported by all players in the 3D printing industry
  • Is facing an uncertain future in light of competition from the new alternative 3MF

Back to Contents

Advertisement
Advertisement
The Main 3D Printing File Formats/Types

3MF: The Potential New Standard

3MF files are XML-based documents that store everything required to go from model to print
3MF files are XML-based documents that store everything required to go from model to print (Source: 3MF Consortium via GitHub)

Starting as an internal project, Microsoft set up the 3MF (3D Manufacturing Format) Consortium in 2015 and made their underlying software open source. The goal was to address what they saw as deficiencies (albeit very technical ones) with AMF and, more importantly, to drive an evolving open-source standard with the full involvement of all key influencers and players in the 3D printing world.

The latter point has proved to be key in its rapid growth. Consortium members include Autodesk, 3D Systems, Stratasys, Dassault Systemes, Ultimaker, Siemens, Simplify3D, HP, Shapeways, and Prusa Research, all of whom are actively working towards both adoption and ongoing improvement.

In a further move to establish 3MF as truly open source (and not under undue influence from Microsoft), the consortium became a Linux Foundation member in 2020 and handed full control to an independently elected Executive Director.

Like AMF, 3MF is an XML-based standard and, at a 30,000-ft level, they’re much the same. 3MF, however, has more exacting standards for numerical precision and the reduction of rounding errors that often cause model issues. 3MF is also more geared towards gathering an entire picture of the end-to-end workflow. For example, in addition to the underlying 3D model, a 3MF file can store information about printer and slicer settings, including custom supports.

In a relatively short period of time, 3MF has moved well ahead of AMF in terms of support both for CAD tools and slicers. Several organizations (including Prusa) even recommend their users drop AMF in favor of 3MF, even though they support both.

Pros

  • Is an open standard with strong industry backing
  • Intrinsically fixes many of the sources of model geometry errors compared to other formats (especially STL)
  • Includes not just all relevant model features for 3D printing but additional information, including designer, licensing information, and manufacturing data (slicer settings and support structures, for example), among other information.
  • Can incorporate security and encryption for parts of models that are IP sensitive

Cons

  • Is not yet fully compatible across platforms (for example, a 3MF file saved by PrusaSlicer will not necessarily be fully understood or translated by Cura)
  • Is regarded by some as too complex for simple applications, meaning that adoption by entry-level CAD programs is relatively slow

Back to Contents

Advertisement
Advertisement
The Main 3D Printing File Formats/Types

Other 3D Model Formats

X3D is often used as a format for scientific models
X3D is often used as a format for scientific models (Source: Paul Paukstelis via YouTube)

We’ve covered the most commonly supported 3D model file formats used in printing, but there are many others that are either supported directly by slicers or are relatively easy to convert to one of the formats above.

VRML & X3D

VRML (Virtual Reality Modeling Language) and its successor X3D are the most popular open-source formats for interactive 3D vector graphics. They’re typically used in gaming, special effects, and visualization for scientific, engineering, and medical purpose. Many slicers (e.g. Cura) can read X3D files directly and simply ignore any data that’s not relevant.

Unity

Another excellent source of 3D models are those developed for use on Unity – the popular cross-platform game engine developed by Unity Technologies. The most common file formats on Unity include OBJ, FBX, and Blender. The latter two of these are proprietary, which means support from slicers is limited. However, they can be converted by using dedicated tools. Check out our articles on converting FBX to STLFBX to OBJ, and Blender to STL to learn more.

PLY

PLY, also known as the “Polygon File Format” or the “Stanford Triangle Format”, was principally designed to store data from 3D scanners and is used extensively in the dental industry. Although not commonly supported by the major slicers, many more dedicated offerings do so directly (Formware, for example).

STEP & IGES

STEP and IGES are two significant open-source file standards that are intended for interoperability between engineering applications. Instead of a mesh representation, these formats use NURBS, which is a more complex but more precise approach. Again, the typical approach is to convert these to 3MF (or STL or OBJ), although there’s a growing trend in specialized professional markets for these to be used directly.

Other Formats

Of course, there are many other formats out there, each serving a particular niche or community. Several of the main slicers also support Collada (DAE files), Open Compressed Triangle Mesh (CTM), or glTF Binary (GLB), to name but a few.

Back to Contents

Advertisement
Advertisement

Toolpath Files

After a 3D model has been combined with printer and materials data as well as slicer settings, the slicing software processes all of this information and outputs a set of instructions used by a 3D printer to produce a physical item.

We usually refer to this as “outputting G-code”, but G-code is only one example of what are generically referred to as toolpath files. Not all 3D printers use G-code, and we’ll look briefly at why this is the case in the following sections.

All toolpath files are specific to the machines and materials they were generated for. They won’t work on other machines and may even damage them.

It’s possible to reverse-engineer toolpath files to derive an underlying 3D model (see our article on converting from G-code to STL) or some of the original slicer settings, but a full, accurate reconstruction of the complete original design is hard to achieve.

Back to Contents

Advertisement
The Main 3D Printing File Formats/Types

G-code: The Universal Standard

G-code is the most common standard for driving 3D printers by far
G-code is the most common standard for driving 3D printers by far (Source: Repetier)

G-code is even older than STL but has stood the test of time better. Development work started in the MIT Servomechanisms Laboratory in the late 1950s, and the first standardized version was agreed to in the 1960s. G-code is used to run all sorts of computer numerically controlled (CNC) equipment and comes in various dialects to support different machine types.

G-code shares a common core of commands starting with the letter G (from which the standard takes its name) and M (for miscellaneous) that instruct a machine which actions to take. Over time, additional commands, beginning with these and other letters, have been added. The flexibility for organizations to add to the core standardized command list has allowed G-code to evolve and to keep up with the times. As a result, G-code is firmly embedded as the toolpath file format of choice for the vast majority of printers.

For FDM 3D printing, the most significant factor has been the emergence of standard firmware (Marlin, for example). The firmware on a 3D printer reads the G-code file and implements each of the commands, based on its own default settings, to send appropriate signals to the stepper motors, fans, heater blocks, and other printer components.

For basic and hobby-level printers, these commands are executed in sequence, but there’s no mechanism to check that they’ve been completed as expected (known as open-loop control). This isn’t necessarily an issue with G-code; it’s more a question of what the printer’s hardware is capable of. At the top end of the market, however, researchers are working to optimize the printing process by “closing” that control loop.

For example, if a controller detects part of the printer or material drifting out of specification, it can make changes on the fly to how the object is printed in order to compensate. Such optimization calls for a very integrated 3D printing workflow that one day may make G-code redundant for certain printing processes.

Pros

  • Is a veritable solution with no serious drawbacks, has stood the test of time, and continues to evolve
  • Is the outright standard for FDM 3D printing and completely dominates the space, making it well understood with a host of resources to generate, simulate, and test its use

Cons

  • Is less suited to 3D printing methods that are heavily image-based (DPM, for example)
  • May be less appropriate for sophisticated slicing and production optimizing solutions that may become common for future high-end 3D printing processes

Back to Contents

Advertisement
Advertisement
The Main 3D Printing File Formats/Types

Other Toolpath Formats

Most DLP printers use formats oriented around images of each slice
Most DLP printers use formats oriented around images of each slice (Source: Rage_Of_The_Ancients via Reddit)

Just as with 3D model files, 3D printer toolpath files come in various formats. What they have in common is a way of representing a model, cut into slices, and instructions to tell the the printer how to reproduce those slices. Let’s look at a couple of examples.

S3G & X3D

S3G and X3G files are used by Makerbot machines and have their roots back in the days when RepRap 3D printers were controlled with simple Arduino microcontrollers. S3G is an acronym for “Sanguino3 Gcode” – a simplified and streamlined variant of G-code that’s easier for the printer to handle. A later improved version was named X3G. Most mainstream slicers can output files in this format, but they have limited general applicability.

PHOTON & CBDDLP

DLP printers use a different, more image-based process to create their prints, so native G-code (geared towards moving motors) is less appropriate. Their toolpath files are therefore oriented towards managing these images. The resulting file formats tend to be proprietary, although they conform to the same basic principles. Examples include Photon and CBDDLP file formats.

G-code commands might still have a role to play, however, and are often embedded behind the scenes for the best of both worlds (e.g. for manual moving or testing of printer hardware).

Back to Contents

Advertisement
Advertisement
The Main 3D Printing File Formats/Types

The Formats Summarized

An example of a multicolor 3D print supported by AMF and 3MF
An example of a multicolor 3D print supported by AMF and 3MF (Source: 3D Systems)

As we’ve seen, there are two main families of 3D printer files. 3D model files contain a digital representation of what is to be printed, while toolpath files are output from slicer software and instruct printers how to make a 3D model. In both cases, there are several different file formats with pros and cons for each, in particular for the 3D model files.

The ubiquitous STL format dominates the 3D model space and looks set to do so for some time. It will survive because it’s good enough most of the time. In this case, “most of the time” means relatively simple single-color material prints produced by hobbyists, enthusiasts, and small workshops at a relatively small scale.

The OBJ format overcomes several of STL’s issues and also supports multi-color printing (albeit in a clunky way). AMF was invented to take the place of both of these formats but is already losing ground to the relatively new 3MF standard. 3MF has strong industry backing from high-end to consumer-level suppliers and has clear advantages in terms of supporting the future direction of 3D printing across the board, especially in the professional space.

For the majority of 3D printing applications, toolpath files will continue to be dominated by the veritable G-code. It may be old, but it has the power to evolve, and there are no serious shortcomings holding it back. 3D printing processes that are strongly image-based (as opposed to moving a print head across an XY plane) tend not to use native G-code and have instead adopted proprietary formats, but even with these, G-code commands are often still found lurking behind the scenes.

Back to Contents

Advertisement
Advertisement
The Main 3D Printing File Formats/Types

Predictions for the Future

Image of: Predictions for the Future
The future demands of 3D printing might even include structures in space! (Source: AI SpaceFactory)

Many commentators, including industry icons like Joseph Prusa, have predicted the death of STL. However, these predictions may be somewhat premature.

STL isn’t a perfect format, but it’s good enough for most use cases, and the volume of ready-made designs means it’s unlikely to lose its market dominance. As most hobbyist 3D printing looks set to be single color and material for years, and as slicers get better at handling STL file errors, it looks set to continue to dominate for some time.

Having said that, explicit support and encouragement for 3MF is growing very quickly. It will soon become a mainstay of the professional market, and we’re already seeing the trickle down into the consumer end.

On 3D printing forums the comment “STL please?” is much parodied. How long it will be before that changes to “3MF please?” is debatable, but it’s likely to happen at some point in the future.

On the other hand, there’s nothing to suggest that G-code will lose its position of dominance. In some instances, there may be alternatives, and at the top-end of the market, sophisticated offerings may squeeze it out. But, for the long foreseeable future, G-code is here to stay.

Back to Contents

Advertisement
Advertisement

License: The text of "The Main 3D Printing File Formats of 2023" by All3DP is licensed under a Creative Commons Attribution 4.0 International License.

Stay informed with notifications from All3DP.

You get a notification when a new article is published.

You can’t subscribe to updates from All3DP. Learn more… Subscribe to updates

You can’t subscribe to updates from All3DP. Learn more…

Advertisement