PLY Reader
FME can read the PLY format.
The PLY format, originally developed at Stanford University and also known as the Stanford Triangle Format or Polygon File Format, was designed to store three-dimensional data captured from 3D scanners. It is now widely used to exchange polygonal models and point clouds between modeling, rendering, and 3D scanning applications.
Overview
A PLY file consists of a single .ply file containing a header followed by a body of element data. The header is always written in ASCII and describes the structure and contents of the file, while the body may be encoded as either ASCII text or binary (little-endian or big-endian). See PLY Format Specification for additional format information and examples.
A single .ply file can contain many types of geometry. However, in practice, .ply files generally contain vertex and face elements representing a polygonal mesh, or vertex-only data representing a point cloud.
PLY files generally contain three-dimensional geometry. Two-dimensional data will be represented with one of the coordinates (generally y or z) being 0.0 for all geometry.
Product and System Requirements
|
Format |
FME Platform |
Operating System |
||||
|---|---|---|---|---|---|---|
|
Reader/Writer |
FME Form |
FME Flow |
FME Flow Hosted |
Windows 64-bit |
Linux |
Mac |
|
Reader |
Yes |
Yes |
Yes |
Yes |
Yes |
Yes |
Reader Overview
The PLY reader reads the vertices of a PLY file as a single FME point cloud feature. The reader extracts the vertex element and presents each of its scalar properties (such as x, y, z, color, and normal components) as a point cloud component. Each PLY file produces one FME feature.
Elements other than vertex (for example, face and edge) are not accepted. A PLY file that contains no vertex element produces a feature with no geometry.
The value for the Reader Dataset is the path to the .ply file.
Supported PLY File Syntax
The PLY file format supports polygonal mesh and point cloud data through a flexible element/property system. The PLY reader reads the vertex element of a PLY file as a point cloud. The scalar properties of each vertex become point cloud components. Other elements (such as face and edge) and list properties are not read in this release.
The syntax is summarized below.
|
Syntax |
Description |
|---|---|
|
ply |
Magic number that identifies the file as a PLY file. Must appear as the first line of the header. |
|
format <encoding> 1.0 |
Specifies the encoding used in the body of the file. Supported encodings:
The version number is always 1.0. |
|
comment <text> |
A comment line in the header. Comments are preserved as metadata where possible but otherwise do not affect parsing. |
|
element vertex <count> |
Declares a vertex element block containing <count> vertices. Property declarations that follow apply to each vertex. |
|
element face <count> |
Declares a face element block containing <count> faces. Property declarations that follow apply to each face. Note This element is not currently supported.
|
|
property <type> <name> |
Declares a scalar property of the current element. Common property types are float, double, int, uint, uchar, char, short, and ushort. Common property names include x, y, z (position); nx, ny, nz (vertex normal); red, green, blue, alpha (color); and s, t or u, v (texture coordinates). |
|
property list <count_type> <item_type> <name> |
Declares a list property of variable length, typically used for face vertex_indices. The <count_type> specifies the integer type used to store the list length, and <item_type> specifies the type of each list element. Note This element is not currently supported.
|
|
end_header |
Marks the end of the header. All data following this line is interpreted according to the format specified above. |