Files
Raychel/README.md
2022-12-19 22:58:52 +01:00

2.5 KiB

Raychel - Raymarching Engine written in standard C++20

What is ray marching?

In ray marching, every object is defined by a so called signed distance funtion, SDF for short. A SDF gives the distance between a point in space and a surface, with negative values meaning the point is inside the object. To trace a ray in a certain direction, we can take the minimum of all SDFs in the scene and move by that amount in that direction. We can now repeat this process until the smallest distance is zero (or very close to it). Like all ray tracing algorithms, ray marching allows for very realistic lighting simulations.

Features

The engine is currently a WIP and new features are added with almost every commit. Current features include:

  • Basic Shapes
    • Spheres
    • Boxes
    • Planes
  • SDF Modifiers
    • Hollowing
    • Rounded corners
    • Onioning
  • SDF Transforms
    • Translation
    • Rotation
  • SDF Boolean operations
    • Union
    • Difference
    • Intersection
  • PBR Materials
    • Diffuse
    • Reflective (no glossy yet)
    • Refractive
  • Denoising
    • Single scale implementation of the Ray Histogram Fusion algorithm
    • Multiscale (the good one) coming soon™

Language

Raychel is written in standard C++20 using as little hacks as possible. The design style is rather functional than object oriented, although OO patterns are used.

Building

Compiler Support

Raychel is primarily developed on a GNU/Linux system, so changes that break Windows compatibility may not be fixed immediately. The following compilers work for sure:

  • Clang 14
  • GCC 12.2

Dependencies / Library credit

No dependency management is currently implemented, so you have to install the following libraries manually:

How to build

After cloning the repository with

git clone https://github.com/Weckyy702/Raychel

create the build directory using

mkdir build; cd build

and run cmake:

cmake <your options> ..

Lastly, build the library itself with

make

I found a bug!!

Nicely done! Please report it in the issues tab or open a pull request with your fix.