An implementation of Real-time Neural Radiance Caching for Path Tracing with OptiX 8 and tiny-cuda-nn.
Rendered in 2K resolution with an RTX 4080 Laptop GPU
Tested on Windows with Visual Studio 2022.
Building for Linux, or Windows without VS, is possible, but you may have to manually set up the third-party dependencies.
- OptiX SDK 7 or 8, and a supported NVIDIA GPU.
- CUDA Toolkit: Tested with CUDA 12.4, but any recent version compatible with your OptiX SDK should work.
- CMake 3.26 or higher.
- Visual Studio 2017 or higher.
- MDL SDK 1.8: Required for PBR materials. We recommend downloading the binary here.
- Additional dependencies (including tiny-cuda-nn) set up by the
3rdparty.cmd
script.
We have included a CMakeLists.txt
for the project and a 3rdparty.cmd
script to install the additional dependencies.
You can build the project by following these steps:
-
Launch the x64 Native Tools Command Prompt for VS 2017/2019/2022. (We will assume this as the shell environment for all commands below.)
-
cd
into the project root directory, and run3rdparty.cmd
. -
Set the environment variable
MDL_SDK_PATH
to point to your MDL library folder (containing aninclude
folder.)- Alternatively, place your MDL library folder in the
3rdparty
folder with the nameMDL_SDK
.
- Alternatively, place your MDL library folder in the
-
To generate a solution file for the project, type
mkdir build && cd build cmake -G "Visual Studio <version>" ..
where
<version>
is15 2017
for VS 2017,16 2019
for VS 2019, and17 2022
for VS 2022, resp.
To run the renderer,
-
Set the working directory of the application to
$(TargetDir)
in Visual Studio (where the executable is located.) -
In the working directory, create a symbolic link to the
data
folder by typingmklink /D .\data <actual_data_folder>
⚠️ You might need admin privilege for this on Windows :\ (at least sudo is coming soon...) -
Try out the Cornell Box (with friends! 🐉🐇) scene with the command line arguments:
-s data/system_mdl_cornell.txt -d data/scene_mdl_cornell_friends.txt
demo_cornell.mp4
demo_watercolor.mp4
Path tracer and assets dervied from the OptiX MDL renderer sample.