RTRad is an enhanced implementation of progressive refinement radiosity using Nvidia's RTX technology to accelerate visibility calculations.
The project is built on Falcor 4.4 and contains a highly configureable pipeline.
GI lightmaps can be generated in a variety of different ways and individual data components can easily be visualized. Custom scenes and models can be defined and loaded into the rendering environment using the .pyscene
format.
The development took place as part of a Masters's thesis at the Freie Universität Berlin. The thesis contains a detailed account on all features and requirements and can be viewed as a form of documentation here.
Here's a simple demonstration video that serves as an overview:
If you are looking to run this application without making code-based changes, simply head on over to the github releases tab and download the newest version. Make sure you have a GPU which supports DirectX Raytracing with a reasonably recent driver installed.
For a development setup you can use newer versions of Visual Studio, but you will need to have Visual Studio 2019 installed in order to build the original Falcor 4.4 from source. You also need:
Once you've got those:
- Clone the git repository
- Go into /Tools
and run update_dependencies.bat
- Open the sln file in Visual Studio, if VS asks you if you want to upgrade the project, select "No Upgrade" on all options
- Right click the "RTRad" project and click on "Set us Startup Project"
- Select the "Debug D3D12" configuration
- Start/Build the project
Some issues can occur whilst setting things up. Ultimately, make sure that you:
Right-Click > Properties
any of the two projects (Falcor and RTRad) it should have "10.0.19041.0" as the Windows SDK version and "Visual Studio 2019 (v142)" as the Platform Toolset.Once you get the project running, you will see a basic scene with a GUI.
The upper left-most panel will let you run a new radiosity pass (corresponding to one bounce of light) or reset back to zero. The upper right-most panel lets you select a resolution for the lightmap. Stick to low resolutions unless you use one of the faster methods/variants listed further below.
In the bottom left you can set "Batching Settings", which determine how many pixels (ie. radiosity patches) are processed before returning control back to the CPU. If you experience crashes or freezes, try lowering the batch-size. Passes generally run faster with the largest batch-size you can get away with (depends on GPU).
You can press "F2" to toggle the GUI and "P" to bring up the profiler. Whilst the profiler is active, the pass-time of the current (ie. last) pass will be displayed on the bottom of the "RTRad" panel.
There are roughly 4 different variants of progressive radiosity you can execute:
Here's a simple comparison (lightmap of 256x256 pixels):
NOTE: The first pass you execute after loading a scene can be slower than subsequent ones, because the acceleration structure needs to be rebuilt.
You can select what data you want visualized in which way by adjusting the "Visualization Settings". You can select which texture and mipmap to display, in addition to showing the texture's resolution and alpha channel.
Textures can be rendered as a model, or as masked / unmasked UV-textures. You can also toggle the bilinear magnification filter.
Here are some examples of what data can be visualized: (Left-to-right: normal vectors, voxel-map, texture resolution and alpha-embedded quad-tree)
In the "Scene Settings" panel you can adjust a scene to your liking as well as view useful information on the geometry and acceleration structures.
To load a new scene, you can click on the "Load Scene" button and navigate to the Source/RTRad/Scenes
directory to select any of the .pyscene
files.
RTRad comes with six different testing scenes to cover a wide variety of use-cases:
To create your own scene, simply create a new .pyscene
file and adjust it to your liking. Refer to the python-scene-files documentation for further details.
NOTE: For a scene to work out-of-the-box with RTRad it needs non-overlapping UV coordinates (for lightmaps) in the UV0 channel.
RTRad comes with a number of additional features such as visiblity caching, sew-seams and voxel-raymarching. Here's a rough overview:
This project is licensed under CC BY-NC 4.0 whilst its underlying framework (Falcor 4.4) has its own license.