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.
Additionally needed for the precompiled version:
Additionally needed for building the code:
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.
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.
Build -> Build Solution
in Release
or Debug
configuration. This step is skipped for the precompiled version.RunMogwai.bat
, which loads in the RTPM render pass and the caustic glass scene.
FalcorData/Mogwai.exe
for the precompiled version. In this case, a photon map script and scene need to be loaded separately.File -> Load Script
. You can find the photon map scripts in the PhotonMapPasses
folder.File -> Load Scene
. Scenes
folder. Load in a .pyscene
file to get the same results as in the paper.
Scenes\SceneSettings.csv
.RTPM
prefix. For more information see Scenes/Bistro_v5_2/BISTRO_README.txt
.ExampleImages
folder.Graph | Description |
---|---|
VBufferPM | A modified V-Buffer that traces the path until it hits a diffuse surface. |
RTPhotonMapper | The 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. |
HashPPM | An 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. |
StochHashPPM | An 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. |
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