If you've ever worked with 3D scanners or scientific data, you've likely encountered the .PLY extension. While less famous than STL or OBJ, the PLY format is a powerhouse for specific industries.
What is a PLY File?
PLY stands for Polygon File Format (or sometimes the Stanford Triangle Format). It was developed in the mid-90s at Stanford University to store 3D data from 3D scanners.
Unlike STL, which only stores geometry (triangles), PLY is designed to be flexible. It can store:
- Geometry: Vertices and faces (like STL/OBJ).
- Color: Per-vertex color data (unlike STL).
- Normals: Directional data for lighting.
- Confidence: How "sure" the scanner was about a specific point.
ASCII vs. Binary PLY
One of the unique features of PLY is that it comes in two flavors:
ASCII (Text)
Human-readable. You can open it in Notepad and see the list of numbers. Great for debugging but results in massive file sizes.
Binary
Computer-readable only. Compact and fast to load. This is the preferred format for distributing large scans.
When Should You Use PLY?
You should choose PLY over STL or OBJ if:
- You are working with Point Clouds: PLY is excellent for storing raw scan data before it becomes a mesh.
- You need Vertex Colors: If your 3D printer supports full color (like PolyJet) and reads PLY, it's often better than OBJ/MTL because it's a single file.
- Scientific Data: If you need to attach custom data properties to vertices (like temperature or stress values).
However, for standard FDM 3D printing, STL remains the king due to its simplicity and universal slicer support.
Reading the Header
PLY is unusual among 3D formats in that it describes its own contents. The header is plain text even when the data that follows is binary, so you can always open a PLY in a text editor and learn exactly what is inside before touching it.
A typical header declares the format, then lists elements and the properties each one carries:
ply
format binary_little_endian 1.0
element vertex 342119
property float x
property float y
property float z
property uchar red
property uchar green
property uchar blue
element face 681204
property list uchar int vertex_indices
end_header
That tells you a great deal at a glance: 342,119 vertices, each carrying position and an 8-bit RGB colour, and 681,204 faces. If the element face line is absent or zero, you have a point cloud rather than a mesh — a distinction worth knowing before you spend twenty minutes wondering why nothing renders as a surface.
Because the property list is open-ended, PLY files can carry data other formats have nowhere to put: per-vertex confidence values, surface curvature, intensity from a laser scanner. Applications ignore properties they do not recognise, which is exactly why the format has lasted.
ASCII vs Binary Is Not a Small Difference
The format line has three legal values: ascii, binary_little_endian and binary_big_endian.
ASCII writes every coordinate as text. A vertex position that occupies 12 bytes in binary might take 40 characters as text, and the parser has to convert every one of them from string to float. On a scan with a few million points, that is the difference between a file opening in a second and a file opening in a minute — and often between a 90 MB file and a 400 MB one.
Use ASCII only when you genuinely need to inspect or hand-edit values. For everything else choose little-endian binary, which matches the byte order of every mainstream desktop and mobile processor.
Corrupted-looking geometry?
If a PLY imports as an explosion of scattered points, endianness is a likely culprit — the file was written big-endian and read as little-endian, or vice versa. Re-export as binary_little_endian rather than trying to repair the mesh.
Per-Vertex Colour, Not Textures
This is PLY's defining characteristic and the main reason to choose it. Colour is stored per vertex, directly alongside position, with no UV mapping and no texture image.
That suits scanned data perfectly. A photogrammetry pipeline already produces a coloured point for every sample it measured; there is no meaningful surface parameterisation to unwrap. Storing three bytes next to each vertex is both simpler and more faithful to what was captured.
The limitation follows directly: colour resolution is tied to mesh density. A flat wall reconstructed as two large triangles can only carry colour at its four corners, however detailed the source photographs were. Getting crisp detail means either many more vertices or a switch to a textured format such as OBJ or GLB.
It is also why decimating a coloured PLY degrades appearance faster than expected — removing vertices removes colour samples, not just geometry.
Why Scanners Emit PLY
Structured-light scanners, LiDAR units and photogrammetry software almost all default to PLY, and the header explains why. The format lets each device record what it actually measured, including fields no standard format anticipated, without inventing a proprietary container.
A typical scan pipeline moves through PLY several times: raw point cloud, aligned and merged cloud, then a reconstructed mesh — all PLY, all with different property lists. Only at the end, when the model is destined for printing or rendering, does it convert to something else.
Raw scan output is rarely printable as-is. Expect an open surface rather than a solid, isolated stray points from reflections, and a mesh dense enough to slow down anything you open it in. That is normal, not a broken export.
Getting a PLY to a Printer
Four steps handle nearly every scan, in this order:
- Remove outliers. Delete the floating specks and the floor plane the scanner captured along with your subject. Doing this first makes everything after it faster.
- Close the surface. A scan captures what the sensor could see, so the underside is usually missing. It needs to become a closed volume before a slicer can work with it.
- Decimate. Millions of triangles buy nothing at printed resolution. Reducing to a few hundred thousand is typically invisible in the final part and makes the file manageable.
- Convert to STL or 3MF. Colour is lost at this point unless you are printing multi-material, and STL cannot carry it regardless. Keep the PLY as your master copy.
That last point is worth emphasising: treat the PLY as the archive and the STL as a derived output. Once colour and scan metadata are gone, they cannot be recovered from the converted file.