AMF Format: The XML Standard for 3D Printing Beyond STL
The AMF (Additive Manufacturing File Format) is an open XML-based standard developed to overcome the severe limitations of STL files in 3D printing workflows. Standardized as ISO/ASTM 52915 in 2013, AMF was designed as the official successor to STL — adding support for multiple materials, colors, curved triangle surfaces, and metadata that STL cannot carry. Despite its technical superiority over STL, AMF has been largely eclipsed by 3MF in adoption, but it remains an important format in academic, medical, and multi-material additive manufacturing contexts.
Why STL Was Not Enough
The STL format, developed in 1987, encodes 3D models as a list of flat triangles. This simple structure made STL easy to implement in early 3D printing software, but by the 2010s its limitations had become a significant bottleneck:
- No color or texture — STL stores only geometry, nothing about appearance
- No material information — a single file describes only one material
- Flat triangles only — curved surfaces must be approximated by many small triangles, leading to large files with visible faceting
- No metadata — no way to embed the author, scale, or print settings
- No units — distances in STL are unitless, causing scale confusion
- No support for multi-part assemblies — no concept of separate components
AMF was designed to solve every one of these problems within a clean, human-readable XML structure.
AMF File Structure
An AMF file is a valid XML document with a root <amf> element:
<?xml version="1.0" encoding="utf-8"?>
<amf unit="millimeter" version="1.1">
<metadata type="name">Customized Prosthetic Bracket</metadata>
<metadata type="author">Engineering Team</metadata>
<metadata type="description">Multi-material bracket with rigid frame and flexible joint</metadata>
<material id="1">
<metadata type="name">Rigid PLA</metadata>
<color>
<r>0.2</r><g>0.6</g><b>0.9</b>
</color>
</material>
<material id="2">
<metadata type="name">Flexible TPU</metadata>
<color>
<r>0.9</r><g>0.4</g><b>0.2</b>
</color>
</material>
<object id="1">
<mesh>
<vertices>
<vertex><coordinates><x>0</x><y>0</y><z>0</z></coordinates></vertex>
<vertex><coordinates><x>10</x><y>0</y><z>0</z></coordinates></vertex>
<vertex><coordinates><x>10</x><y>10</y><z>0</z></coordinates></vertex>
<vertex><coordinates><x>0</x><y>10</y><z>0</z></coordinates></vertex>
<vertex><coordinates><x>5</x><y>5</y><z>8</z></coordinates></vertex>
</vertices>
<volume materialid="1">
<metadata type="name">Rigid Frame</metadata>
<triangle>
<v1>0</v1><v2>1</v2><v3>4</v3>
</triangle>
<triangle>
<v1>1</v1><v2>2</v2><v3>4</v3>
</triangle>
</volume>
<volume materialid="2">
<metadata type="name">Flexible Joint</metadata>
<triangle>
<v1>2</v1><v2>3</v2><v3>4</v3>
</triangle>
</volume>
</mesh>
</object>
<constellation id="1">
<instance objectid="1">
<deltax>0</deltax><deltay>0</deltay><deltaz>0</deltaz>
<rx>0</rx><ry>0</ry><rz>0</rz>
</instance>
</constellation>
</amf>
Several structural concepts deserve attention:
Units — the unit attribute of <amf> specifies the measurement unit: millimeter, inch, feet, meter, or micron. This is a major improvement over STL, where units are undefined.
Multiple volumes — a single <object> can contain multiple <volume> elements, each referencing a different materialid. This is how AMF encodes multi-material objects: different regions of the same mesh are assigned different materials.
Constellation — the <constellation> element positions multiple object instances in a build plate layout, allowing you to arrange many parts within a single AMF file.
Curved Triangles
The most technically innovative feature of AMF is its support for curved triangles (called "patches") through the <edge> element. Standard STL can only encode flat triangles; to represent a sphere, you need hundreds or thousands of triangles. AMF allows each triangle edge to carry a curvature parameter:
<triangle>
<v1>0</v1><v2>1</v2><v3>2</v3>
<d1dx>0.5</d1dx><d1dy>0.866</d1dy><d1dz>0</d1dz>
<d2dx>-0.5</d2dx><d2dy>0.866</d2dy><d2dz>0</d2dz>
<d3dx>0</d3dx><d3dy>-1</d3dy><d3dz>0</d3dz>
</triangle>
The d1dx/d1dy/d1dz components define the normal direction at each vertex, which the printer firmware uses to interpolate a smooth curved surface between the vertices. In theory, a sphere can be represented with just a handful of curved AMF triangles instead of thousands of flat STL triangles. In practice, most slicers still flatten AMF curved patches back to flat triangles before processing — but as slicer technology matures, true curved surface support could significantly reduce file sizes for smooth organic shapes.
Color and Gradients
AMF supports per-vertex colors and material blending, enabling color gradients within a single volume:
<vertex>
<coordinates><x>0</x><y>0</y><z>0</z></coordinates>
<color><r>1.0</r><g>0.0</g><b>0.0</b><a>1.0</a></color>
</vertex>
<vertex>
<coordinates><x>10</x><y>0</y><z>0</z></coordinates>
<color><r>0.0</r><g>0.0</g><b>1.0</b><a>1.0</a></color>
</vertex>
The printer interpolates colors across the triangle surface, which is particularly relevant for full-color binder jetting printers (like the ProJet or HP Multi Jet Fusion) and multi-extrusion FDM printers with color mixing capability.
Texture Support
AMF also supports UV-mapped textures, encoded as base64 data directly in the XML:
<texture id="1" width="64" height="64" depth="1" type="grayscale">
base64encodedpixeldatahere...
</texture>
And referenced from triangle elements:
<triangle>
<v1>0</v1><v2>1</v2><v3>2</v3>
<texmap rtexid="1">
<utex1>0.0</utex1><vtex1>0.0</vtex1>
<utex2>1.0</utex2><vtex2>0.0</vtex2>
<utex3>0.5</utex3><vtex3>1.0</vtex3>
</texmap>
</triangle>
Compression
AMF files can be delivered as plain XML or compressed inside a ZIP archive (with the .amf extension retained). The ZIP compression typically reduces AMF file sizes by 70-90%, making compressed AMF files competitive with binary STL in file size while retaining all the semantic richness of the XML content.
# Compress AMF
zip -9 model.amf.zip model.amf
mv model.amf.zip model.amf # Rename back to .amf
# Decompress AMF
unzip -p model.amf > model_uncompressed.xml
Most AMF-compatible slicers and tools handle both compressed and uncompressed variants transparently.
Working with AMF in Python
import xml.etree.ElementTree as ET
tree = ET.parse('model.amf')
root = tree.getroot()
ns = {'amf': 'http://www.w3.org/AMF'}
# Parse all vertices
for obj in root.findall('object'):
mesh = obj.find('mesh')
vertices = []
for vertex in mesh.findall('vertices/vertex'):
coords = vertex.find('coordinates')
x = float(coords.find('x').text)
y = float(coords.find('y').text)
z = float(coords.find('z').text)
vertices.append((x, y, z))
# Count triangles per volume
for volume in mesh.findall('volume'):
mat_id = volume.get('materialid', 'default')
tri_count = len(volume.findall('triangle'))
print(f"Volume (material {mat_id}): {tri_count} triangles")
print(f"Total vertices: {len(vertices)}")
AMF vs STL vs 3MF
| Feature | AMF | STL (binary) | 3MF |
|---|---|---|---|
| Open standard | ✅ ISO/ASTM 52915 | ✅ de facto | ✅ 3MF Consortium |
| Human-readable | ✅ XML | ❌ Binary | ❌ XML in ZIP |
| Multi-material | ✅ Yes | ❌ No | ✅ Yes |
| Color support | ✅ Per-vertex + texture | ❌ No | ✅ Full color |
| Curved surfaces | ✅ Yes | ❌ No | ❌ No |
| Metadata/units | ✅ Yes | ❌ No | ✅ Yes |
| Slicer support | ⚠️ Limited | ✅ Universal | ✅ Broad |
| Print settings | ❌ No | ❌ No | ✅ Yes |
Slicer Support and Limitations
Despite its technical richness, AMF adoption in consumer slicers has been tepid. PrusaSlicer supports AMF import (though it typically ignores multi-material assignments from AMF). Cura supports AMF with basic geometry. The major bottleneck is that curved triangle interpolation is not implemented in any major consumer slicer — all flatten to triangles on import.
Professional slicers for industrial machines (particularly binder jetting and photopolymer systems) tend to have better AMF support, especially for color and multi-material workflows.
Converting AMF Files
Most 3D modeling applications that support 3MF and STL also support AMF to some degree. In Blender, AMF import/export requires a third-party add-on (such as the blender-additive-manufacturing plugin). FreeCAD has native AMF support through its Mesh workbench.
For batch conversion on the command line, meshlabserver (part of MeshLab) can convert between AMF, STL, OBJ, PLY, and other formats:
meshlabserver -i model.amf -o model.stl
Conclusion
AMF represents a thoughtfully designed evolution of STL, solving its most frustrating limitations — no units, no color, no multi-material, no metadata. Its curved triangle patches are technically elegant, and its ZIP compression keeps file sizes manageable. The reasons it lost the market adoption battle to 3MF are largely ecosystem-driven: 3MF had stronger industry backing from Microsoft, Autodesk, HP, and Ultimaker, and its architecture was designed with the practical realities of slicer software in mind. AMF remains valuable in academic contexts, medical additive manufacturing, and anywhere the ISO standard pedigree and XML transparency matter. Understanding AMF deepens your appreciation of what 3D printing file formats must carry — and why STL, for all its ubiquity, remains technically insufficient for modern fabrication workflows.
Related conversions
Document conversions that follow this topic naturally: