DoonEngine is a voxel path tracing engine that calculates lighting per-voxel instead of per-pixel. It allows for dynamic streaming of voxels from the CPU and fast edits to the map. It is being developed only by one person and is still a work-in-progress, so don't expect too much polish.
The voxels are separated into 8x8x8 chunks, which allows for faster dynamic editing as only a portion of the map needs to be reuploaded when it is edited. Additionally, empty chunks are able to be skipped over when ray casting. When drawing the map, each chunk that is visible to the camera is added to a buffer. Each chunk in this buffer then has its lighting updated, allowing for per-voxel lighting. The diffuse lighting is pure path-traced and accumulates over many frames. The direct light and specular component, however, are calculated by shooting a fixed number of uniformly-spaced rays so that they can be updated instantly as the camera moves and the map is edited.
This project can be built using either CMake or Make. Nominally, CMake should be used with Visual Studio on Windows, and Make should be used on Linux. This project depends on OpenGL, GLFW, and stb_image.
To build this project on Windows, run CMakeLists.txt using CMake. The working directory should be set to the assets folder. If there is an issue with the CMake build, please let me know as I am new to the software.
To build this project on Linux, simply run make
. The built executable will be located at build/doonengine
. To run it, first navigate to the assets
directory, then run ../build/doonengine
.
https://www.youtube.com/watch?v=OAF4RCS_pPc
https://www.youtube.com/watch?v=T0hunImo9Hs
https://www.youtube.com/watch?v=ePOooVJizc8