PLY

Also known as: Polygon File Format · Stanford Triangle Format

On this page 8

PLY, the Polygon File Format also known as the Stanford Triangle Format, is a file format that stores a polygon mesh or point cloud as a list of elements, each described by user-defined properties. In 3D file formats & pipelines, PLY occupies a specific niche: it is the default exchange format for 3D scanning, photogrammetry and research geometry, where the data consists of many vertices carrying measured attributes rather than authored materials, rigs or animation.

The format was designed at Stanford University in the mid-1990s to hold the output of range scanners, and its defining strength is a self-describing header that lets any program read properties it has never seen before. That simplicity explains its longevity, and also its limits as a general production format.

How a PLY file is structured

A PLY file consists of a plain-text header followed by a body that holds the actual data. The header always begins with the magic word ply, declares the storage format, and then lists every element (such as vertex or face) with its count and its ordered list of properties. The header ends with the line end_header, after which the body contains the elements in exactly the declared order.

Properties are either scalar properties with a declared data type, such as property float x, or list properties, such as property list uchar int vertex_indices, where the first type gives the size of the count and the second gives the type of each entry. Faces are usually stored as list properties that index into the vertex element, which makes PLY an indexed face set similar in principle to OBJ.

The following table summarizes the main header keywords and their role.

KeywordPurposeExample
plyIdentifies the file typeply
formatDeclares encoding and versionformat binary_little_endian 1.0
elementNames a data group and its countelement vertex 250000
propertyDefines one attribute of an elementproperty uchar red
comment / obj_infoStores free-text metadatacomment scanner calibration A
end_headerMarks the start of the bodyend_header
Core header keywords of the PLY format

ASCII and binary encodings

PLY supports three encodings: ASCII, binary little-endian and binary big-endian. The header is always ASCII, but the body follows the declared format. ASCII files are human-readable and easy to debug, while binary files are smaller and much faster to parse, because values are read directly into memory without text conversion.

The size difference is substantial. A vertex with three floats for position, three floats for the normal and three bytes for color occupies 27 bytes in binary, whereas the same values in ASCII typically take 60 to 90 characters, depending on decimal precision. For dense scans with tens of millions of points, binary little-endian is the practical default on current hardware.

EncodingReadabilityRelative sizeTypical use
ASCIIReadable in any text editorLargest, often 2 to 3 times binaryTeaching, debugging, small test meshes
Binary little-endianRequires a parserCompactScanners, photogrammetry, production data
Binary big-endianRequires a parserCompactLegacy workstations and older datasets
Comparison of PLY body encodings

Typical properties and data types

PLY defines eight scalar data types: char, uchar, short, ushort, int, uint, float and double, also written with explicit sizes such as int32 or float32. Because property names are free, there is no enforced schema; instead, a set of de facto conventions has emerged that most software recognizes.

The table below lists the properties that common readers interpret automatically. Anything else, such as scanner intensity or a confidence value, is preserved by a careful reader but may be silently dropped by applications that only understand the standard names.

Property namesElementMeaning
x, y, zvertexPosition in model units
nx, ny, nzvertexSurface normal vector
red, green, blue, alphavertexPer-vertex color, usually 8-bit
s, t or u, vvertexTexture coordinates
confidence, intensityvertexScanner quality or reflectance
vertex_indicesfaceList of vertex indices forming a polygon
Widely recognized vertex and face properties

In Gaussian splatting, a recent rendering technique, PLY has gained a second life: trained scenes are commonly exported as point clouds whose vertices carry opacity, scale, rotation and spherical harmonic coefficients, which demonstrates how the open property model absorbs new data without any change to the specification.

How PLY compares with other 3D formats

PLY is best understood as a geometry container, not a scene format. It has no notion of a scene graph, cameras, lights, materials, skeletons or animation, which places it at the opposite end of the spectrum from FBX, glTF and USD. Its closest relative is OBJ, which is also a simple mesh format but stores data in a fixed text syntax.

FormatMain strengthMaterials and scenesPoint clouds
PLYArbitrary per-vertex attributesNoneNative
OBJUniversal mesh exchangeBasic via MTLAwkward
STLSimple triangles for printingNoneNo
glTFEfficient real-time deliveryPBR materials, scenesLimited
USDLayered scene compositionFull scene descriptionSupported
PLY compared with neighboring formats

Choosing PLY therefore means choosing fidelity of raw measurements over completeness of scene description. In a typical pipeline, PLY carries data from capture to cleanup, and the result is later converted to glTF, USD or FBX for look development and delivery.

Where PLY is used in practice

PLY appears wherever geometry is measured rather than modeled. Laser and structured-light scanners, photogrammetry tools and point cloud processing libraries export it by default, and it remains the reference format of academic datasets such as the original Stanford scanning repository.

  • 3D scanning and photogrammetry: dense point clouds and reconstructed meshes with vertex colors.
  • Cultural heritage digitization: archival scans of sculptures and artifacts with per-point confidence.
  • Robotics and computer vision: depth-sensor output and reconstruction results.
  • Research and benchmarking: reproducible mesh-processing experiments.
  • Neural scene representations: exported Gaussian splats and point-based scenes.

Limitations and common pitfalls

The flexibility of PLY is also its main weakness. Because two valid PLY files can use different property names for the same idea, interoperability depends on conventions rather than on the specification. Experienced practitioners therefore inspect the header first whenever a file behaves unexpectedly.

SymptomLikely causeFix
Colors missing after importNonstandard names such as diffuse_redRename properties or use a tolerant importer
Garbled geometryWrong endianness assumed by a readerCheck the format line and convert
Huge files, slow loadingASCII encoding of dense scansRe-save as binary little-endian
Faces not shownFile contains only a point cloudReconstruct a surface or render as points
Mesh appears mirrored or rotatedDiffering axis conventionsApply the expected up axis on export
Frequent PLY problems and their fixes

PLY also lacks a defined unit system and coordinate convention, so scale and up axis must be agreed upon by the producer and consumer. Finally, it cannot reference external textures in a standard way; texture file names are sometimes stored in comments, which only some tools read.

In everyday language

A PLY file is like a detailed list of dots in space. A short note at the top explains what is written about each dot. One file might record only where each dot is. Another might also record its color, its direction and how sure the scanner was.

That note tells any program how to read the list. This makes PLY ideal for saving what a 3D scanner sees. It is less suited to finished animated scenes. It does not describe lights, cameras or materials.

Seen in the real world

A museum digitization team scans a carved wooden altarpiece with a structured-light scanner. Each of the 38 million captured points stores its position, a normal, an RGB color and a confidence value, and the scanning software saves the merged result as a binary little-endian PLY file of roughly 1 GB.

A technician opens the file in a point cloud editor, removes points whose confidence falls below a chosen threshold, and reconstructs a surface mesh that is also saved as PLY for the archive. For the online exhibition, the mesh is decimated to about 500,000 triangles, the vertex colors are baked into a texture, and the result is exported as glTF. The archival PLY keeps every measured attribute, while the lightweight glTF serves visitors in a web browser.