Additive Manufacturing File Format

Last updated
Additive Manufacturing Format
AMF icon.png
AMF icon
Filename extension .amf
Internet media type application/x-amf
Developed by ASTM/ISO
Initial release May 2, 2011 (2011-05-02)
Latest release
1.2
Standard ISO / ASTM52915 - 16 [1]

Additive Manufacturing File Format (AMF) is an open standard for describing objects for additive manufacturing processes such as 3D printing. The official ISO/ASTM 52915:2016 [1] [2] standard is an XML-based format designed to allow any computer-aided design software to describe the shape and composition of any 3D object to be fabricated on any 3D printer. Unlike its predecessor STL format, AMF has native support for color, materials, lattices, and constellations.

An open standard is a standard that is publicly available and has various rights to use associated with it, and may also have various properties of how it was designed. There is no single definition and interpretations vary with usage.

3D printing additive process used to make a three-dimensional object

3D printing is any of various processes in which material is joined or solidified under computer control to create a three-dimensional object, with material being added together, typically layer by layer. In the 1990s, 3D printing techniques were considered suitable only for the production of functional or aesthetical prototypes and a more appropriate term was rapid prototyping. Today, the precision, repeatability and material range have increased to the point that 3D printing is considered as an industrial production technology, with the name of additive manufacturing. 3D printed objects can have a very complex shape or geometry and are always produced starting from a digital 3D model or a CAD file. There are many different 3D printing processes, that can be grouped into seven categories:

International standards are technical standards developed by international standards organizations. International standards are available for consideration and use worldwide. The most prominent organization is the International Organization for Standardization (ISO).

Contents

Structure

An AMF can represent one object, or multiple objects arranged in a constellation. Each object is described as a set of non-overlapping volumes. Each volume is described by a triangular mesh that references a set of points (vertices). These vertices can be shared among volumes belonging to the same object. An AMF file can also specify the material and the color of each volume, as well as the color of each triangle in the mesh. The AMF file is compressed using the zip compression format, but the ".amf" file extension is retained. A minimal AMF reader implementation must be able to decompress an AMF file and import at least geometry information (ignoring curvature).

Basic file structure

The AMF file begins with the XML declaration line specifying the XML version and encoding. The remainder of the file is enclosed between an opening <amf> element and a closing </amf> element. The unit system can also be specified (millimeter, inch, feet, meter or micrometer). In absence of a units specification, millimeters are assumed.

Within the AMF brackets, there are five top level elements. Only a single object element is required for a fully functional AMF file.

  1. <object> The object element defines a volume or volumes of material, each of which are associated with a material ID for printing. At least one object element must be present in the file. Additional objects are optional.
  2. <material> The optional material element defines one or more materials for printing with an associated material ID. If no material element is included, a single default material is assumed.
  3. <texture> The optional texture element defines one or more images or textures for color or texture mapping, each with an associated texture ID.
  4. <constellation> The optional constellation element hierarchically combines objects and other constellations into a relative pattern for printing.
  5. <metadata> The optional metadata element specifies additional information about the object(s) and elements contained in the file.

Geometry specification

The format uses a Face-vertex polygon mesh layout. Each top-level <object> element specifies a unique id. The <object> element can also optionally specify a material. The entire mesh geometry is contained in a single mesh element. The mesh is defined using one <vertices> element and one or more <volume> elements. The required <vertices> element lists all vertices that are used in this object. Each vertex is implicitly assigned a number in the order in which it was declared, starting at zero. The required child element <coordinates> gives the position of the point in 3D space using the <x>, <y> and <z> elements. After the vertex information, at least one <volume> element must be included. Each volume encapsulates a closed volume of the object, Multiple volumes can be specified in a single object. Volumes may share vertices at interfaces but may not have any overlapping volume. Within each volume, the child element <triangle> is used to define triangles that tessellate the surface of the volume. Each <triangle> element will list three vertices from the set of indices of the previously defined vertices given in the <vertices> element. The indices of the three vertices of the triangles are specified using the <v1>, <v2> and <v3> elements. The order of the vertices must be according to the right-hand rule, such that vertices are listed in counter-clockwise order as viewed from the outside. Each triangle is implicitly assigned a number in the order in which it was declared, starting at zero.

Color specification

Colors are introduced using the <color> element by specifying the red, green, blue and alpha (transparency) channels in the sRGB color space as numbers in the range of 0 to 1. The <color> element can be inserted at the material, object, volume, vertex, or triangle levels, and takes priority in reverse order (triangle color is highest priority). The transparency channel specifies to what degree the color from the lower level is blended in. By default, all values are set to zero.

RGBA color space

RGBA stands for red green blue alpha. While it is sometimes described as a color space, it is actually the three-channel RGB color model supplemented with a 4th alpha channel. Alpha indicates how opaque each pixel is and allows an image to be combined over others using alpha compositing, with transparent areas and anti-aliasing of the edges of opaque regions.

sRGB standard RGB color space

sRGB is an RGB color space that HP and Microsoft created cooperatively in 1996 to use on monitors, printers, and the Internet. It was subsequently standardized by the IEC as IEC 61966-2-1:1999. It is often the "default" color space for images that contain no color space information, especially if the images' pixels are stored in 8-bit integers per color channel.

Color space standard that defines a specific range of colors

A color space is a specific organization of colors. In combination with physical device profiling, it allows for reproducible representations of color, in both analog and digital representations. A color space may be arbitrary, with particular colors assigned to a set of physical color swatches and corresponding assigned color names or numbers such as with the Pantone collection, or structured mathematically as with the NCS System, Adobe RGB and sRGB. A "color model" is an abstract mathematical model describing the way colors can be represented as tuples of numbers ; however, a color model with no associated mapping function to an absolute color space is a more or less arbitrary color system with no connection to any globally understood system of color interpretation. Adding a specific mapping function between a color model and a reference color space establishes within the reference color space a definite "footprint", known as a gamut, and for a given color model this defines a color space. For example, Adobe RGB and sRGB are two different absolute color spaces, both based on the RGB color model. When defining a color space, the usual reference standard is the CIELAB or CIEXYZ color spaces, which were specifically designed to encompass all colors the average human can see.

A color can also be specified by referring to a formula that can use a variety of coordinate-dependent functions.

Texture maps

Texture maps allow assigning color or material to a surface or a volume, borrowing from the idea of Texture mapping in graphics. The <texture> element is first used to associate a texture-id with particular texture data. The data can be represented as either a 2D or a 3D array, depending on whether the color or material need to be mapped to a surface or a volume. The data is represented as a string of bytes in Base64 encoding, one byte per pixel specifying the grayscale level in the 0-255 range.

Texture mapping

Texture mapping is a method for defining high frequency detail, surface texture, or color information on a computer-generated graphic or 3D model. Its application to 3D graphics was pioneered by Edwin Catmull in 1974.

Base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. The term Base64 originates from a specific MIME content transfer encoding. Each Base64 digit represents exactly 6 bits of data. Three 8-bit bytes can therefore be represented by four 6-bit Base64 digits.

Once the texture-id is assigned, the texture data can be referenced in a color formula, such as in the example below.

Usually, however, the coordinated will not be used directly as shown above, but transformed first to bring them from object coordinates to texture coordinates. For example, tex(1,f1(x,y,z),f2(x,y,z),f3(x,y,z)) where f1(), f2(), f3() are some functions, typically linear.

Material specification

Materials are introduced using the <material> element. Each material is assigned a unique id. Geometric volumes are associated with materials by specifying a material-id within the <volume> element.

Mixed, graded, lattice, and random materials

New materials can be defined as compositions of other materials. The element <composite> is used to specify the proportions of the composition, as a constant or as a formula dependent of the x, y, and z coordinates. A constant mixing proportion will lead to a homogenous material. A coordinate-dependent composition can lead to a graded material. More complex coordinate-dependent proportions can lead to nonlinear material gradients as well as periodic and non-periodic substructure. The proportion formula can also refer to a texture map using the tex(textureid,x,y,z) function. Reference to material-id "0" (void) is reserved and may be used to specify porous structures. Reference to the rand(x,y,z) function can be used to specify pseudo-random materials. The rand(x,y,z) function returns a random number between 0 and 1 that is persistent for that coordinate.

Multiple objects can be arranged together using the <constellation> element. A constellation can specify the position and orientation of objects to increase packing efficiency and to describe large arrays of identical objects. The <instance> element specifies the displacement and rotation an existing object needs to undergo to arrive into its position in the constellation. The displacement and rotation are always defined relatively to the original position and orientation in which the object was defined. A constellation can refer to another constellation as long as cyclic references are avoided.

If multiple top-level constellations are specified, or if multplie objects without constellations are specified, each of them will be imported with no relative position data. The importing program can then freely determine the relative positioning.

Meta-data

The <metadata> element can optionally be used to specify additional information about the objects, geometries and materials being defined. For example, this information can specify a name, textual description, authorship, copyright information and special instructions. The <metadata> element can be included at the top level to specify attributes of the entire file, or within objects, volumes and materials to specify attributes local to that entity.

Optional curved triangles

A curved triangle patch. Normals at vertices are used to recursively subdivide the triangle into four sub-triangles Curved triangle.jpg
A curved triangle patch. Normals at vertices are used to recursively subdivide the triangle into four sub-triangles

In order to improve geometric fidelity, the format allows curving the triangle patches. By default, all triangles are assumed to be flat and all triangle edges are assumed to be straight lines connecting their two vertices. However, curved triangles and curved edges can optionally be specified in order to reduce the number of mesh elements required to describe a curved surface. The curvature information has been shown to reduce the error of a spherical surface by a factor of 1000 as compared to a surface described by the same number of planar triangles. [1] Curvature should not create a deviation from the plane of the flat triangle that exceeds 50% of the largest dimension of the triangle.

To specify curvature, a vertex can optionally contain a child element <normal> to specify desired surface normal at the location of the vertex. The normal should be unit length and pointing outwards. If this normal is specified, all triangle edges meeting at that vertex are curved so that they are perpendicular to that normal and in the plane defined by the normal and the original straight edge. When the curvature of a surface at a vertex is undefined (for example at a cusp, corner or edge), an <edge> element can be used to specify the curvature of a single non-linear edge joining two vertices. The curvature is specified using the tangent direction vectors at the beginning and end of that edge. The <edge> element will take precedence in case of a conflict with the curvature implied by a <normal> element.

When curvature is specified, the triangle is decomposed recursively into four sub-triangles. The recursion must be executed five levels deep, so that the original curved triangle is ultimately replaced by 1024 flat triangles. These 1024 triangles are generated "on the fly" and stored temporarily only while layers intersecting that triangle are being processed for manufacturing.

Formulas

In both the <color> and <composite> elements, coordinate-dependent formulas can be used instead of constants. These formulas can use various standard algebraic and mathematical operators and expressions.

Compression

An AMF can be stored either as plain text or as compressed text. If compressed, the compression is in ZIP archive format. A compressed AMF file is typically about half the size of an equivalent compressed binary STL file.[ dubious ] The compression can be done manually using compression software such as WinZip, 7-Zip, or automatically by the exporting software during write. Both the compressed and uncompressed files have the AMF extension and it is the responsibility of the parsing program to determine whether or not the file is compressed, and if so to perform decompression during import.

Design considerations

When the ASTM Design subcommittee began developing the AMF specifications, a survey of stakeholders [3] revealed that the key priority for the new standard was the requirement for a non-proprietary format. Units and buildability issues were a concern lingering from problems with the STL format. Other key requirements were the ability to specify geometry with high fidelity and small file sizes, multiple materials, color, and microstructures. In order to be successful across the field of additive manufacturing, this file format was designed to address the following concerns

  1. Technology independence: The file format must describe an object in a general way such that any machine can build it to the best of its ability. It is resolution and layer-thickness independent, and does not contain information specific to any one manufacturing process or technique. This does not negate the inclusion of properties that only certain advanced machines support (for example, color, multiple materials, etc.), but these are defined in such a way as to avoid exclusivity.
  2. Simplicity: The file format must be easy to implement and understand. The format should be readable and editable in a simple text viewer, in order to encourage understanding and adoption. No identical information should be stored in multiple places.
  3. Scalability: The file format should scale well with increase in part complexity and size, and with the improving resolution and accuracy of manufacturing equipment. This includes being able to handle large arrays of identical objects, complex repeated internal features (e.g. meshes), smooth curved surfaces with fine printing resolution, and multiple components arranged in an optimal packing for printing.
  4. Performance: The file format must enable reasonable duration (interactive time) for read and write operations and reasonable file sizes for a typical large object.
  5. Backwards compatibility: Any existing STL file should be convertible directly into a valid AMF file without any loss of information and without requiring any additional information. AMF files are also easily convertible back to STL for use on legacy systems, although advanced features will be lost.
  6. Future compatibility: In order to remain useful in a rapidly changing industry, this file format must be easily extensible while remaining compatible with earlier versions and technologies. This allows new features to be added as advances in technology warrant, while still working flawlessly for simple homogenous geometries on the oldest hardware.

History

Since the mid-1980s, the STL file format has been the de facto industry standard for transferring information between design programs and additive manufacturing equipment. The STL format only contained information about a surface mesh, and had no provisions for representing color, texture, material, substructure, and other properties of the fabricated target object. As additive manufacturing technology evolved from producing primarily single-material, homogenous shapes to producing multi-material geometries in full color with functionally graded materials and microstructures, there was a growing need for a standard interchange file format that could support these features. A second factor that ushered the development of the standard was the improving resolution of additive manufacturing technologies. As the fidelity of printing processes approached micron scale resolution, the number of triangles required to describe smooth curved surfaces resulted in unacceptably large file sizes.

During the 1990s and 2000s, a number of proprietary file formats have been in use by various companies to support specific features of their manufacturing equipment, but the lack of an industry-wide agreement prevented widespread adoption of any single format. In January 2009, a new ASTM Committee F42 on Additive Manufacturing Technologies was established, and a design subcommittee was formed to develop a new standard. A survey was conducted in late 2009 [3] leading to over a year of deliberations on the new standard. The resulting first revision of the AMF standard became official on May 2, 2011 [4]

During the July 2013 meetings of ASTM’s F42 and ISO’s TC261 in Nottingham (UK), the Joint Plan for Additive Manufacturing Standards Development was approved. Since then, the AMF standard is managed jointly by ISO and ASTM.

Sample file

Object produced by the sample AMF code Amf pyramid.jpg
Object produced by the sample AMF code

Below is a simple AMF file describing a pyramid made of two materials, adapted from the AMF tutorial [5] (548 bytes compressed). To create this AMF file, copy and paste the text below text into a text editor or an xml editor, and save the file as "pyramid.amf". Then compress the file with ZIP, and rename the file extension from ".zip" to ".zip.amf".

<?xml version="1.0" encoding="utf-8"?><amfunit="inch"version="1.1"><metadatatype="name">Split Pyramid</metadata><metadatatype="author">John Smith</metadata><objectid="1"><mesh><vertices><vertex><coordinates><x>0</x><y>0</y><z>0</z></coordinates></vertex><vertex><coordinates><x>1</x><y>0</y><z>0</z></coordinates></vertex><vertex><coordinates><x>0</x><y>1</y><z>0</z></coordinates></vertex><vertex><coordinates><x>1</x><y>1</y><z>0</z></coordinates></vertex><vertex><coordinates><x>0.5</x><y>0.5</y><z>1</z></coordinates></vertex></vertices><volumematerialid="2"><metadatatype="name">Hard side</metadata><triangle><v1>2</v1><v2>1</v2><v3>0</v3></triangle><triangle><v1>0</v1><v2>1</v2><v3>4</v3></triangle><triangle><v1>4</v1><v2>1</v2><v3>2</v3></triangle><triangle><v1>0</v1><v2>4</v2><v3>2</v3></triangle></volume><volumematerialid="3"><metadatatype="name">Soft side</metadata><triangle><v1>2</v1><v2>3</v2><v3>1</v3></triangle><triangle><v1>1</v1><v2>3</v2><v3>4</v3></triangle><triangle><v1>4</v1><v2>3</v2><v3>2</v3></triangle><triangle><v1>4</v1><v2>2</v2><v3>1</v3></triangle></volume></mesh></object><materialid="2"><metadatatype="name">Hard material</metadata><color><r>0.1</r><g>0.1</g><b>0.1</b></color></material><materialid="3"><metadatatype="name">Soft material</metadata><color><r>0</r><g>0.9</g><b>0.9</b><a>0.5</a></color></material></amf>

See also

Notes

Related Research Articles

Cube A geometric shape with 6 square faces

In geometry, a cube is a three-dimensional solid object bounded by six square faces, facets or sides, with three meeting at each vertex.

Gouraud shading

Gouraud shading, named after Henri Gouraud, is an interpolation method used in computer graphics to produce continuous shading of surfaces represented by polygon meshes. In practice, Gouraud shading is most often used to achieve continuous lighting on triangle surfaces by computing the lighting at the corners of each triangle and linearly interpolating the resulting colours for each pixel covered by the triangle. Gouraud first published the technique in 1971.

Shading depicting depth through varying levels of darkness

Shading refers to depicting depth perception in 3D models or illustrations by varying levels of darkness.

Polygon mesh

A polygon mesh is a collection of vertices, edges and faces that defines the shape of a polyhedral object in 3D computer graphics and solid modeling. The faces usually consist of triangles, quadrilaterals, or other simple convex polygons, since this simplifies rendering, but may also be composed of more general concave polygons, or polygons with holes.

Shader subroutine that may run on a graphics processing unit and is used to do shading, special effects, post processing, or general purpose computation

In computer graphics, a shader is a type of computer program that was originally used for shading but which now performs a variety of specialized functions in various fields of computer graphics special effects or does video post-processing unrelated to shading, or even functions unrelated to graphics at all.

OBJ is a geometry definition file format first developed by Wavefront Technologies for its Advanced Visualizer animation package. The file format is open and has been adopted by other 3D graphics application vendors.

In 3D computer graphics, Polygonal modeling is an approach for modeling objects by representing or approximating their surfaces using polygons. Polygonal modeling is well suited to scanline rendering and is therefore the method of choice for real-time computer graphics. Alternate methods of representing 3D objects include NURBS surfaces, subdivision surfaces, and equation-based representations used in ray tracers. See polygon mesh for a description of how polygonal models are represented and stored.

Cube mapping

In computer graphics, cube mapping is a method of environment mapping that uses the six faces of a cube as the map shape. The environment is projected onto the sides of a cube and stored as six square textures, or unfolded into six regions of a single texture. The cube map is generated by first rendering the scene six times from a viewpoint, with the views defined by a 90 degree view frustum representing each cube face.

STL (file format) file format

STL is a file format native to the stereolithography CAD software created by 3D Systems. STL has several after-the-fact backronyms such as "Standard Triangle Language" and "Standard Tessellation Language". This file format is supported by many other software packages; it is widely used for rapid prototyping, 3D printing and computer-aided manufacturing. STL files describe only the surface geometry of a three-dimensional object without any representation of color, texture or other common CAD model attributes. The STL format specifies both ASCII and binary representations. Binary files are more common, since they are more compact.

UV mapping the process of projecting a 2D image to a 3D models surface for texture mapping.

UV mapping is the 3D modelling process of projecting a 2D image to a 3D model's surface for texture mapping. The letters "U" and "V" denote the axes of the 2D texture because "X", "Y" and "Z" are already used to denote the axes of the 3D object in model space.

PLY (file format) file format

PLY is a computer file format known as the Polygon File Format or the Stanford Triangle Format. It was principally designed to store three-dimensional data from 3D scanners. The data storage format supports a relatively simple description of a single object as a list of nominally flat polygons. A variety of properties can be stored, including: color and transparency, surface normals, texture coordinates and data confidence values. The format permits one to have different properties for the front and back of a polygon. There are two versions of the file format, one in ASCII, the other in binary.

In geometry, a vertex is a point where two or more curves, lines, or edges meet. As a consequence of this definition, the point where two lines meet to form an angle and the corners of polygons and polyhedra are vertices.

A vertex buffer object (VBO) is an OpenGL feature that provides methods for uploading vertex data to the video device for non-immediate-mode rendering. VBOs offer substantial performance gains over immediate mode rendering primarily because the data resides in the video device memory rather than the system memory and so it can be rendered directly by the video device. These are equivalent to vertex buffers in Direct3D.

3DS is one of the file formats used by the Autodesk 3ds Max 3D modeling, animation and rendering software.

ScanIP

Synopsys Simpleware ScanIP is a 3D image processing and model generation software program developed by Synopsys Inc. to visualise, analyse, quantify, segment and export 3D image data from magnetic resonance imaging (MRI), computed tomography (CT), microtomography and other modalities for computer-aided design (CAD), finite element analysis (FEA), computational fluid dynamics (CFD), and 3D printing. The software is used in the life sciences, materials science, nondestructive testing, reverse engineering and petrophysics.

A vertex in computer graphics is a data structure that describes certain attributes, like the position of a point in 2D or 3D space, or multiple points on a surface.

In graph drawing and geometric graph theory, a Tutte embedding or barycentric embedding of a simple 3-vertex-connected planar graph is a crossing-free straight-line embedding with the properties that the outer face is a convex polygon and that each interior vertex is at the average of its neighbors' positions. If the outer polygon is fixed, this condition on the interior vertices determines their position uniquely as the solution to a system of linear equations. Solving the equations geometrically produces a planar embedding. Tutte's spring theorem, proven by W. T. Tutte (1963), states that this unique solution is always crossing-free, and more strongly that every face of the resulting planar embedding is convex. It is called the spring theorem because such an embedding can be found as the equilibrium position for a system of springs representing the edges of the graph.

OFF is a geometry definition file format containing the description of the composing polygons of the 3D object.

Open Game Engine Exchange file format

The Open Game Engine Exchange (OpenGEX) format is a text-based file format designed to facilitate the transfer of complex 3D scene data between applications such as modeling tools and game engines. The OpenGEX format is built upon the data structure concepts defined by the Open Data Description Language (OpenDDL), a generic language for the storage of arbitrary data in human-readable format. The OpenGEX file format is registered with the Internet Assigned Numbers Authority (IANA) as the model/vnd.opengex media type.

This is a glossary of terms relating to computer graphics.