Introduction
PLY, also called the Stanford Triangle Format, was designed at Stanford University in the 1990s to store data from 3D scanners. A text header declares which elements the file holds, such as vertices and faces, and which properties each one has, such as a position, a colour or a normal. This makes it a common format for scanned meshes and point clouds with colour.
The data after the header is written in one of three encodings, named in the header: ASCII text, binary little-endian or binary big-endian. The header itself is the same text in all three.
Structure
The file opens with a text header. Its first line is ply, and the
format line says whether the data is ASCII, binary little-endian or binary
big-endian. Each element line gives a name and a count, and the
property lines under it list the values every item carries, with their
types. A property list holds a count followed by that many values, which
is how faces list their vertex numbers. end_header closes the header, and
the data follows in the order declared.
ply
format ascii 1.0
comment one coloured triangle
element vertex 3
property float x
property float y
property float z
property uchar red
property uchar green
property uchar blue
element face 1
property list uchar int vertex_indices
end_header
0 0 0 255 0 0
1 0 0 0 255 0
0 1 0 0 0 255
3 0 1 2
Links
Software
- MeshLab – free open source mesh viewer and editor (Windows, macOS, Linux)
- CloudCompare – free open source point cloud and mesh tool (Windows, macOS, Linux)
- Blender – free open source 3D suite that imports and exports PLY (Windows, macOS, Linux)
Developers
Reference
- PLY - Polygon File Format – Paul Bourke’s copy of the description by Greg Turk