Convert between ASCII and Binary PLY File Formats

Files in the PLY file format come in two variants: ASCII and binary. Some programs have problems dealing with a binary PLY file and can only deal with a ASCII PLY file. There are many programs available to convert between ASCII and binary PLY files. I had some problems with the converted files when I used programs like ply2ascii to do this conversion.

Instead, I discovered that MeshLab is not only a cool mesh viewer program, but can also convert between many mesh formats. It supports conversion between PLY too:

  1. Open the original (say binary) PLY file by using File β†’ Import Mesh.
  2. Export this file to the (say ASCII) PLY file format by using File β†’ Export Mesh As. Choose PLY file format in the Save dialog.
  3. MeshLab shows a dialog specific to PLY. Here depending on which (ASCII or binary) PLY format you want, choose the Binary encoding radio button. Your PLY file is converted! πŸ™‚

Tried with: MeshLab 1.3.0

ASC File Format for 3D Points

There are many complicated file formats for reading and writing 3D mesh data. However, if you work only with 3D points in your 3D geometry application, then the ASC file format is a convenient way to read, write and display point data. ASC stands for ASCII and the files have an extension of .asc. This is a text file format, where each line has the XYZ coordinates of one point, each coordinate separated by whitespace.

For example, the 4 points of a tetrahedron in the ASC format:

-0.0378297 0.12794 0.00447467
-0.0447794 0.128887 0.00190497
-0.0680095 0.151244 0.0371953
-0.00228741 0.13015 0.0232201

Point data stored as ASC files can be viewed using programs such as MeshLab.