• Stars
    star
    624
  • Rank 71,995 (Top 2 %)
  • Language
    C++
  • License
    Other
  • Created over 1 year ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Real-time path tracing library and sample

Path Tracing SDK v1.1.0

Title

Overview

Path Tracing SDK is a code sample that strives to embody years of ray tracing and neural graphics research and experience. It is intended as a starting point for a path tracer integration, as a reference for various integrated SDKs, and/or for learning and experimentation.

The base path tracing implementation derives from NVIDIA’s Falcor Research Path Tracer, ported to approachable C++/HLSL Donut framework.

GTC presentation How to Build a Real-time Path Tracer provides a high level introduction to most of the features.

Features

  • DirectX 12 and Vulkan back-ends
  • Reference and real-time modes
  • Simple BSDF model that is easy to extend
  • Simple asset pipeline based on glTF 2.0 (support for a subset of glTF extensions including animation)
  • NEE/visibility rays and importance sampling for environment maps with MIS
  • Basic volumes and nested dielectrics with priority
  • RayCone for texture MIP selection
  • Basic analytic lights (directional, spot, point)
  • RTXDI integration for ReSTIR DI (light importance sampling) and and ReSTIR GI (indirect lighting)
  • OMM integration for fast ray traced alpha testing
  • NRD ReLAX and ReBLUR denoiser integration with up to 3-layer path space decomposition (Stable Planes)
  • Reference mode 'photo-mode screenshot' with basic OptiX denoiser integration
  • Basic TAA, tone mapping, etc.
  • Streamline + DLSS integration

Requirements

  • Windows 10 20H1 (version 2004-10.0.19041) or newer
  • DXR Capable GPU
  • GeForce Game Ready Driver 531.18 or newer
  • DirectX 12 or Vulkan API
  • DirectX Raytracing 1.1 API, or higher
  • Visual Studio 2019 or later with Windows 10 SDK version 10.0.20348.0 or later

Known Issues

  • Enabling Vulkan support requires a couple of manual steps, see below
  • SER support on Vulkan is currently work in progress
  • Using SER with DLSS3 Frame Generation is known to cause crashes in certain conditions. We are working on a driver update to address this.
  • Running Vulkan on AMD GPUs may trigger a TDR during TLAS building in scenes with null TLAS instances.

Folder Structure

/bin default folder for binaries and compiled shaders
/build default folder for build files
/donut code for a custom version of the Donut framework
/donut/nvrhi code for the NVRHI rendering API layer (a git submodule)
/external external libraries and SDKs, including NRD, RTXDI, and OMM
/media models, textures, scene files
/tools optional command line tools (denoiser, texture compressor, etc)
/pt_sdk Path Tracing SDK core; Sample.cpp/.h/.hlsl contain entry points
/pt_sdk/PathTracer Core path tracing shaders

Build

At the moment, only Windows builds are supported. We are going to add Linux support in the future.

  1. Clone the repository with all submodules recursively:

    git clone --recursive https://github.com/NVIDIAGameWorks/Path-Tracing-SDK.git

  2. Pull the media and other non-git-hosted files:

    cd Path-Tracing-SDK
    update_dependencies.bat
    
  3. Create a build folder.

    mkdir build
    cd build
    

    Any folder name works, but git is configured to ignore folders named build\*

  4. Use CMake to configure the build and generate the project files.

    Use of CMake GUI is recommended but cmake .. works too. Make sure to select the x64 platform for the generator.

  5. Build the solution generated by CMake in the build folder.

    Open the generated solution (i.e. build/PathTracingSDK.sln) with Visual Studio and build it.

  6. Select and run the pt_sdk project. Binaries get built to the bin folder. Media is loaded from media folder.

    If making a binary build, the media and tools folders can be placed into bin and packed up together (i.e. the sample app will search for both media\ and ..\media\).

Building Vulkan

Due to interaction with various included libraries, Vulkan support is not enabled by default and needs a couple of additional tweaks on the user side; please find the recommended steps below:

  • Install Vulkan SDK (we tested with 1.3.246.1 but others will work)
  • Set DONUT_WITH_VULKAN and NVRHI_WITH_VULKAN CMake variables to ON
  • Disable STREAMLINE_INTEGRATION (set CMake variable to OFF)
  • Clear CMake cache (if applicable) to make sure the correct dxc.exe path (from Vulkan SDK) is set for SPIRV compilation

User Interface

Once the application is running, most of the SDK features can be accessed via the UI window on the left hand side and drop-down controls in the top-center.

UI

Camera can be moved using W/S/A/D keys and rotated by dragging with the left mouse cursor.

Command Line

  • -scene loads a specific .scene.json file; example: -scene programmer-art.scene.json
  • -width and -height to set the window size; example: -width 3840 -height 2160 -fullscreen
  • -fullscreen to start in full screen mode; example: -width 3840 -height 2160 -fullscreen
  • -adapter to run on a specific GPU in multi GPU environments using a substring match; example: -adapter A3000 will select an adapter with the full name NVIDIA RTX A3000 Laptop GPU
  • -debug to enable the graphics API debug layer or runtime, and the NVRHI validation layer.

Developer Documentation

We are working on more detailed SDK developer documentation - watch this space!

Contact

Path Tracing SDK is under active development. Please report any issues directly through GitHub issue tracker, and for any information, suggestions or general requests please feel free to contact us at [email protected]!

License

See LICENSE.txt

More Repositories

1

kaolin

A PyTorch Library for Accelerating 3D Deep Learning Research
Python
4,452
star
2

PhysX

NVIDIA PhysX SDK
C++
2,893
star
3

Falcor

Real-Time Rendering Framework
C++
2,615
star
4

PhysX-3.4

NVIDIA PhysX SDK 3.4
C++
2,307
star
5

kaolin-wisp

NVIDIA Kaolin Wisp is a PyTorch library powered by NVIDIA Kaolin Core to work with neural fields (including NeRFs, NGLOD, instant-ngp and VQAD).
Python
1,450
star
6

rtx-remix

Combined repo for the RTX-Remix runtime
1,369
star
7

DxrTutorials

C++
834
star
8

RTXGI-DDGI

RTX Global Illumination (RTXGI)
C++
689
star
9

GettingStartedWithRTXRayTracing

Getting Started with RTX Ray Tracing
C++
613
star
10

FleX

C++
579
star
11

nvrhi

C++
525
star
12

RayTracingDenoiser

NVIDIA Ray Tracing Denoiser
HLSL
512
star
13

FaceWorks

A middleware library and sample application for high-quality skin and eye rendering
C++
450
star
14

NVIDIAImageScaling

NVIDIA Image Scaling SDK
C
426
star
15

Streamline

Streamline Integration Framework
C
400
star
16

RTXDI

C++
356
star
17

Blast

A modular destruction SDK designed for performance and flexibility, replacing APEX destruction
C++
331
star
18

dxvk-remix

C++
307
star
19

NvCloth

C
296
star
20

KickstartRT

KickstartRT SDK
C++
185
star
21

Flow

Flow is a sparse grid-based fluid simulation library for real-time applications.
C
168
star
22

donut

C++
164
star
23

HBAOPlus

HBAO+
C++
160
star
24

bridge-remix

This is the NVIDIA RTX Remix Runtime Bridge repository
C++
146
star
25

Displacement-MicroMap-Toolkit

C++
130
star
26

SpatiotemporalBlueNoiseSDK

C
127
star
27

UnityPhysXPlugin

Experimental Unity package to enable access to NVIDIA PhysX SDK 4 from within Unity.
C#
122
star
28

NRI

C++
90
star
29

RTXMU

C++
89
star
30

ShaderMake

Shader Compilation Tool
C++
78
star
31

donut_examples

C++
72
star
32

NRDSample

C++
69
star
33

GeForceNOW-SDK

This is the home of the SDK for GeForce NOW
C
65
star
34

KickstartRT_demo

Repo for KickstartRT demo application
C++
50
star
35

Opacity-MicroMap-SDK

Opacity Micro-Map SDK Source Repository
C++
36
star
36

MathLib

C++
28
star
37

Displacement-MicroMap-SDK

C++
19
star
38

Streamline_Sample

C++
17
star
39

nas-sample

C++
16
star
40

ComfyUI-RTX-Remix

ComfyUI RTX Remix
Python
14
star
41

Opacity-MicroMap-Samples

Samples repository for the Opacity MicroMap SDK
C++
11
star
42

Displacement-MicroMap-BaryFile

C++
11
star
43

NRIFramework

C
8
star
44

NRISamples

C++
7
star
45

rtxdi-runtime

HLSL
2
star