• Stars
    star
    185
  • Rank 208,271 (Top 5 %)
  • Language
    C++
  • License
    Other
  • Created over 2 years ago
  • Updated almost 2 years ago

Reviews

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

Repository Details

KickstartRT SDK

Kickstart RT

  1. What's Kickstart RT
  2. How it works
  3. Getting Started
  4. License
  5. Release Notes

1. What's Kickstart RT

This SDK aims to achieve higher quality reflection and GI rendering than traditional screen space techniques, using hardware ray-tracing functionality without having to set up shaders and shader resources for ray-tracing.
When implementing ray-tracing into an existing game engine, one of the biggest problems is preparing the shaders for reflection and GI rays. All of the countless shaders that exist in a game scene must be listed and configured. We also need to make sure that the various shader resources (ConstantBuffer, Texture, etc.) can be accessed correctly from those shaders for each material. This can be a very complex task.
Instead of setting up all the shaders, this SDK takes the lighting information from a rendered G-Buffer and stores it in a world space cache. Therefore, the application does not need to modify any shaders for ray-tracing. Internally, the SDK creates reflection and GI information by sampling the lighting information using ray-tracing. This is the biggest difference from screen space based techniques as lighting information for off-screen objects will also be sampled if it is stored in the SDK.

Is this a complete replacement for ray-traced reflection or GI?

No, it is not.
First, Kickstart RT takes the lighting information from the G-Buffer and stores it in world space, but the SDK doesn't take into account what components it consists of (Diffuse, Specular, Fresnel etc...). It also does not take into account the material of the surfaces. Any surface of material that the ray hits will be evaluated as a full Lambertian, so the lighting information from the G-Buffer will be treated as radiance. This is a major compromise but it frees the application from having to manage the materials for ray-tracing. Additionally, each pixel in screen space (i.e.the starting point for ray-tracing) can be evaluated as a material by passing texture parameters such as specular and roughness. However, if there is a sudden change in the lighting environment or object movement in the scene, the lighting information stored in the SDK may become stale and wont represent the current lighting conditions very well. In order to update the changed lighting, multiple G-Buffers containing the new lighting information must be continuously provided to the SDK for several frames. Thus there is also increased latency there which is another compromise.

2. How it works

For detailed information of Kickstart RT, please refer to the separate documents includes in the docs. Here's a rough idea of how it works

  1. The application passes the vertex and index buffers of the geometry in the scene to the SDK so that it builds the BVH of the scene internally. The SDK also receives information such as updates on geometry shapes, instance position, newly placed or removed instances etc...
    Slide1

  2. The application passes the G-buffer containing the lighting along with depth and normal information to the SDK. The SDK stores the information of the G-buffer in the lighting cache in world space. It also receives the projection matrix and view matrix information along with the G-Buffer which are needed to reconstruct world space position.
    Slide2

  3. SDK performs raytracing internally and passes Reflection and GI results to the application. The SDK performs raytracing based on the camera position specified by the application. It renders reflections and GI using information from the lighting cache (built in world space), and returns the result to the application as a texture.
    Slide3

3. Getting Started

Kickstart RT is designed from the ground up to provide a simple interface to common implementations of ray tracing techniques used in modern games. It provides API support in Direct3D11/12 & Vulkan. It can be compiled to Windows or Linux platforms including ARM instruction sets.
Kickstart RT is designed to be a dynamically linked runtime library that is linked to your application at build time. We provide full source code to all parts of the library so that you may build it yourself. In addition to browsing the sample code, we encourage you to check out the formal documentation listed here.

Requirements

The requirements to use Kickstart RT when built from source.

Windows
  • Cmake 3.22+
    Tested with : 3.22.0
  • Visual Studio 2019+
    Tested with : Microsoft Visual Studio Professional 2022 (64-bit) Version 17.0.1
  • Vulkan SDK
    Should be worked with 1.2 or higher. Tested with : 1.3.204.0 and 1.2.189.
  • Windows10 SDK
    Any recent one should be fine. Tested with : 10.0.20348.0.
  • PIX EventMarker runtime
    If you want to enable perf marker in SDK’s render passes. Tested with : 1.0.220124001.
Linux
  • Cmake 3.22+
  • Vulkan SDK
    Should work with 1.2 or higher. Tested with 1.2.189.
  • gcc/g++ 9.3 or above

GPU Requirements

The SDK checks for the following feature support at initialization time. It doesn’t mean that the SDK guarantees to support all GPUs that fulfills the following features.

  • D3D11

    • D3D11.4
      Needs to support ID3D11Device5 to handle fence objects.
  • D3D12 and 11 D3D11 uses D3D12 as a backend of the rendering, so the requirement is basically the same.

    • D3D12_RESOURCE_BINDING_TIER_3
    • D3D12_RAYTRACING_TIER_1_0 or greater. Need 1.1 for Inline Raytracing.
  • Vulkan
    Instance Extensions

    • VK_EXT_debug_utils

    Physical Device features

    • VK_EXT_buffer_device_address
    • VK_KHR_acceleration_structure
    • VK_KHR_ray_tracing_pipeline

    Device Extensions

    • VK_KHR_ray_tracing_pipeline
    • VK_KHR_ray_query If enabling inline ray tracing.

Build Steps

Kickstart is built using CMake, so the build instructions are pretty standard.

Windows build instructions
  1. Clone the repository
    git clone --recursive https://github.com/NVIDIAGameWorks/KickstartRT
  2. Set up dependent libraries
    • Windows SDK
      You can download and install from here.
    • Vulkan SDK
      You can download and install from here. The installer will set VULKAN_SDK environment variable by default, and the CMake file refers it to find out the location of the SDK. So, please be sure to set the value properly.
    • PIX WinPixEventRuntime
      If you want to enable PIX in the SDK's render passes, you need to install PIX runtime which can download from here. There are two options to enable PIX in the SDK.
      • Set PIX_EVENT_RUNTIME_SDK environment variable with the path to the lib before configuring CMake.
      • Set KickstartRT_PIX_EVENT_RUNTIME_SDK_PATH in the CMake's configuration with the path to the lib.
  3. CMake confiture and generate projects.
    You can use CMake GUI to configure project files. You can set the destination folder anywhere. However, build directory just under the repository is preferred since it is already noted in .gitignore.
  4. Build
    Open the Visual Studio solution which should be generated under build directory and build ALL_BUILD and INSTALL.
    After INSTALL, built files will be assembled into build/package directory. You can then copy this package into your game engine for integration.
Linux build instructions
  1. Clone the repository recursively
    git clone --recursive https://github.com/NVIDIAGameWorks/KickstartRT

  2. Download and install the Vulkan SDK here. If built from sources, remember to run the setup_env.sh script to set up the required environment variables.

  3. Ensure gcc 9.3 is installed. This has been tested with gcc 9.3 and is required for the C++17 functionality. If you have an older version of gcc installed, please update otherwise you will get compilation issues with #include <filesystem>

    sudo apt install gcc-9 g++-9

  4. Windows resource files have been emulated with some CMake magic which has restrictions when adding new shaders. The shader rc file is dynamically creating at build time, rather than build generation time, so a pre-populated resource file is included in the project which will get over-written on the first build. If a new shader is added and the project has not been built yet, then the pre-populated rc file will need updating or Kickstart RT will fail to find the new shader.

4. License

This project is under the MIT License, see the LICENSE.txt file for details. Also, you may need to check licenses for dependent components.

5. Release Notes

Version-0.9.0

  • Initial vresion.

Version-1.0.0

  • Changed RegisterGeometry to accept multiple vertex/index pairs for inputs.
    • Changed GeometryInput struct.
    • Added struct GeometryComponet as a sub struct of GeometryInput.
  • Added DirectLightTransfer task
    • Added enum RenderTask::Task::Type::DirectLightTransfer.
    • Added struct DirectLightTransferTask.
    • Added bool GeometryInput::allowLightTransferTarget.
  • Added parameters to optimize raytracing workload.
    • Added DirectLightingInjectionTask::injectionResolutionStride to optimize light injection tasks.
    • Added TraceTaskCommon::maxRayLength to optimize ray tracing tasks.
  • Added functionality to control BVH's participants of each render tasks.
    • Added enum BVHTask::InstanceInclusionMask
  • Changed to allocate single descriptor heap for all render tasks.
  • Updated NRD to v3.9.2.

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

RTX-Path-Tracing

Real-time path tracing library and sample
C++
624
star
10

GettingStartedWithRTXRayTracing

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

FleX

C++
579
star
12

nvrhi

C++
525
star
13

RayTracingDenoiser

NVIDIA Ray Tracing Denoiser
HLSL
512
star
14

FaceWorks

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

NVIDIAImageScaling

NVIDIA Image Scaling SDK
C
426
star
16

Streamline

Streamline Integration Framework
C
400
star
17

RTXDI

C++
356
star
18

Blast

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

dxvk-remix

C++
307
star
20

NvCloth

C
296
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