Skip to content
xorespespPublic

Repository files navigation

Triengine

Triengine is a general-purpose engine for real-time 3D visualization, written in C++17.

It's designed to be lightweight, with a minimal-dependency build, so it's easy to integrate into other projects. It uses Eigen for its vector and matrix types, which makes it a natural fit for projects built on Eigen.


Gallery

Lidar sweeps of a city drive, with the labelled objects around the car as 3D boxes
Driving lidar playback with ground-truth 3D boxes

A V8 engine pulled apart while it runs, with transparent parts
Exploded view of a V8 engine block

A motion capture recording of a walk played back on a human skeleton inside a transparent body, with its footprints, the paths of its ankles and the angles of its joints
Motion-captured gait on a biomechanical human model

A black hole and the glowing disk of matter around it, whose far side gravity bends into view above and below the hole
Gravitational lensing of a black hole accretion disk


Key features

  • Triangle mesh rendering
  • Dynamic point cloud rendering
  • Line set rendering
  • Skeletal motion rendering
  • Depth-tested 3D and screen-space 2D text rendering
  • Point cloud color mapping
  • Camera image display and 3D overlay
  • Smoothed arcball and fly camera control, orthographic and pinhole projection
  • Built-in GUI with window docking
  • Offscreen rendering
  • Inter-process rendering (Windows only; see triengine_interop)
  • OBJ, PLY and BVH file loading

Implementation details

  • Hybrid deferred and forward rendering pipeline
  • Order-independent transparency
  • HDR rendering with tone mapping
  • Phys-based bloom
  • SMAA anti-aliasing
  • Infinite ground grid
  • Directional and point lighting, distance fog
  • Batched per-object GPU data
  • GPU resource management system with buffer pooling
  • Build-time shader embedding
  • Custom shader preprocessor
  • Compile-time shader block marshalling with runtime layout verification
  • Per-pass CPU and GPU frame profiler

Building

Note

Windows only for now. Linux support is planned.

Prerequisites:

  • CMake 3.28+
  • MSVC
  • Ninja
  • Python 3
  • GL 4.6 graphics driver

Configure and build with the CMake preset:

cmake --preset win64-rel
cmake --build --preset win64-rel

Related repositories

  • triengine_interop: the interop layer behind inter-process rendering, shared by the renderer process and its client applications.

License

Apache License 2.0. See LICENSE.

Third-party assets under resources/ keep their own licenses.

Releases

Packages

Contributors

Languages