Bachelor Project - Toy renderer
This is a toy/experimental real-time global illumination renderer written in C++ and using Direct3D 11. It's a hobby project, which means that it sometimes chooses the simplest options, and is perpetually a work in progress.
It started as part of my bachelor thesis where the goal was to create a real-time renderer that supported global illumination.
- Deferred rendering
- Dynamic global illumination
- Voxel cone traced diffuse lighting and specular reflection using anisotropic voxels
- Compute shader pre-pass for "infinite" bounces
- Screen-space specular occlusion to mitigate light leaking
- Hardware and software conservative rasterization modes
- Gap-filling compute pass to reduce light leaking
- Ambient occlusion
- PCF and PCSS shadows
- Emissive materials
- Normal mapping
- Material editor
- Built-in GPU timings
- Voxel visualizer
The project currently consists of:
- A renderer,
Bachelor, written in C++ using the Win32 API and Direct3D 11. Supported OSes: Windows only - A command-line tool,
MeshBaker, which can parse .obj files to our custom format, written in C++. Supported OSes: Windows only - A command-line tool,
Hemisphere, that can generate cones to cover the hemisphere, witten in C++. Supported OSes: Windows only
No installation is required for any of the binaries.
The command-line tools have no third-party dependencies.
bin\bachelor.exe requires Direct3D 11 and needs to be able to read from the bachelor\ folder that contains the assets.
- WSAD, Space, Ctrl - movement
- Mouse + Right mouse button- rotate the camera
- Middle mouse button - move slower
- F1 - toggle help window
A lot of the technical details are covered in my thesis, see Chapter 4 (Architecture) and Chapter 5 (Design and Implementation). Chapter 7 (Results and Dicussion) analyzes the performance of the different render passes.
In addition, there's a global illumination overview post on my website.
The steps:
- You will need Visual C++ 2013 or later installed.
- Navigate to
bachelor\misc. - Run
gen.exeto generate Visual Studio project files for VS2013/2019[a]. - Navigate to
vs2013orvs2019and compile the project.
a) Alternatively you can generate your own project files for other Visual Studio versions using genie.exe.
-
Bachelor
- Voxel data structure is a dense grid. Could experiment with other structures for storing voxels, such as sparse voxel octress or cascaded voxel grids.
- Short/long cone split in the bounce pass.[McL15]
- The bounce pass can be amortized over multiple frames to reduce the per frame computional expense.
- Could trace cones for the bounce pass at a lower resolution and upscale.
- The indirect diffuse contributes to a local fragment's specular response. Need to use another data structure to achieve true indirect specular.
[McL15] As described by James McLaren. ‘The Technology of The Tomorrow Children’. In: GDC (April 2015).
-
Meshbaker
- The parser needs more work to make all .obj readable by
bachelor.
- The parser needs more work to make all .obj readable by
Personal website: https://bjarkede.com
GitHub user: bjarkede
Bjarke#3697 @ Discord
