Home

Awesome

Accelerated Photon Mapping for Hardware-based Ray Tracing (using Falcor 5.2)

A Progressive Photon Mapper that uses the ray tracing hardware for distribution and collection of photons. Our Photon Mapper uses NVIDIA's Falcor 5.2 framework. More details on how the Progressive Photon Mapper works can be found in our paper published in the Journal of Computer Graphic Techniques here.

Prerequisites

Additionally needed for the precompiled version:

Additionally needed for building the code:

Setup

This section can be skipped if using the precompiled files (Release Build).

The setup is identical to Falcor 5.2. For the sake of simplicity, we only describe how to set up Falcor with Visual Studio 2019 and 2022. For other build options and additional information, see the Building Falcor section here.

Visual Studio

You can set up a native Visual Studio solution by running setup_vs2019.bat (or setup_vs2022.bat, same process) after cloning this repository. The solution files are written to build/windows-vs2019-d3d12 and the binary output is located in build/windows-vs2019-d3d12/bin.

Alternatively, you can use CMake. Run the setup.bat and then use the CMake Presets windows-vs2019-d3d12 or windows-vs2022-d3d12 with the command cmake --preset <preset name>. You can find more information for generating the build files using CMake under the Building Falcor/Configure Presets section here.

Build in Visual Studio with Build -> Build Solution for the correct build order. Otherwise, multiple builds may be necessary.

Loading in Falcor Scripts and Scenes

Examples

Render Passes

GraphDescription
VBufferPMA modified V-Buffer that traces the path until it hits a diffuse surface.
RTPhotonMapperThe ray tracing hardware-based progressive photon mapper. Photons are distributed through the scene with ray tracing. An acceleration structure is built with the distributed photons that are then collected with an infinite small ray. The user controls the number of photons and needs to ensure that the photon buffer is big enough. You can access additional information for each UI variable by hovering over the question mark on the right side of the UI variable.
HashPPMAn alternative implementation of the RTPhotonMapper using a hash grid for collection. The photons are still distributed with ray tracing but are now stored in a hash map. Like with the RTPhotonMapper, the user has to ensure that the photon buffer is big enough. For additional information, hover over the question mark on the right side of the UI variable.
StochHashPPMAn alternative implementation of the RTPhotonMapper using a stochastic hash grid for collection. Photons are distributed via a ray tracing shader and are stored in a hash grid. On collision, the photon is randomly overwritten. For additional information, hover over the question mark on the right side of the UI variable.

Source Code

We recommend Visual Studio 2019 or 2022 for navigating the source code. You can find the code for our Photon Mappers in the respective folder under Source/RenderPasses. For more information about how to use Falcor, see the getting started or the full documentation index