A real-time physically based rendering engine for Android, iOS, Linux, macOS, Windows and WebGL2, designed to be small and efficient on Android.
markaren/threepp
A cross-platform C++20 3D library with a three.js-style API, OpenGL and Vulkan backends, Python bindings, and physics and sensor simulation.
- Stars
- 1,208
- Forks
- 156
- Open issues
- 3
- Last commit
- 21 hours ago
What is it?
threepp is a C++20 3D library that follows the high-level API of three.js, so developers familiar with three.js can write scene code with similar objects such as Mesh, Scene, lights, cameras and loaders. Rendering runs on a portable OpenGL backend, or on a deferred Vulkan renderer that adds ray-traced shadows, reflections, ambient occlusion and global illumination, with the same scene code working on either.
Beyond rendering, the project includes a scene editor, PhysX-based robot and rigid-body simulation, simulated lidar, depth, camera, IMU and other sensors that can output ground-truth labels for synthetic data, and hardware-in-the-loop flight with ArduPilot. Python bindings are published on PyPI and expose the renderers, labels as NumPy arrays and PhysX articulations.
The project describes itself as suited to research, prototyping and teaching rather than production engines, and notes that APIs change between releases. The Vulkan backend requires ray-tracing extensions, so it does not run on macOS, where the OpenGL renderer is used instead.
Key features
- 01three.js-style API covering meshes, lights, cameras, controls, animation and post-processing.
- 02Loaders for glTF, OBJ, STL, COLLADA, SVG, URDF, FBX (opt-in) and common image and HDR formats.
- 03Vulkan deferred renderer with ray-traced shadows, reflections, AO and GI.
- 04Simulated sensors such as lidar, depth and colour cameras, IMU and joint encoders.
- 05PhysX integration for rigid bodies, articulations, soft bodies and vehicles.
- 06Python bindings installable from PyPI with headless rendering support.
Use cases
- Building robotics or autonomous-systems simulations that need sensor models and physics in C++.
- Generating labelled synthetic image and depth data for perception training.
- Porting three.js-style scene code to a native C++ application.
- Teaching 3D graphics concepts with a familiar high-level API.
Quick start
- 1
Install the Python package from PyPI
pip install threepp - 2
Build the OpenGL backend with CMake presets
cmake --preset gl - 3
Compile the OpenGL build
cmake --build --preset gl
Things to know
- The Vulkan backend needs ray-tracing capable GPUs and does not run on macOS; use GLRenderer there.
- Project is built for research, prototyping and teaching, not production, and APIs change between releases.
- Simulation layer (Vulkan, sensors, PhysX, editor, Python) moves fastest, and the editor's Vulkan viewport is best-effort.
In collections
Topics
FAQ
- What is threepp?
- A cross-platform C++20 3D library with a three.js-style API, OpenGL and Vulkan backends, Python bindings, and physics and sensor simulation. threepp is a C++20 3D library that follows the high-level API of three.js, so developers familiar with three.js can write scene code with similar objects such as Mesh, Scene, lights, cameras and loaders. Rendering runs on a portable OpenGL backend, or on a deferred Vulkan renderer that adds ray-traced shadows, reflections, ambient occlusion and global illumination, with the same scene code working on either.
- Is threepp free to use? What license does it have?
- threepp is open source under the MIT license. Check the license terms before using it in commercial products.
- Is threepp still maintained?
- Actively maintained. The last commit to threepp was on Nov 6, 2026.
- What can I use threepp for?
- Building robotics or autonomous-systems simulations that need sensor models and physics in C++. Generating labelled synthetic image and depth data for perception training. Porting three.js-style scene code to a native C++ application. Teaching 3D graphics concepts with a familiar high-level API.
- How do I install threepp?
- Install the Python package from PyPI: pip install threepp Build the OpenGL backend with CMake presets: cmake --preset gl Compile the OpenGL build: cmake --build --preset gl
- Where can I get threepp?
- The source code and installation instructions are on GitHub: https://github.com/markaren/threepp
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Free, open source 3D planetarium software that renders a realistic night sky in real time on desktop computers.
A collection of Claude Code skills and plugins teaching Claude about Three.js, GSAP, React Three Fiber, Framer Motion, Babylon.js and other web 3D and animation tools.
OGRE is a modular C++ rendering engine that abstracts Vulkan, Direct3D and OpenGL for building 3D applications in C++ and Python.
A loader-generator that produces C/C++ and other language bindings for OpenGL, Vulkan, EGL, GLX and WGL from the official specifications.
A cross-platform C++17 UI framework with GLFW/SDL2 window backends and OpenGL/Vulkan rendering, built around a declarative DSL.