ddiakopoulos / tinyply

:earth_africa: C++11 ply 3d mesh format importer & exporter
615 stars 119 forks source link
computer-vision file-format geometry mesh ply public-domain

tinyply 2.3

Release is 2.3.3 License is Unlicense

Platform Build Status
GCC + Clang Build status
VS2019 Build status

A single-header, zero-dependency (except the C++ STL) public domain implementation of the PLY mesh file format. An overview and definition of the file format is available here. This format is often used in the computer vision and graphics communities for its relative simplicity, ability to support arbitrary mesh attributes, and binary modes. Famously, PLY is used to distribute 3D models in the Stanford 3D Scanning Repository, including the bunny.

The library is written in C++11 and requires a recent compiler (GCC 4.8+ / VS2015+ / Clang 2.9+). Tinyply supports exporting and importing PLY files in both binary and ascii formats. Tinyply supports filesizes >= 4gb and can read big-endian binary files (but not write them).

Getting Started

The project comes with a simple example program demonstrating a circular write / read and all of the major API functionality.

In The Wild

Since 2015, tinyply has been used in hundreds of open-source projects including pointcloud tools, raytracers, synthetic data renderers, computational geometry libraries, and more. A few notable projects are highlighted below:

tinyply not what you're looking for? tinyply trades some performance for simplicity and flexibility. For domain-specific uses (e.g. where your application does not need to handle arbitrary user-fed PLY files), there are other speedier alternatives. For more, please check out the following benchmarks:

Past Versions

License

This software is in the public domain. Where that dedication is not recognized, you are granted a perpetual, irrevocable license to copy, distribute, and modify this file as you see fit. If these terms are not suitable to your organization, you may choose to license it under the terms of the 2-clause simplified BSD.