LiangliangNan/Easy3D
소개
3D 데이터를 처리하고 렌더링하는 가볍고 사용하기 쉬우며 효율적인 라이브러리입니다(C++ 및 Python).
디자인 및 미디어What you can do
- Data structures for point clouds, surface meshes, polyhedral meshes, and graphs, with arbitrary per-element properties.
- Algorithms such as normal estimation/re-orientation, Poisson reconstruction, RANSAC, simplification, subdivision, smoothing, parameterization, remeshing, and hole filling (several taken from PMP).
- Viewer based on GLFW, easy to extend, with an optional ImGui interface (tutorial).
- Mapple, an ImGui application built on Easy3D for rendering and processing 3D data, running on either backend. Its predecessor, the Qt-based Mapple-Qt, is retired and kept for reference (OpenGL only).
측정된 스타 증가
- in 24h
- 0
- in 7 days
- +4
- in 15 days
- +11
- in 1 month
- +11
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original🔥 New since v2.7.0: native Vulkan rendering, with OpenGL still supported 🔥

A C++ library (with Python bindings) for 3D modeling, geometry processing, and rendering, with native Vulkan support.
Easy3D is designed for simplicity and efficiency. It targets research and education, and also serves as a solid starting point for sophisticated 3D applications. Unlike geometry processing libraries that focus on algorithms (e.g., PMP and libigl), Easy3D also provides rendering, a viewer, and user interaction.

Native Vulkan, or OpenGL: your choice
Few visualization libraries ship a native Vulkan renderer. Easy3D does, and keeps OpenGL as an alternative:
- A real Vulkan backend, not a wrapper: shaders are compiled to SPIR-V at build time, and it runs on Windows, Linux, and macOS (via MoltenVK).
- One option picks the backend:
Easy3D_ENABLE_VULKAN(ONby default,OFFfor OpenGL). - One code base for both:
Viewer,MultiViewer,OffScreen, drawables, picking, effects, and snapshots share one C++ application API. The tutorials, Python bindings, and Mapple build against either backend, and Python wraps the same hosts and rendering types (RenderSettings,DrawCommand,RenderDevice). - Rendering feature parity: point/line impostors, ambient occlusion (GTAO), shadow maps, soft shadows (PCSS), eye-dome lighting, and four transparency methods (sorted alpha blending, average color blending, depth peeling, and per-pixel linked lists). Availability and documented fallbacks depend on the backend and driver; ordinary client code does not select a backend or call native graphics APIs.
- Headless rendering and tests: offscreen rendering works without a display (for example, on Linux with a software Vulkan driver). Interactive viewer tests still require a desktop session.
Key features
- Data structures for point clouds, surface meshes, polyhedral meshes, and graphs, with arbitrary per-element properties.
- Algorithms such as normal estimation/re-orientation, Poisson reconstruction, RANSAC, simplification, subdivision, smoothing, parameterization, remeshing, and hole filling (several taken from PMP).
- Viewer based on GLFW, easy to extend, with an optional ImGui interface (tutorial).
- Mapple, an ImGui application built on Easy3D for rendering and processing 3D data, running on either backend. Its predecessor, the Qt-based Mapple-Qt, is retired and kept for reference (OpenGL only).
- Python bindings for either backend.
- Easy to use as a library: usually a few lines of code, with 60+ documented C++ tutorials and Python tutorials.
| Scalar field | Polyhedral mesh | Keyframe animation |
|---|---|---|
![]() |
![]() |
![]() |
A glance
Any drawable (points, lines, triangles, and thus point clouds, surfaces, scalar fields, and vector fields) takes a few lines of code. For example, to render a point cloud as spheres or as surfels (3D discs):
PointsDrawable* drawable = cloud->renderer()->get_points_drawable("vertices");
drawable->set_impostor_type(PointsDrawable::SPHERE); // or PointsDrawable::SURFEL
drawable->set_point_size(3.0f);
Repository layout
3rd_party- third-party libraries.applications- applications built on Easy3D (e.g., Mapple).cmake- CMake configuration files.docs- documentation sources (Doxygen).easy3d- the library:util,core,fileio,kdtree,algo,algo_ext(CGAL-based),video,renderer(Vulkan and OpenGL backends),gui(picking and interaction), andviewer.python- Python bindings, documentation, and tutorials.resources- data, images, shaders, textures.tests- test cases.tutorials- examples with detailed explanations in code.
Build
Requirements: CMake (>= 3.12) and a C++11 compiler. Easy3D is tested on macOS
(Xcode >= 8), Windows (MSVC >= 2015 x64), and Linux (GCC >= 4.8, Clang >= 3.3). Most third-party libraries are
included in the source tree.
| Backend | CMake option | Needs |
|---|---|---|
| Vulkan | Easy3D_ENABLE_VULKAN=ON (default) |
Vulkan SDK to build (on Linux, libvulkan-dev and glslang-tools suffice); a Vulkan driver to run (MoltenVK on macOS, bundled with the SDK) |
| OpenGL | Easy3D_ENABLE_VULKAN=OFF |
an OpenGL 3.3 driver; the viewer requests 4.3 by default (linked-list transparency needs it) and falls back to 4.1, then 3.3 |
A build contains exactly one backend, so use a separate build directory for each.
Consumers can read Easy3D_BACKEND (OpenGL or Vulkan) after find_package(Easy3D), or set
Easy3D_REQUIRE_BACKEND before it to fail on a mismatch. Easy3D targets also define
EASY3D_BACKEND_OPENGL or EASY3D_BACKEND_VULKAN for compile-time checks.
cd path-to-Easy3D
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release # add -DEasy3D_ENABLE_VULKAN=OFF for OpenGL
cmake --build build --parallel
On Windows, use the x64 Native Tools Command Prompt (not x86), or open the root CMakeLists.txt in an IDE set for
x64 (e.g., CLion). New to C++? See
How to build Easy3D step by step.
Useful options: Easy3D_BUILD_TUTORIALS (off by default), Easy3D_BUILD_TESTS (off by default),
Easy3D_BUILD_DOCUMENTATION (off by default, needs Doxygen), and Easy3D_ENABLE_CGAL (off by default; enables advanced surface mesh
algorithms such as self-intersection resolving and clipping/slicing; needs CGAL 5.1 or later,
and CGAL_DIR can point to a specific version).
Migrating from the OpenGL-only Easy3D (v2.6.1 or earlier). Core class names and headers are unchanged, but there are a few breaking API changes:
- The viewer constructor is
Viewer(title, window, options), wherewindowis aWindowOptionsstruct (width,height,samples,full_screen,visible,resizable) andoptionsis aneasy3d::DeviceOptionsvalue.DeviceOptionshas one public name on both backends: Vulkan builds expose device/validation settings, while OpenGL builds expose context-version and buffer-precision requests. Low-levelgraphics::RenderDevicecreation uses the separate backend-neutralgraphics::DeviceOptions. Old positional calls such asViewer(title, 4, 3, 2, false, false)must be updated. Camera,Frameand related classes now use snake_case method names (e.g.,viewDirection()becameview_direction(),showEntireScene()becameshow_entire_scene()).Drawable::draw()and the native graphics handles are gone: drawables expose backend-neutral CPU state, and hosts render them throughgraphics::DrawCommand.- Qt and wxWidgets are no longer supported.
See the 3.0 migration guide and the v2.7.0 release notes for the full migration tables.
Python bindings: see the Python guide.
Tests: configure with -DEasy3D_BUILD_TESTS=ON, build, then run
ctest --test-dir build --output-on-failure. Tests run for a bounded number of frames without interaction, and the
Vulkan tests require the Vulkan validation layers. See the test guide.
Use Easy3D in your project
Point Easy3D_DIR to your Easy3D build (or installation) directory when running CMake. CMakeLists.txt:
cmake_minimum_required(VERSION 3.12)
project(MyProject)
set(CMAKE_CXX_STANDARD 11)
find_package(Easy3D COMPONENTS viewer REQUIRED) # request only the components you need
add_executable(Test main.cpp)
target_link_libraries(Test easy3d::viewer) # add more modules if needed, e.g., easy3d::algo
main.cpp (the same code runs on either backend):
#include <easy3d/viewer/viewer.h>
#include <easy3d/util/initializer.h>
int main(int argc, char** argv) {
easy3d::initialize();
easy3d::Viewer viewer("Test");
return viewer.run();
}
Or in Python:
import easy3d
easy3d.initialize()
viewer = easy3d.Viewer("Test")
viewer.add_model(easy3d.resource_directory() + "/data/bunny.ply") # use your own file path
viewer.run()
Documentation
Contributing
Questions, feature requests, bug reports, and contributions are welcome; see the Contribution Guide.
License
Easy3D is free software, distributed under the terms of the GNU General Public License, version 3 or (at your option)
any later version. See the accompanying LICENSE file.
Acknowledgments
Easy3D benefited from and was inspired by PMP, libQGLViewer, and Surface mesh. Several surface mesh algorithms (simplification, subdivision, smoothing, parameterization, remeshing, hole filling, geodesic distances, fairing, curvatures, and triangulation) were taken, with modifications, from PMP. We thank the original authors for their permissive licenses, and all users and contributors for bug reports, fixes, testing, and feedback.
Citation
If you use Easy3D in scientific work, please cite it:
@article{easy3d2021,
title = {Easy3{D}: a lightweight, easy-to-use, and efficient {C}++ library for processing and rendering 3{D} data},
author = {Liangliang Nan},
journal = {Journal of Open Source Software},
year = {2021},
volume = {6},
number = {64},
pages = {3255},
doi = {10.21105/joss.03255},
url = {https://doi.org/10.21105/joss.03255}
}
Questions, comments, or suggestions? Contact Liangliang Nan at [email protected].
관련 프로젝트 살펴보기
불러오는 중…


