open rt logo

Open-Source Ray-Tracing library


OpenRT is a C++ ray-tracing library, which allows for synthesis of photo-realistic images. First of all, the library is developed for academic purposes: as an accompaniment to the course on computer graphics and as a teaching aid for university students. Specifically, it includes the following features:

  • Distribution Ray Tracing
  • Global Illumination

OpenRT aims for a realistic simulation of light transport, as compared to other rendering methods, such as rasterisation, which focuses more on the realistic simulation of geometry. Effects such as reflections and shadows, which are difficult to simulate using other algorithms, are a natural result of the ray tracing algorithm. The computational independence of each ray makes our ray-tracing library amenable to a basic level of parallelisation. OpenRT is released under a BSD license and hence it is free for both academic and commercial use. The code is written entirely in C++ with using the OpenCV library. 


Low overhead, OpenRT has only one external dependency: OpenCV.  Optimized for high-efficient calculations and takes advantage of multi-core processing as well as GPU computing.

Batteries Included

Comes out of the box with everything you need to create your first ray tracing application. A selection of demo projects may serve as the basis for your own application.


OpenRT is a cross-platform, dynamic-link library, meant to be used in Windows, Mac and Linux. Its C++17 code is compiled with Microsoft Visual Studio, Xcode and gcc.




Area Lights


Ambient Occlusion


Cornell Box

Original Imagecornell box

Computer Graphics Course Schedule

Date Lecture Slides Assignments
03.09.2020 Introduction pdf
03.09.2020 Introduction to Ray Tracing slides
10.09.2020 Camera and Lens Models slides
17.09.2020 Ray-geometry intersection algorithms slides Assignment 1
24.09.2020 Spatial Index Structures pdf / slides
01.10.2020 Shading: Rendering Equation & BRDF slides Assignment 2
08.10.2020 Texturing 1 pdf
15.10.2020 Texturing 2 slides Assignment 3
22.10.2020 Midterm Exam
29.10.2020 Sampling and Reconstruction pdf Assignment 4
05.11.2020 Human Visual System pdf
05.11.2020 Color pdf Assignment 5 (T)
12.11.2020 Distribution Ray-Tracing slides Assignment 6
19.11.2020 Transformations pdf
26.11.2020 Animation pdf Assignment 7
26.11.2020 Environment camera & Virtual Reality pdf
03.12.2020 Global Illumination pdf
08.12.2020 Final Exam
23.01.2021 Make-Up Exam

Project and Thesis Topics

Subsurface scattering / Subsurface light transport (SSLT)

Concentration on creation of new shaders for materials as wax, skin, marble, etc. SSLT may be implemented based on the photon beam diffusion (PBD) technique by Habel et al. The resulting profile takes all orders of scattering into account, effectively accounting for all of the light transport that occurs within the surface.

Read more:
wikipedia, pbr book

Constructive solid geometry (CSG)

Concentration on creation of new geometry. Development of the methods, which allow modeling complex surfaces or objects by applying Boolean operators to simpler objects, e.g. generating visually complex objects by combining a few primitive ones.

  • Union: merger of two objects into one
  • Difference: subtraction of one object from another
  • Intersection: portion common to both objects

In a general case boolean operator has form:

CSolid bool_op(const CSolid& a, const CSolid& b)

which produces a new triangulated mesh based on input two meshes. However, CSG in raytracing may be implemented in a much simpler way: Ray tracers intersect a ray with both primitives that are being operated on, apply the operator to the intersection intervals along the 1D ray, and then take the point closest to the camera along the ray as being the result.

Read more:

Thick Lens Model

Concentration on creation of new cameras with a fairly rough approximation of actual camera lens systems, which are comprised of a series of multiple lens elements, each of which modifies the distribution of radiance passing through it.

Read more:
pbr book

Bump Mapping and Stochastic deviation of Normals

Procedural Textures

Stohastic Supersampling

Omnidirectional Camera

Concentration on creation of new camera model that traces rays in all directions around a point in the scene, giving a 2D view of everything that is visible from that point. 

This work also includes a prolongation into rendering 360° stereoscopic panoramas for viewing with stereo glasses.

Read more:
wikipedia, pbr book

Depth of Field (DoF)

Concentration on creation of new cameras with the thin lens approximation, to model the effect of finite apertures with traditional computer graphics projection models. The thin lens approximation models an optical system as a single lens with spherical profiles, where the thickness of the lens is small relative to the radius of curvature of the lens. 

DoF effect is a part of stochastic ray tracing and makes use of the random samples generators.

Read more:
wikipedia, pbr book

Particle System

Concentration on creation of new type of geometry to simulate certain kinds of “fuzzy” phenomena, which are otherwise very hard to reproduce with conventional rendering techniques – usually highly chaotic systems, natural phenomena, or processes caused by chemical reactions.

A particle system’s position and motion are controlled by  an emitter. The emitter acts as the source of the particles, and its location in 3D space determines where they are generated and where they move to. A regular primitive or a solid, such as a cube or a plane, can be used as an emitter. Particles’ physics and interaction should be modeled. 

Read more:

Distributed Rendering

Feature content

GPU-based rendering

Feature content

Bounding Volume Hierarchy (BVH)